| Index: src/ic/arm/handler-compiler-arm.cc
|
| diff --git a/src/ic/arm/handler-compiler-arm.cc b/src/ic/arm/handler-compiler-arm.cc
|
| index 8827d36bf26fa50d13601de6b2c212b80fd081c4..9221a4dfb34d39a572a56ce738b7efd60e1f608d 100644
|
| --- a/src/ic/arm/handler-compiler-arm.cc
|
| +++ b/src/ic/arm/handler-compiler-arm.cc
|
| @@ -140,26 +140,16 @@ void PropertyHandlerCompiler::GenerateDictionaryNegativeLookup(
|
|
|
|
|
| void NamedLoadHandlerCompiler::GenerateDirectLoadGlobalFunctionPrototype(
|
| - MacroAssembler* masm, int index, Register prototype, Label* miss) {
|
| - Isolate* isolate = masm->isolate();
|
| - // Get the global function with the given index.
|
| - Handle<JSFunction> function(
|
| - JSFunction::cast(isolate->native_context()->get(index)));
|
| -
|
| - // Check we're still in the same context.
|
| - Register scratch = prototype;
|
| + MacroAssembler* masm, int index, Register result, Label* miss) {
|
| const int offset = Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX);
|
| - __ ldr(scratch, MemOperand(cp, offset));
|
| - __ ldr(scratch, FieldMemOperand(scratch, GlobalObject::kNativeContextOffset));
|
| - __ ldr(scratch, MemOperand(scratch, Context::SlotOffset(index)));
|
| - __ Move(ip, function);
|
| - __ cmp(ip, scratch);
|
| - __ b(ne, miss);
|
| -
|
| + __ ldr(result, MemOperand(cp, offset));
|
| + __ ldr(result, FieldMemOperand(result, GlobalObject::kNativeContextOffset));
|
| + __ ldr(result, MemOperand(result, Context::SlotOffset(index)));
|
| // Load its initial map. The global functions all have initial maps.
|
| - __ Move(prototype, Handle<Map>(function->initial_map()));
|
| + __ ldr(result,
|
| + FieldMemOperand(result, JSFunction::kPrototypeOrInitialMapOffset));
|
| // Load the prototype from the initial map.
|
| - __ ldr(prototype, FieldMemOperand(prototype, Map::kPrototypeOffset));
|
| + __ ldr(result, FieldMemOperand(result, Map::kPrototypeOffset));
|
| }
|
|
|
|
|
|
|