| Index: runtime/vm/flow_graph_compiler_x64.cc
|
| diff --git a/runtime/vm/flow_graph_compiler_x64.cc b/runtime/vm/flow_graph_compiler_x64.cc
|
| index 3f2a1529539004e989e06460ab57e415294fc37e..cd0580c12eddcfc2914cb5a654553215baa11e69 100644
|
| --- a/runtime/vm/flow_graph_compiler_x64.cc
|
| +++ b/runtime/vm/flow_graph_compiler_x64.cc
|
| @@ -69,21 +69,6 @@ void FlowGraphCompiler::VisitConstant(ConstantVal* val) {
|
| }
|
|
|
|
|
| -void FlowGraphCompiler::VisitCopyTemp(CopyTempComp* comp) {
|
| - // Index is a stack index. Semantics is to produce a duplicate of the
|
| - // temp at index.
|
| - __ movq(RAX, Address(RSP, comp->index() * (-kWordSize)));
|
| -}
|
| -
|
| -
|
| -void FlowGraphCompiler::VisitSetTemp(SetTempComp* comp) {
|
| - // Index is a stack index. Semantics is to store a (copy of) the TOS in
|
| - // the temp at index.
|
| - __ movq(RAX, Address(RSP, 0));
|
| - __ movq(Address(RSP, comp->index() * (-kWordSize)), RAX);
|
| -}
|
| -
|
| -
|
| void FlowGraphCompiler::VisitAssertAssignable(AssertAssignableComp* comp) {
|
| Bailout("AssertAssignableComp");
|
| }
|
| @@ -285,6 +270,28 @@ void FlowGraphCompiler::VisitTargetEntry(TargetEntryInstr* instr) {
|
| }
|
|
|
|
|
| +void FlowGraphCompiler::VisitPickTemp(PickTempInstr* instr) {
|
| + // Semantics is to copy a stack-allocated temporary to the top of stack.
|
| + // Destination index d is assumed the new top of stack after the
|
| + // operation, so d-1 is the current top of stack and so d-s-1 is the
|
| + // offset to source index s.
|
| + intptr_t offset = instr->destination() - instr->source() - 1;
|
| + ASSERT(offset >= 0);
|
| + __ pushq(Address(RSP, offset * kWordSize));
|
| +}
|
| +
|
| +
|
| +void FlowGraphCompiler::VisitTuckTemp(TuckTempInstr* instr) {
|
| + // Semantics is to assign to a stack-allocated temporary a copy of the top
|
| + // of stack. Source index s is assumed the top of stack, s-d is the
|
| + // offset to destination index d.
|
| + intptr_t offset = instr->source() - instr->destination();
|
| + ASSERT(offset >= 0);
|
| + __ movq(RAX, Address(RSP, 0));
|
| + __ movq(Address(RSP, offset * kWordSize), RAX);
|
| +}
|
| +
|
| +
|
| void FlowGraphCompiler::VisitDo(DoInstr* instr) {
|
| instr->computation()->Accept(this);
|
| }
|
|
|