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

Unified Diff: src/ia32/stub-cache-ia32.cc

Issue 131663003: Make the strict-mode calling convention for contextual calls the default one. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix arm port Created 6 years, 11 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
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/stub-cache-ia32.cc
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc
index d63c2bb9cfec3a30f21ba620e500b85302870f30..464cc958959a49743ae59609218c0069fdfc5ae1 100644
--- a/src/ia32/stub-cache-ia32.cc
+++ b/src/ia32/stub-cache-ia32.cc
@@ -2468,24 +2468,12 @@ void StubCompiler::GenerateBooleanCheck(Register object, Label* miss) {
}
-void CallStubCompiler::PatchGlobalProxy(Handle<Object> object,
- Handle<JSFunction> function) {
+void CallStubCompiler::PatchImplicitReceiver(Handle<Object> object) {
if (object->IsGlobalObject()) {
const int argc = arguments().immediate();
const int receiver_offset = (argc + 1) * kPointerSize;
- __ LoadHeapObject(edx, handle(function->context()->global_proxy()));
- __ mov(Operand(esp, receiver_offset), edx);
- }
-}
-
-
-void CallStubCompiler::PatchGlobalProxy(Handle<Object> object,
- Register function) {
- if (object->IsGlobalObject()) {
- FetchGlobalProxy(masm(), edx, function);
- const int argc = arguments().immediate();
- const int receiver_offset = (argc + 1) * kPointerSize;
- __ mov(Operand(esp, receiver_offset), edx);
+ __ mov(Operand(esp, receiver_offset),
+ isolate()->factory()->undefined_value());
}
}
@@ -2578,7 +2566,7 @@ void CallStubCompiler::GenerateJumpFunction(Handle<Object> object,
GenerateFunctionCheck(function, ebx, miss);
if (!function.is(edi)) __ mov(edi, function);
- PatchGlobalProxy(object, function);
+ PatchImplicitReceiver(object);
// Invoke the function.
__ InvokeFunction(edi, arguments(), JUMP_FUNCTION,
@@ -2693,15 +2681,6 @@ Handle<Code> StoreStubCompiler::CompileStoreCallback(
#define __ ACCESS_MASM(masm)
-void CallStubCompiler::FetchGlobalProxy(MacroAssembler* masm,
- Register target,
- Register function) {
- __ mov(target, FieldOperand(function, JSFunction::kContextOffset));
- __ mov(target, ContextOperand(target, Context::GLOBAL_OBJECT_INDEX));
- __ mov(target, FieldOperand(target, GlobalObject::kGlobalReceiverOffset));
-}
-
-
void StoreStubCompiler::GenerateStoreViaSetter(
MacroAssembler* masm,
Handle<JSFunction> setter) {
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698