diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-12-14 15:02:32 -0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-12-14 15:02:32 -0800 |
commit | b3a7de15b7f06e11bd326b60b0e5ffd762ae71c5 (patch) | |
tree | 5bd6feac02a7c9eed1fbc03fc678e952ab3a852f /deps/v8/src/arm/macro-assembler-arm.cc | |
parent | be23c51f6979ef5fd519069a62648d81f25b2ec0 (diff) | |
download | node-new-b3a7de15b7f06e11bd326b60b0e5ffd762ae71c5.tar.gz |
Upgrade V8 to 3.8.0
Diffstat (limited to 'deps/v8/src/arm/macro-assembler-arm.cc')
-rw-r--r-- | deps/v8/src/arm/macro-assembler-arm.cc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/deps/v8/src/arm/macro-assembler-arm.cc b/deps/v8/src/arm/macro-assembler-arm.cc index 4fc3b03abf..59a5e5ba79 100644 --- a/deps/v8/src/arm/macro-assembler-arm.cc +++ b/deps/v8/src/arm/macro-assembler-arm.cc @@ -407,6 +407,19 @@ void MacroAssembler::StoreRoot(Register source, } +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, @@ -1111,7 +1124,7 @@ void MacroAssembler::InvokeFunction(Handle<JSFunction> function, ASSERT(flag == JUMP_FUNCTION || has_frame()); // Get the function and setup the context. - mov(r1, Operand(function)); + LoadHeapObject(r1, function); ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); ParameterCount expected(function->shared()->formal_parameter_count()); |