comparison graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java @ 14948:bc72e5ed9752

AbstractBytecodeParser: rename ifNode to genIf.
author Josef Eisl <josef.eisl@jku.at>
date Wed, 02 Apr 2014 10:08:00 +0200
parents 3825cf50cc5a
children 20b3db86b1fa
comparison
equal deleted inserted replaced
14947:3825cf50cc5a 14948:bc72e5ed9752
586 @Override 586 @Override
587 protected ValueNode genUnique(ValueNode x) { 587 protected ValueNode genUnique(ValueNode x) {
588 return (ValueNode) currentGraph.unique((Node & ValueNumberable) x); 588 return (ValueNode) currentGraph.unique((Node & ValueNumberable) x);
589 } 589 }
590 590
591 protected ValueNode genIf(ValueNode condition, ValueNode falseSuccessor, ValueNode trueSuccessor, double d) { 591 protected ValueNode genIfNode(ValueNode condition, ValueNode falseSuccessor, ValueNode trueSuccessor, double d) {
592 return new IfNode((LogicNode) condition, (FixedNode) falseSuccessor, (FixedNode) trueSuccessor, d); 592 return new IfNode((LogicNode) condition, (FixedNode) falseSuccessor, (FixedNode) trueSuccessor, d);
593 } 593 }
594 594
595 @Override 595 @Override
596 protected void genThrow() { 596 protected void genThrow() {
1370 } 1370 }
1371 } 1371 }
1372 } 1372 }
1373 1373
1374 @Override 1374 @Override
1375 protected void ifNode(ValueNode x, Condition cond, ValueNode y) { 1375 protected void genIf(ValueNode x, Condition cond, ValueNode y) {
1376 // assert !x.isDeleted() && !y.isDeleted(); 1376 // assert !x.isDeleted() && !y.isDeleted();
1377 // assert currentBlock.numNormalSuccessors() == 2; 1377 // assert currentBlock.numNormalSuccessors() == 2;
1378 assert currentBlock.getSuccessors().size() == 2; 1378 assert currentBlock.getSuccessors().size() == 2;
1379 BciBlock trueBlock = currentBlock.getSuccessors().get(0); 1379 BciBlock trueBlock = currentBlock.getSuccessors().get(0);
1380 BciBlock falseBlock = currentBlock.getSuccessors().get(1); 1380 BciBlock falseBlock = currentBlock.getSuccessors().get(1);
1420 condition = genUnique(condition); 1420 condition = genUnique(condition);
1421 1421
1422 ValueNode trueSuccessor = createBlockTarget(probability, trueBlock, frameState); 1422 ValueNode trueSuccessor = createBlockTarget(probability, trueBlock, frameState);
1423 ValueNode falseSuccessor = createBlockTarget(1 - probability, falseBlock, frameState); 1423 ValueNode falseSuccessor = createBlockTarget(1 - probability, falseBlock, frameState);
1424 1424
1425 ValueNode ifNode = negate ? genIf(condition, falseSuccessor, trueSuccessor, 1 - probability) : genIf(condition, trueSuccessor, falseSuccessor, probability); 1425 ValueNode ifNode = negate ? genIfNode(condition, falseSuccessor, trueSuccessor, 1 - probability) : genIfNode(condition, trueSuccessor, falseSuccessor, probability);
1426 append(ifNode); 1426 append(ifNode);
1427 } 1427 }
1428 1428
1429 } 1429 }
1430 } 1430 }