Reviewers: Erik Corry,
Description:
Remove direct reference from builtins code to global object. Load the
global object through the context instead.
Please review this at http://codereview.chromium.org/2822003/show
SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/
Affected files:
M src/ia32/codegen-ia32.cc
M src/x64/codegen-x64.cc
Index: src/ia32/codegen-ia32.cc
===================================================================
--- src/ia32/codegen-ia32.cc (revision 4852)
+++ src/ia32/codegen-ia32.cc (working copy)
@@ -6909,8 +6909,7 @@
__ bind(&cache_miss);
__ push(cache_); // store a reference to cache
__ push(key_); // store a key
- Handle<Object> receiver(Top::global_context()->global());
- __ push(Immediate(receiver));
+ __ push(Operand(esi, Context::SlotOffset(Context::GLOBAL_INDEX)));
__ push(key_);
// On ia32 function must be in edi.
__ mov(edi, FieldOperand(cache_, JSFunctionResultCache::kFactoryOffset));
Index: src/x64/codegen-x64.cc
===================================================================
--- src/x64/codegen-x64.cc (revision 4852)
+++ src/x64/codegen-x64.cc (working copy)
@@ -4793,8 +4793,7 @@
__ bind(&cache_miss);
__ push(cache_); // store a reference to cache
__ push(key_); // store a key
- Handle<Object> receiver(Top::global_context()->global());
- __ Push(receiver);
+ __ push(Operand(rsi, Context::SlotOffset(Context::GLOBAL_INDEX)));
__ push(key_);
// On x64 function must be in rdi.
__ movq(rdi, FieldOperand(cache_,
JSFunctionResultCache::kFactoryOffset));
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev