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

Unified Diff: runtime/vm/flow_graph_compiler_arm64.cc

Issue 1192103004: VM: New calling convention for generated code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: ia32 port, addressed comments Created 5 years, 3 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_arm64.cc
diff --git a/runtime/vm/flow_graph_compiler_arm64.cc b/runtime/vm/flow_graph_compiler_arm64.cc
index 11bc02db2c00b7852e92c3db03510eaae692fb51..f26595367845b7ad4338e4f9c6a2ce07d84fd953 100644
--- a/runtime/vm/flow_graph_compiler_arm64.cc
+++ b/runtime/vm/flow_graph_compiler_arm64.cc
@@ -183,7 +183,7 @@ void CompilerDeoptInfoWithStub::GenerateCode(FlowGraphCompiler* compiler,
}
ASSERT(deopt_env() != NULL);
-
+ __ Push(CODE_REG);
__ BranchLink(*StubCode::Deoptimize_entry());
set_pc_offset(assem->CodeSize());
#undef __
@@ -911,12 +911,8 @@ void FlowGraphCompiler::CopyParameters() {
__ Bind(&wrong_num_arguments);
if (function.IsClosureFunction()) {
- ASSERT(assembler()->constant_pool_allowed());
- __ LeaveDartFrame(); // The arguments are still on the stack.
- // Do not use caller's pool ptr in branch.
- ASSERT(!assembler()->constant_pool_allowed());
+ __ LeaveDartFrame(kKeepCalleePP); // The arguments are still on the stack.
__ BranchPatchable(*StubCode::CallClosureNoSuchMethod_entry());
- __ set_constant_pool_allowed(true);
// The noSuchMethod call may return to the caller, but not here.
} else if (check_correct_named_args) {
__ Stop("Wrong arguments");
@@ -985,9 +981,6 @@ void FlowGraphCompiler::EmitFrameEntry() {
// Load function object using the callee's pool pointer.
__ LoadFunctionFromCalleePool(function_reg, function, new_pp);
- // Patch point is after the eventually inlined function object.
- entry_patch_pc_offset_ = assembler()->CodeSize();
-
__ LoadFieldFromOffset(
R7, function_reg, Function::usage_counter_offset(), kWord);
// Reoptimization of an optimized function is triggered by counting in
@@ -1001,10 +994,8 @@ void FlowGraphCompiler::EmitFrameEntry() {
ASSERT(function_reg == R6);
Label dont_optimize;
__ b(&dont_optimize, LT);
- __ Branch(*StubCode::OptimizeFunction_entry());
+ __ Branch(*StubCode::OptimizeFunction_entry(), new_pp);
__ Bind(&dont_optimize);
- } else if (!flow_graph().IsCompiledForOsr()) {
- entry_patch_pc_offset_ = assembler()->CodeSize();
}
__ Comment("Enter frame");
if (flow_graph().IsCompiledForOsr()) {
@@ -1066,12 +1057,8 @@ void FlowGraphCompiler::CompileGraph() {
__ b(&correct_num_arguments, EQ);
__ Bind(&wrong_num_arguments);
if (function.IsClosureFunction()) {
- ASSERT(assembler()->constant_pool_allowed());
- __ LeaveDartFrame(); // The arguments are still on the stack.
- // Do not use caller's pool ptr in branch.
- ASSERT(!assembler()->constant_pool_allowed());
+ __ LeaveDartFrame(kKeepCalleePP); // Arguments are still on the stack.
__ BranchPatchable(*StubCode::CallClosureNoSuchMethod_entry());
- __ set_constant_pool_allowed(true);
// The noSuchMethod call may return to the caller, but not here.
} else {
__ Stop("Wrong number of arguments");
@@ -1125,11 +1112,6 @@ void FlowGraphCompiler::CompileGraph() {
ASSERT(assembler()->constant_pool_allowed());
GenerateDeferredCode();
- // Emit function patching code. This will be swapped with the first 3
- // instructions at entry point.
- patch_code_pc_offset_ = assembler()->CodeSize();
- __ BranchPatchable(*StubCode::FixCallersTarget_entry());
-
if (is_optimizing()) {
lazy_deopt_pc_offset_ = assembler()->CodeSize();
__ BranchPatchable(*StubCode::DeoptimizeLazy_entry());

Powered by Google App Engine
This is Rietveld 408576698