Mercurial > hg > truffle
comparison graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java @ 2852:c6bdec623ef9
Move TypeCHeck to floating nodes, rename Nodes to aboid using an *Op suffix
author | Gilles Duboscq <gilles.duboscq@oracle.com> |
---|---|
date | Tue, 07 Jun 2011 12:10:27 +0200 |
parents | 7474789a8120 |
children | 0635ba16afe4 |
comparison
equal
deleted
inserted
replaced
2851:14708c03abba | 2852:c6bdec623ef9 |
---|---|
541 } | 541 } |
542 | 542 |
543 private void genArithmeticOp(CiKind result, int opcode, CiKind x, CiKind y, boolean canTrap) { | 543 private void genArithmeticOp(CiKind result, int opcode, CiKind x, CiKind y, boolean canTrap) { |
544 Value yValue = frameState.pop(y); | 544 Value yValue = frameState.pop(y); |
545 Value xValue = frameState.pop(x); | 545 Value xValue = frameState.pop(x); |
546 Value result1 = append(new ArithmeticOp(opcode, result, xValue, yValue, isStrict(method.accessFlags()), canTrap, graph)); | 546 Value result1 = append(new Arithmetic(opcode, result, xValue, yValue, isStrict(method.accessFlags()), canTrap, graph)); |
547 frameState.push(result, result1); | 547 frameState.push(result, result1); |
548 } | 548 } |
549 | 549 |
550 private void genNegateOp(CiKind kind) { | 550 private void genNegateOp(CiKind kind) { |
551 frameState.push(kind, append(new NegateOp(frameState.pop(kind), graph))); | 551 frameState.push(kind, append(new Negate(frameState.pop(kind), graph))); |
552 } | 552 } |
553 | 553 |
554 private void genShiftOp(CiKind kind, int opcode) { | 554 private void genShiftOp(CiKind kind, int opcode) { |
555 Value s = frameState.ipop(); | 555 Value s = frameState.ipop(); |
556 Value x = frameState.pop(kind); | 556 Value x = frameState.pop(kind); |
557 frameState.push(kind, append(new ShiftOp(opcode, x, s, graph))); | 557 frameState.push(kind, append(new Shift(opcode, x, s, graph))); |
558 } | 558 } |
559 | 559 |
560 private void genLogicOp(CiKind kind, int opcode) { | 560 private void genLogicOp(CiKind kind, int opcode) { |
561 Value y = frameState.pop(kind); | 561 Value y = frameState.pop(kind); |
562 Value x = frameState.pop(kind); | 562 Value x = frameState.pop(kind); |
563 frameState.push(kind, append(new LogicOp(opcode, x, y, graph))); | 563 frameState.push(kind, append(new Logic(opcode, x, y, graph))); |
564 } | 564 } |
565 | 565 |
566 private void genCompareOp(CiKind kind, int opcode, CiKind resultKind) { | 566 private void genCompareOp(CiKind kind, int opcode, CiKind resultKind) { |
567 Value y = frameState.pop(kind); | 567 Value y = frameState.pop(kind); |
568 Value x = frameState.pop(kind); | 568 Value x = frameState.pop(kind); |
569 Value value = append(new CompareOp(opcode, resultKind, x, y, graph)); | 569 Value value = append(new Compare(opcode, resultKind, x, y, graph)); |
570 if (!resultKind.isVoid()) { | 570 if (!resultKind.isVoid()) { |
571 frameState.ipush(value); | 571 frameState.ipush(value); |
572 } | 572 } |
573 } | 573 } |
574 | 574 |
580 private void genIncrement() { | 580 private void genIncrement() { |
581 int index = stream().readLocalIndex(); | 581 int index = stream().readLocalIndex(); |
582 int delta = stream().readIncrement(); | 582 int delta = stream().readIncrement(); |
583 Value x = frameState.localAt(index); | 583 Value x = frameState.localAt(index); |
584 Value y = append(Constant.forInt(delta, graph)); | 584 Value y = append(Constant.forInt(delta, graph)); |
585 frameState.storeLocal(index, append(new ArithmeticOp(IADD, CiKind.Int, x, y, isStrict(method.accessFlags()), false, graph))); | 585 frameState.storeLocal(index, append(new Arithmetic(IADD, CiKind.Int, x, y, isStrict(method.accessFlags()), false, graph))); |
586 } | 586 } |
587 | 587 |
588 private void genGoto(int fromBCI, int toBCI) { | 588 private void genGoto(int fromBCI, int toBCI) { |
589 appendGoto(createTargetAt(toBCI, frameState)); | 589 appendGoto(createTargetAt(toBCI, frameState)); |
590 } | 590 } |