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

Unified Diff: runtime/vm/flow_graph_compiler_arm.cc

Issue 12776006: Make allocation of Dart parameters and local variables architecture independent. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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_arm.cc
===================================================================
--- runtime/vm/flow_graph_compiler_arm.cc (revision 20045)
+++ runtime/vm/flow_graph_compiler_arm.cc (working copy)
@@ -187,7 +187,22 @@
const bool can_optimize = !is_optimizing() || may_reoptimize();
const Register function_reg = R6;
if (can_optimize) {
- __ LoadObject(function_reg, function);
+ // The pool pointer is not setup before entering the Dart frame.
+
+ // Preserve PP of caller.
+ __ mov(R7, ShifterOperand(PP));
+
+ // Temporarily setup pool pointer for this dart function.
+ const intptr_t object_pool_pc_dist =
+ Instructions::HeaderSize() - Instructions::object_pool_offset() +
+ assembler()->CodeSize() + Instr::kPCReadOffset;
+ __ ldr(PP, Address(PC, -object_pool_pc_dist));
+
+ // Load function object from object pool.
+ __ LoadObject(function_reg, function); // Uses PP.
+
+ // Restore PP of caller.
+ __ mov(PP, ShifterOperand(R7));
}
// Patch point is after the eventually inlined function object.
AddCurrentDescriptor(PcDescriptors::kEntryPatch,

Powered by Google App Engine
This is Rietveld 408576698