r.codeArguments(env, ctx, asm, where, field); } if (outerArg != null) { outerArg.codeValue(env, ctx, asm); switch (outerArg.op) { case THIS: case SUPER: case NEW: // guaranteed non-null break; case FIELD: { MemberDefinition f = ((FieldExpression)outerArg).field; if (f != null && f.isNeverNull()) { break; } // else fall through: } default: // Test for nullity by invoking some trivial operation // that can throw a NullPointerException. try { ClassDefinition c = env.getClassDefinition(idJavaLangObject); MemberDefinition getc = c.getFirstMatch(idGetClass); asm.add(where, opc_dup); asm.add(where, opc_invokevirtual, getc); asm.add(where, opc_pop); } catch (ClassNotFound e) { } } } if (implMethod != null) { // Constructor call will be via an access method. // Pass 'null' as the value of the dummy argument. asm.add(where, opc_aconst_null); } for (int i = 0 ; i < args.length ; i++) { args[i].codeValue(env, ctx, asm); } asm.add(where, opc_invokespecial, ((implMethod != null) ? implMethod : field)); }}Lines 501–545 of 545. Previous lines
r.codeArguments(env, ctx, asm, where, field); } if (outerArg != null) { outerArg.codeValue(env, ctx, asm); switch (outerArg.op) { case THIS: case SUPER: case NEW: // guaranteed non-null break; case FIELD: { MemberDefinition f = ((FieldExpression)outerArg).field; if (f != null && f.isNeverNull()) { break; } // else fall through: } default: // Test for nullity by invoking some trivial operation // that can throw a NullPointerException. try { ClassDefinition c = env.getClassDefinition(idJavaLangObject); MemberDefinition getc = c.getFirstMatch(idGetClass); asm.add(where, opc_dup); asm.add(where, opc_invokevirtual, getc); asm.add(where, opc_pop); } catch (ClassNotFound e) { } } } if (implMethod != null) { // Constructor call will be via an access method. // Pass 'null' as the value of the dummy argument. asm.add(where, opc_aconst_null); } for (int i = 0 ; i < args.length ; i++) { args[i].codeValue(env, ctx, asm); } asm.add(where, opc_invokespecial, ((implMethod != null) ? implMethod : field)); } }