diff graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java @ 2657:4a6518c4d17d

Removed need for base instruction. Cleanup.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 11 May 2011 16:10:49 +0200
parents 6d19b4f476db
children 194d93d089bd
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java	Wed May 11 15:23:07 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java	Wed May 11 16:10:49 2011 +0200
@@ -210,10 +210,9 @@
 
     private void finishStartBlock(BlockBegin startBlock, BlockBegin stdEntry) {
         assert curBlock == startBlock;
-        Base base = new Base(stdEntry, graph);
+        FrameState stateAfter = frameState.create(bci());
+        Goto base = new Goto(stdEntry, stateAfter, false, graph);
         appendWithoutOptimization(base, 0);
-        FrameState stateAfter = frameState.create(bci());
-        base.setStateAfter(stateAfter);
         startBlock.setEnd(base);
         assert stdEntry.stateBefore() == null;
         stdEntry.mergeOrClone(stateAfter, method());
@@ -325,7 +324,7 @@
         return handler.isCatchAll();
     }
 
-    void genLoadConstant(int cpi) {
+    private void genLoadConstant(int cpi) {
         Object con = constantPool().lookupConstant(cpi);
 
         if (con instanceof RiType) {
@@ -939,11 +938,7 @@
         assert x.next() == null : "instruction should not have been appended yet";
         assert lastInstr.next() == null : "cannot append instruction to instruction which isn't end (" + lastInstr + "->" + lastInstr.next() + ")";
 
-        if (lastInstr instanceof Base) {
-            assert false : "may only happen when inlining intrinsics";
-        } else {
-            lastInstr = lastInstr.appendNext(x, bci);
-        }
+        lastInstr = lastInstr.appendNext(x, bci);
         if (++stats.nodeCount >= C1XOptions.MaximumInstructionCount) {
             // bailout if we've exceeded the maximum inlining size
             throw new CiBailout("Method and/or inlining is too large");