Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1533)

Unified Diff: runtime/vm/flow_graph_compiler_mips.cc

Issue 26823006: Record a correct deoptimization environment for slow-path code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use an environment value's representation to decide its size. Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/flow_graph_compiler_mips.cc
diff --git a/runtime/vm/flow_graph_compiler_mips.cc b/runtime/vm/flow_graph_compiler_mips.cc
index e18577ec42846906fe56771abe1b884a0c87c92b..4d6c427a79581577f0d9f6bbec721a94892b924c 100644
--- a/runtime/vm/flow_graph_compiler_mips.cc
+++ b/runtime/vm/flow_graph_compiler_mips.cc
@@ -603,7 +603,7 @@ void FlowGraphCompiler::GenerateInstanceOf(intptr_t token_pos,
__ sw(A1, Address(SP, 1 * kWordSize)); // Push type arguments.
__ LoadObject(A0, test_cache);
__ sw(A0, Address(SP, 0 * kWordSize));
- GenerateCallRuntime(token_pos, deopt_id, kInstanceofRuntimeEntry, 5, locs);
+ GenerateRuntimeCall(token_pos, deopt_id, kInstanceofRuntimeEntry, 5, locs);
// Pop the parameters supplied to the runtime entry. The result of the
// instanceof runtime call will be left as the result of the operation.
__ lw(T0, Address(SP, 5 * kWordSize));
@@ -691,7 +691,7 @@ void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos,
__ LoadObject(TMP1, error_message);
__ sw(TMP1, Address(SP, 0 * kWordSize));
- GenerateCallRuntime(token_pos,
+ GenerateRuntimeCall(token_pos,
deopt_id,
kMalformedTypeErrorRuntimeEntry,
3,
@@ -730,7 +730,7 @@ void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos,
__ LoadObject(T0, test_cache);
__ sw(T0, Address(SP, 0 * kWordSize));
- GenerateCallRuntime(token_pos, deopt_id, kTypeCheckRuntimeEntry, 6, locs);
+ GenerateRuntimeCall(token_pos, deopt_id, kTypeCheckRuntimeEntry, 6, locs);
// Pop the parameters supplied to the runtime entry. The result of the
// type check runtime call is the checked value.
__ lw(A0, Address(SP, 6 * kWordSize));
@@ -1272,7 +1272,7 @@ void FlowGraphCompiler::GenerateDartCall(intptr_t deopt_id,
}
-void FlowGraphCompiler::GenerateCallRuntime(intptr_t token_pos,
+void FlowGraphCompiler::GenerateRuntimeCall(intptr_t token_pos,
intptr_t deopt_id,
const RuntimeEntry& entry,
intptr_t argument_count,
@@ -1552,10 +1552,12 @@ void FlowGraphCompiler::EmitEqualityRegRegCompare(Register left,
}
+// This function must be in sync with FlowGraphCompiler::RecordSafepoint and
+// FlowGraphCompiler::SlowPathEnvironmentFor.
void FlowGraphCompiler::SaveLiveRegisters(LocationSummary* locs) {
__ TraceSimMsg("SaveLiveRegisters");
// TODO(vegorov): consider saving only caller save (volatile) registers.
- const intptr_t fpu_regs_count= locs->live_registers()->fpu_regs_count();
+ const intptr_t fpu_regs_count= locs->live_registers()->FpuRegisterCount();
if (fpu_regs_count > 0) {
__ AddImmediate(SP, -(fpu_regs_count * kFpuRegisterSize));
// Store fpu registers with the lowest register number at the lowest
@@ -1607,7 +1609,7 @@ void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) {
}
__ addiu(SP, SP, Immediate(register_count * kWordSize));
- const intptr_t fpu_regs_count = locs->live_registers()->fpu_regs_count();
+ const intptr_t fpu_regs_count = locs->live_registers()->FpuRegisterCount();
if (fpu_regs_count > 0) {
// Fpu registers have the lowest register number at the lowest address.
intptr_t offset = 0;

Powered by Google App Engine
This is Rietveld 408576698