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

Unified Diff: runtime/vm/flow_graph_compiler_x64.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_x64.cc
diff --git a/runtime/vm/flow_graph_compiler_x64.cc b/runtime/vm/flow_graph_compiler_x64.cc
index 30787628fc46ef21b83479fbd06169f6a8cac577..0f8900819784d87519c9ca9eddd894701b68d113 100644
--- a/runtime/vm/flow_graph_compiler_x64.cc
+++ b/runtime/vm/flow_graph_compiler_x64.cc
@@ -599,7 +599,7 @@ void FlowGraphCompiler::GenerateInstanceOf(intptr_t token_pos,
__ pushq(RDX); // Instantiator type arguments.
__ LoadObject(RAX, test_cache, PP);
__ pushq(RAX);
- GenerateCallRuntime(token_pos,
+ GenerateRuntimeCall(token_pos,
deopt_id,
kInstanceofRuntimeEntry,
5,
@@ -682,7 +682,7 @@ void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos,
__ pushq(RAX); // Push the source object.
__ PushObject(dst_name, PP); // Push the name of the destination.
__ PushObject(error_message, PP);
- GenerateCallRuntime(token_pos,
+ GenerateRuntimeCall(token_pos,
deopt_id,
kMalformedTypeErrorRuntimeEntry,
3,
@@ -712,7 +712,7 @@ void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos,
__ PushObject(dst_name, PP); // Push the name of the destination.
__ LoadObject(RAX, test_cache, PP);
__ pushq(RAX);
- 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.
__ Drop(6);
@@ -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,
@@ -1541,10 +1541,11 @@ void FlowGraphCompiler::EmitEqualityRegRegCompare(Register left,
}
-// This function must be in sync with FlowGraphCompiler::RecordSafepoint.
+// This function must be in sync with FlowGraphCompiler::RecordSafepoint and
+// FlowGraphCompiler::SlowPathEnvironmentFor.
void FlowGraphCompiler::SaveLiveRegisters(LocationSummary* locs) {
// TODO(vegorov): consider saving only caller save (volatile) registers.
- const intptr_t xmm_regs_count = locs->live_registers()->fpu_regs_count();
+ const intptr_t xmm_regs_count = locs->live_registers()->FpuRegisterCount();
if (xmm_regs_count > 0) {
__ AddImmediate(RSP, Immediate(-xmm_regs_count * kFpuRegisterSize), PP);
// Store XMM registers with the lowest register number at the lowest
@@ -1581,7 +1582,7 @@ void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) {
}
}
- const intptr_t xmm_regs_count = locs->live_registers()->fpu_regs_count();
+ const intptr_t xmm_regs_count = locs->live_registers()->FpuRegisterCount();
if (xmm_regs_count > 0) {
// XMM registers have the lowest register number at the lowest address.
intptr_t offset = 0;

Powered by Google App Engine
This is Rietveld 408576698