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

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

Issue 6594037: Strict Mode assignment to read only property. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 10 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
Index: src/ia32/stub-cache-ia32.cc
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc
index 51cc46a08e5c6cdbb95dab5222fb08ffb1080248..a95783b874e88c2044409700fdfe144e121a80f8 100644
--- a/src/ia32/stub-cache-ia32.cc
+++ b/src/ia32/stub-cache-ia32.cc
@@ -2552,12 +2552,13 @@ MaybeObject* StoreStubCompiler::CompileStoreInterceptor(JSObject* receiver,
__ push(edx); // receiver
__ push(ecx); // name
__ push(eax); // value
+ __ push(Immediate(Smi::FromInt(strict_mode_))); // strict mode
Lasse Reichstein 2011/02/28 11:18:30 Comment isn't necessary here. The variable is self
Martin Maly 2011/03/01 01:40:29 Done.
__ push(ebx); // restore return address
// Do tail-call to the runtime system.
ExternalReference store_ic_property =
ExternalReference(IC_Utility(IC::kStoreInterceptorProperty));
- __ TailCallExternalReference(store_ic_property, 3, 1);
+ __ TailCallExternalReference(store_ic_property, 4, 1);
// Handle store cache miss.
__ bind(&miss);
@@ -3712,10 +3713,15 @@ MaybeObject* ExternalArrayStubCompiler::CompileKeyedStoreStub(
__ push(edx);
__ push(ecx);
__ push(eax);
- __ push(ebx);
+ __ push(Immediate(Smi::FromInt(NONE))); // PropertyAttributes
+ __ push(Immediate(Smi::FromInt(
+ Code::ExtractExtraICStateFromFlags(flags) == kStrictMode
+ ? kStrictMode
+ : kNonStrictMode)));
Lasse Reichstein 2011/02/28 11:18:30 Is the conditional necessary here? It seems Code::
Martin Maly 2011/03/01 01:40:29 Stritly speaking, the extra state is 2 bits so I t
+ __ push(ebx); // return address
// Do tail-call to runtime routine.
- __ TailCallRuntime(Runtime::kSetProperty, 3, 1);
+ __ TailCallRuntime(Runtime::kSetProperty, 5, 1);
return GetCode(flags);
}

Powered by Google App Engine
This is Rietveld 408576698