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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 1756403002: VM: Add smi fast path operations for precompiled code (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: addressed comments Created 4 years, 10 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
« no previous file with comments | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler.cc
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index 80b3e88d6ccfe86479af8ef1fae647f0903a3ed4..1ca6adc4a1d0f3cd4f441f043c8ce939d5847781 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -808,7 +808,8 @@ void FlowGraphCompiler::AddDeoptIndexAtCall(intptr_t deopt_id,
// and FlowGraphCompiler::SlowPathEnvironmentFor.
// See StackFrame::VisitObjectPointers for the details of how stack map is
// interpreted.
-void FlowGraphCompiler::RecordSafepoint(LocationSummary* locs) {
+void FlowGraphCompiler::RecordSafepoint(LocationSummary* locs,
+ intptr_t slow_path_argument_count) {
if (is_optimizing() || locs->live_registers()->HasUntaggedValues()) {
const intptr_t spill_area_size = is_optimizing() ?
flow_graph_.graph_entry()->spill_slot_count() : 0;
@@ -868,10 +869,17 @@ void FlowGraphCompiler::RecordSafepoint(LocationSummary* locs) {
}
}
- intptr_t register_bit_count = bitmap->Length() - spill_area_size;
+ // Arguments pushed on top of live registers in the slow path are tagged.
+ for (intptr_t i = 0; i < slow_path_argument_count; ++i) {
+ bitmap->Set(bitmap->Length(), true);
+ }
+
+ // The slow path area Outside the spill area contains are live registers
+ // and pushed arguments for calls inside the slow path.
+ intptr_t slow_path_bit_count = bitmap->Length() - spill_area_size;
stackmap_table_builder()->AddEntry(assembler()->CodeSize(),
bitmap,
- register_bit_count);
+ slow_path_bit_count);
}
}
@@ -1153,7 +1161,8 @@ void FlowGraphCompiler::GenerateInstanceCall(
}
if (FLAG_always_megamorphic_calls) {
EmitMegamorphicInstanceCall(ic_data, argument_count,
- deopt_id, token_pos, locs);
+ deopt_id, token_pos, locs,
+ CatchClauseNode::kInvalidTryIndex);
return;
}
ASSERT(!ic_data.IsNull());
@@ -1180,7 +1189,8 @@ void FlowGraphCompiler::GenerateInstanceCall(
if (is_optimizing()) {
EmitMegamorphicInstanceCall(ic_data, argument_count,
- deopt_id, token_pos, locs);
+ deopt_id, token_pos, locs,
+ CatchClauseNode::kInvalidTryIndex);
return;
}
« no previous file with comments | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698