Mercurial > hg > graal-compiler
comparison graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java @ 2564:274360f98f97
Remove inlining (2nd part) removed IRScope
author | Gilles Duboscq <gilles.duboscq@oracle.com> |
---|---|
date | Fri, 29 Apr 2011 13:19:17 +0200 |
parents | e1b3db8031ee |
children | 4a36a0bd6d18 |
comparison
equal
deleted
inserted
replaced
2563:491896f81cae | 2564:274360f98f97 |
---|---|
1281 | 1281 |
1282 for (int index = 0; index < suxState.stackSize(); index++) { | 1282 for (int index = 0; index < suxState.stackSize(); index++) { |
1283 moveToPhi(resolver, curState.stackAt(index), suxState.stackAt(index)); | 1283 moveToPhi(resolver, curState.stackAt(index), suxState.stackAt(index)); |
1284 } | 1284 } |
1285 | 1285 |
1286 // walk up the inlined scopes until locals match | |
1287 while (curState.scope() != suxState.scope()) { | |
1288 curState = curState.callerState(); | |
1289 assert curState != null : "scopes don't match up"; | |
1290 } | |
1291 | |
1292 for (int index = 0; index < suxState.localsSize(); index++) { | 1286 for (int index = 0; index < suxState.localsSize(); index++) { |
1293 moveToPhi(resolver, curState.localAt(index), suxState.localAt(index)); | 1287 moveToPhi(resolver, curState.localAt(index), suxState.localAt(index)); |
1294 } | 1288 } |
1295 | |
1296 assert curState.scope().callerState == suxState.scope().callerState : "caller states must be equal"; | |
1297 resolver.dispose(); | 1289 resolver.dispose(); |
1298 } | 1290 } |
1299 } | 1291 } |
1300 } | 1292 } |
1301 | 1293 |
1388 for (int index = 0; index < state.stackSize(); index++) { | 1380 for (int index = 0; index < state.stackSize(); index++) { |
1389 walkStateValue(state.stackAt(index)); | 1381 walkStateValue(state.stackAt(index)); |
1390 } | 1382 } |
1391 FrameState s = state; | 1383 FrameState s = state; |
1392 int bci = x.bci(); | 1384 int bci = x.bci(); |
1393 | 1385 if (bci == Instruction.SYNCHRONIZATION_ENTRY_BCI) { |
1394 while (s != null) { | 1386 assert x instanceof ExceptionObject || |
1395 IRScope scope = s.scope(); | 1387 x instanceof Throw || |
1396 if (bci == Instruction.SYNCHRONIZATION_ENTRY_BCI) { | 1388 x instanceof MonitorEnter || |
1397 assert x instanceof ExceptionObject || | 1389 x instanceof MonitorExit : x + ", " + x.getClass(); |
1398 x instanceof Throw || | 1390 } |
1399 x instanceof MonitorEnter || | 1391 |
1400 x instanceof MonitorExit : x + ", " + x.getClass(); | 1392 for (int index = 0; index < s.localsSize(); index++) { |
1401 } | 1393 final Value value = s.localAt(index); |
1402 | 1394 if (value != null) { |
1403 for (int index = 0; index < s.localsSize(); index++) { | 1395 if (!value.isIllegal()) { |
1404 final Value value = s.localAt(index); | 1396 walkStateValue(value); |
1405 if (value != null) { | |
1406 if (!value.isIllegal()) { | |
1407 walkStateValue(value); | |
1408 } | |
1409 } | 1397 } |
1410 } | 1398 } |
1411 bci = scope.callerBCI(); | |
1412 s = s.callerState(); | |
1413 } | 1399 } |
1414 } | 1400 } |
1415 | 1401 |
1416 private void walkStateValue(Value value) { | 1402 private void walkStateValue(Value value) { |
1417 if (value != null) { | 1403 if (value != null) { |