Mercurial > hg > graal-jvmci-8
comparison graal/GraalCompiler/src/com/sun/c1x/value/FrameStateBuilder.java @ 2840:75e0d39833a0
new CompilerGraph, create only one Return and one Unwind per CompilerGraph
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Tue, 31 May 2011 16:53:19 +0200 |
parents | bfce42cd9c07 |
children | 7596ae867a7b |
comparison
equal
deleted
inserted
replaced
2837:7b5831f0e913 | 2840:75e0d39833a0 |
---|---|
100 return new FrameState(bci, locals, stack, stackIndex, locks, graph); | 100 return new FrameState(bci, locals, stack, stackIndex, locks, graph); |
101 } | 101 } |
102 | 102 |
103 @Override | 103 @Override |
104 public FrameState duplicateWithEmptyStack(int bci) { | 104 public FrameState duplicateWithEmptyStack(int bci) { |
105 return new FrameState(bci, locals, new Value[0], 0, locks, graph); | 105 FrameState frameState = new FrameState(bci, locals, new Value[0], 0, locks, graph); |
106 frameState.setOuterFrameState(outerFrameState()); | |
107 return frameState; | |
106 } | 108 } |
107 | 109 |
108 /** | 110 /** |
109 * Pushes an instruction onto the stack with the expected type. | 111 * Pushes an instruction onto the stack with the expected type. |
110 * @param kind the type expected for this instruction | 112 * @param kind the type expected for this instruction |
359 * @param scope the IRScope in which this locking operation occurs | 361 * @param scope the IRScope in which this locking operation occurs |
360 * @param obj the object being locked | 362 * @param obj the object being locked |
361 */ | 363 */ |
362 public void lock(IR ir, Value obj, int totalNumberOfLocks) { | 364 public void lock(IR ir, Value obj, int totalNumberOfLocks) { |
363 locks.add(obj); | 365 locks.add(obj); |
364 ir.updateMaxLocks(totalNumberOfLocks); | |
365 } | 366 } |
366 | 367 |
367 /** | 368 /** |
368 * Unlock the lock on the top of the stack. | 369 * Unlock the lock on the top of the stack. |
369 */ | 370 */ |
494 } else { | 495 } else { |
495 locks.set(i - locals.length - stack.length, v); | 496 locks.set(i - locals.length - stack.length, v); |
496 } | 497 } |
497 } | 498 } |
498 | 499 |
500 @Override | |
501 public Value outerFrameState() { | |
502 return null; | |
503 } | |
499 } | 504 } |