Mercurial > hg > graal-jvmci-8
comparison graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java @ 2595:4a4dab936c1e
new node layout: AccessField
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Thu, 05 May 2011 15:49:48 +0200 |
parents | 092e628ddd5d |
children | 1c36b17f7ee0 |
comparison
equal
deleted
inserted
replaced
2594:092e628ddd5d | 2595:4a4dab936c1e |
---|---|
702 } | 702 } |
703 | 703 |
704 void genGetField(int cpi, RiField field) { | 704 void genGetField(int cpi, RiField field) { |
705 // Must copy the state here, because the field holder must still be on the stack. | 705 // Must copy the state here, because the field holder must still be on the stack. |
706 FrameState stateBefore = curState.immutableCopy(bci()); | 706 FrameState stateBefore = curState.immutableCopy(bci()); |
707 LoadField load = new LoadField(apop(), field, stateBefore); | 707 LoadField load = new LoadField(apop(), field, stateBefore, graph); |
708 appendOptimizedLoadField(field.kind(), load); | 708 appendOptimizedLoadField(field.kind(), load); |
709 } | 709 } |
710 | 710 |
711 void genPutField(int cpi, RiField field) { | 711 void genPutField(int cpi, RiField field) { |
712 // Must copy the state here, because the field holder must still be on the stack. | 712 // Must copy the state here, because the field holder must still be on the stack. |
713 FrameState stateBefore = curState.immutableCopy(bci()); | 713 FrameState stateBefore = curState.immutableCopy(bci()); |
714 Value value = pop(field.kind().stackKind()); | 714 Value value = pop(field.kind().stackKind()); |
715 appendOptimizedStoreField(new StoreField(apop(), field, value, stateBefore)); | 715 appendOptimizedStoreField(new StoreField(apop(), field, value, stateBefore, graph)); |
716 } | 716 } |
717 | 717 |
718 void genGetStatic(int cpi, RiField field) { | 718 void genGetStatic(int cpi, RiField field) { |
719 RiType holder = field.holder(); | 719 RiType holder = field.holder(); |
720 boolean isInitialized = !C1XOptions.TestPatching && field.isResolved(); | 720 boolean isInitialized = !C1XOptions.TestPatching && field.isResolved(); |
724 } | 724 } |
725 if (constantValue != null) { | 725 if (constantValue != null) { |
726 push(constantValue.kind.stackKind(), appendConstant(constantValue)); | 726 push(constantValue.kind.stackKind(), appendConstant(constantValue)); |
727 } else { | 727 } else { |
728 Value container = genResolveClass(RiType.Representation.StaticFields, holder, field.isResolved(), cpi); | 728 Value container = genResolveClass(RiType.Representation.StaticFields, holder, field.isResolved(), cpi); |
729 LoadField load = new LoadField(container, field, null); | 729 LoadField load = new LoadField(container, field, null, graph); |
730 appendOptimizedLoadField(field.kind(), load); | 730 appendOptimizedLoadField(field.kind(), load); |
731 } | 731 } |
732 } | 732 } |
733 | 733 |
734 void genPutStatic(int cpi, RiField field) { | 734 void genPutStatic(int cpi, RiField field) { |
735 RiType holder = field.holder(); | 735 RiType holder = field.holder(); |
736 Value container = genResolveClass(RiType.Representation.StaticFields, holder, field.isResolved(), cpi); | 736 Value container = genResolveClass(RiType.Representation.StaticFields, holder, field.isResolved(), cpi); |
737 Value value = pop(field.kind().stackKind()); | 737 Value value = pop(field.kind().stackKind()); |
738 StoreField store = new StoreField(container, field, value, null); | 738 StoreField store = new StoreField(container, field, value, null, graph); |
739 appendOptimizedStoreField(store); | 739 appendOptimizedStoreField(store); |
740 } | 740 } |
741 | 741 |
742 private Value genResolveClass(RiType.Representation representation, RiType holder, boolean initialized, int cpi) { | 742 private Value genResolveClass(RiType.Representation representation, RiType holder, boolean initialized, int cpi) { |
743 Value holderInstr; | 743 Value holderInstr; |