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

Unified Diff: src/arm/macro-assembler-arm.cc

Issue 8111006: Allow new-space JSFunction objects as constant-function properties. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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: src/arm/macro-assembler-arm.cc
===================================================================
--- src/arm/macro-assembler-arm.cc (revision 9574)
+++ src/arm/macro-assembler-arm.cc (working copy)
@@ -407,6 +407,19 @@
}
+void MacroAssembler::LoadHeapObject(Register result,
+ Handle<HeapObject> object) {
+ if (isolate()->heap()->InNewSpace(*object)) {
+ Handle<JSGlobalPropertyCell> cell =
+ isolate()->factory()->NewJSGlobalPropertyCell(object);
+ mov(result, Operand(cell));
+ ldr(result, FieldMemOperand(result, JSGlobalPropertyCell::kValueOffset));
+ } else {
+ mov(result, Operand(object));
+ }
+}
+
+
void MacroAssembler::InNewSpace(Register object,
Register scratch,
Condition cond,
@@ -1104,7 +1117,7 @@
ASSERT(function->is_compiled());
// Get the function and setup the context.
- mov(r1, Operand(Handle<JSFunction>(function)));
+ LoadHeapObject(r1, Handle<JSFunction>(function));
Vyacheslav Egorov (Chromium) 2011/10/12 12:36:05 Some callers of InvokeFunction are not handlified
ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset));
// Invoke the cached code.

Powered by Google App Engine
This is Rietveld 408576698