Index: src/x64/stub-cache-x64.cc |
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc |
index 39d4c6ff1bdb6b40f0651084112e0ab68a842887..0caffac10825f999069ef27eb621d8fbd8ed6c1e 100644 |
--- a/src/x64/stub-cache-x64.cc |
+++ b/src/x64/stub-cache-x64.cc |
@@ -229,10 +229,10 @@ void StubCompiler::GenerateLoadGlobalFunctionPrototype(MacroAssembler* masm, |
// Load the global or builtins object from the current context. |
__ movq(prototype, |
Operand(rsi, Context::SlotOffset(Context::GLOBAL_INDEX))); |
- // Load the global context from the global or builtins object. |
+ // Load the native context from the global or builtins object. |
__ movq(prototype, |
- FieldOperand(prototype, GlobalObject::kGlobalContextOffset)); |
- // Load the function from the global context. |
+ FieldOperand(prototype, GlobalObject::kNativeContextOffset)); |
+ // Load the function from the native context. |
__ movq(prototype, Operand(prototype, Context::SlotOffset(index))); |
// Load the initial map. The global functions all have initial maps. |
__ movq(prototype, |
@@ -255,7 +255,7 @@ void StubCompiler::GenerateDirectLoadGlobalFunctionPrototype( |
__ j(not_equal, miss); |
// Get the global function with the given index. |
Handle<JSFunction> function( |
- JSFunction::cast(isolate->global_context()->get(index))); |
+ JSFunction::cast(isolate->native_context()->get(index))); |
// Load its initial map. The global functions all have initial maps. |
__ Move(prototype, Handle<Map>(function->initial_map())); |
// Load the prototype from the initial map. |