| 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 612f84423f2f561b70801639693d01728e372aac..00d2f28e6471efe770949cdfa4e6fb65ed463ae3 100644
|
| --- a/runtime/vm/flow_graph_compiler_x64.cc
|
| +++ b/runtime/vm/flow_graph_compiler_x64.cc
|
| @@ -634,14 +634,13 @@ void FlowGraphCompiler::EmitInstructionPrologue(Instruction* instr) {
|
| LocationSummary* locs = instr->locs();
|
| ASSERT(locs != NULL);
|
|
|
| - locs->AllocateRegisters();
|
| + frame_register_allocator()->AllocateRegisters(instr);
|
|
|
| - // Load instruction inputs into allocated registers.
|
| - for (intptr_t i = locs->input_count() - 1; i >= 0; i--) {
|
| - Location loc = locs->in(i);
|
| - ASSERT(loc.kind() == Location::kRegister);
|
| - __ popq(loc.reg());
|
| - }
|
| + // TODO(vegorov): adjust assertion when we start removing comparison from the
|
| + // graph when it is merged with a branch.
|
| + ASSERT(locs->is_call() ||
|
| + (instr->IsBranch() && instr->AsBranch()->is_fused_with_comparison()) ||
|
| + (locs->input_count() == instr->InputCount()));
|
| }
|
|
|
|
|
| @@ -989,6 +988,7 @@ void FlowGraphCompiler::GenerateCall(intptr_t token_index,
|
| intptr_t try_index,
|
| const ExternalLabel* label,
|
| PcDescriptors::Kind kind) {
|
| + ASSERT(frame_register_allocator()->IsSpilled());
|
| __ call(label);
|
| AddCurrentDescriptor(kind, AstNode::kNoId, token_index, try_index);
|
| }
|
| @@ -998,6 +998,7 @@ void FlowGraphCompiler::GenerateCallRuntime(intptr_t cid,
|
| intptr_t token_index,
|
| intptr_t try_index,
|
| const RuntimeEntry& entry) {
|
| + ASSERT(frame_register_allocator()->IsSpilled());
|
| __ CallRuntime(entry);
|
| AddCurrentDescriptor(PcDescriptors::kOther, cid, token_index, try_index);
|
| }
|
|
|