Mercurial > hg > truffle
comparison graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java @ 14633:da2431cc1506
Rename ValueNode kind() to getKind().
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Thu, 20 Mar 2014 11:48:39 +0100 |
parents | 4ff08c0366ae |
children | 6ce6c4ccba8f |
comparison
equal
deleted
inserted
replaced
14632:5f5e2711dc24 | 14633:da2431cc1506 |
---|---|
307 @Override | 307 @Override |
308 public Value setResult(ValueNode x, Value operand) { | 308 public Value setResult(ValueNode x, Value operand) { |
309 assert (!isRegister(operand) || !attributes(asRegister(operand)).isAllocatable()); | 309 assert (!isRegister(operand) || !attributes(asRegister(operand)).isAllocatable()); |
310 assert nodeOperands == null || nodeOperands.get(x) == null : "operand cannot be set twice"; | 310 assert nodeOperands == null || nodeOperands.get(x) == null : "operand cannot be set twice"; |
311 assert operand != null && isLegal(operand) : "operand must be legal"; | 311 assert operand != null && isLegal(operand) : "operand must be legal"; |
312 assert operand.getKind().getStackKind() == x.kind() || x.kind() == Kind.Illegal : operand.getKind().getStackKind() + " must match " + x.kind(); | 312 assert operand.getKind().getStackKind() == x.getKind() || x.getKind() == Kind.Illegal : operand.getKind().getStackKind() + " must match " + x.getKind(); |
313 assert !(x instanceof VirtualObjectNode); | 313 assert !(x instanceof VirtualObjectNode); |
314 nodeOperands.set(x, operand); | 314 nodeOperands.set(x, operand); |
315 return operand; | 315 return operand; |
316 } | 316 } |
317 | 317 |
538 | 538 |
539 emitIncomingValues(params); | 539 emitIncomingValues(params); |
540 | 540 |
541 for (ParameterNode param : graph.getNodes(ParameterNode.class)) { | 541 for (ParameterNode param : graph.getNodes(ParameterNode.class)) { |
542 Value paramValue = params[param.index()]; | 542 Value paramValue = params[param.index()]; |
543 assert paramValue.getKind() == param.kind().getStackKind(); | 543 assert paramValue.getKind() == param.getKind().getStackKind(); |
544 setResult(param, emitMove(paramValue)); | 544 setResult(param, emitMove(paramValue)); |
545 } | 545 } |
546 } | 546 } |
547 | 547 |
548 public void emitIncomingValues(Value[] params) { | 548 public void emitIncomingValues(Value[] params) { |
551 | 551 |
552 @Override | 552 @Override |
553 public void visitReturn(ReturnNode x) { | 553 public void visitReturn(ReturnNode x) { |
554 AllocatableValue operand = ILLEGAL; | 554 AllocatableValue operand = ILLEGAL; |
555 if (x.result() != null) { | 555 if (x.result() != null) { |
556 operand = resultOperandFor(x.result().kind()); | 556 operand = resultOperandFor(x.result().getKind()); |
557 emitMove(operand, operand(x.result())); | 557 emitMove(operand, operand(x.result())); |
558 } | 558 } |
559 emitReturn(operand); | 559 emitReturn(operand); |
560 } | 560 } |
561 | 561 |
592 | 592 |
593 append(new JumpOp(getLIRBlock(merge))); | 593 append(new JumpOp(getLIRBlock(merge))); |
594 } | 594 } |
595 | 595 |
596 protected PlatformKind getPhiKind(PhiNode phi) { | 596 protected PlatformKind getPhiKind(PhiNode phi) { |
597 return phi.kind(); | 597 return phi.getKind(); |
598 } | 598 } |
599 | 599 |
600 private Value operandForPhi(PhiNode phi) { | 600 private Value operandForPhi(PhiNode phi) { |
601 assert phi.type() == PhiType.Value : "wrong phi type: " + phi; | 601 assert phi.type() == PhiType.Value : "wrong phi type: " + phi; |
602 Value result = operand(phi); | 602 Value result = operand(phi); |