470 // the field and the field's class;
471 if ( sourceClass.permitInlinedAccess(env, field.getClassDeclaration())
472 && sourceClass.permitInlinedAccess(env, field)) {
473 return 2 + super.costInline(thresh, env, ctx);
474 }
475 } catch (ClassNotFound e) {
476 }
477 return thresh;
478 }
479
480
481 /**
482 * Code
483 */
484 public void code(Environment env, Context ctx, Assembler asm) {
485 codeCommon(env, ctx, asm, false);
486 }
487 public void codeValue(Environment env, Context ctx, Assembler asm) {
488 codeCommon(env, ctx, asm, true);
489 }
490 private void codeCommon(Environment env, Context ctx, Assembler asm,
491 boolean forValue) {
492 asm.add(where, opc_new, field.getClassDeclaration());
493 if (forValue) {
494 asm.add(where, opc_dup);
495 }
496
497 ClassDefinition refc = field.getClassDefinition();
498 UplevelReference r = refc.getReferencesFrozen();
499
500 if (r != null) {
501 r.codeArguments(env, ctx, asm, where, field);
502 }
503
504 if (outerArg != null) {
505 outerArg.codeValue(env, ctx, asm);
506 switch (outerArg.op) {
507 case THIS:
508 case SUPER:
509 case NEW:
|
470 // the field and the field's class;
471 if ( sourceClass.permitInlinedAccess(env, field.getClassDeclaration())
472 && sourceClass.permitInlinedAccess(env, field)) {
473 return 2 + super.costInline(thresh, env, ctx);
474 }
475 } catch (ClassNotFound e) {
476 }
477 return thresh;
478 }
479
480
481 /**
482 * Code
483 */
484 public void code(Environment env, Context ctx, Assembler asm) {
485 codeCommon(env, ctx, asm, false);
486 }
487 public void codeValue(Environment env, Context ctx, Assembler asm) {
488 codeCommon(env, ctx, asm, true);
489 }
490 @SuppressWarnings("fallthrough")
491 private void codeCommon(Environment env, Context ctx, Assembler asm,
492 boolean forValue) {
493 asm.add(where, opc_new, field.getClassDeclaration());
494 if (forValue) {
495 asm.add(where, opc_dup);
496 }
497
498 ClassDefinition refc = field.getClassDefinition();
499 UplevelReference r = refc.getReferencesFrozen();
500
501 if (r != null) {
502 r.codeArguments(env, ctx, asm, where, field);
503 }
504
505 if (outerArg != null) {
506 outerArg.codeValue(env, ctx, asm);
507 switch (outerArg.op) {
508 case THIS:
509 case SUPER:
510 case NEW:
|