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

Unified Diff: src/ic.h

Issue 6576024: (early draft) Strict mode - throw exception on 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/ic.h
diff --git a/src/ic.h b/src/ic.h
index 96838c7338a20878279172f24b9fef58486e7287..f0adcf668bda90ced5bbe805c1bfc47750d92ecb 100644
--- a/src/ic.h
+++ b/src/ic.h
@@ -398,12 +398,6 @@ class KeyedLoadIC: public IC {
class StoreIC: public IC {
public:
-
- enum StoreICStrictMode {
- kStoreICNonStrict = kNonStrictMode,
- kStoreICStrict = kStrictMode
- };
-
Martin Maly 2011/02/24 06:33:34 I'd have to clone this enum for KeyedStoreIC also,
StoreIC() : IC(NO_EXTRA_FRAME) { ASSERT(target()->is_store_stub()); }
MUST_USE_RESULT MaybeObject* Store(State state,
@@ -419,7 +413,7 @@ class StoreIC: public IC {
Code::ExtraICState extra_ic_state);
static void GenerateArrayLength(MacroAssembler* masm);
static void GenerateNormal(MacroAssembler* masm);
- static void GenerateGlobalProxy(MacroAssembler* masm);
+ static void GenerateGlobalProxy(MacroAssembler* masm, StrictModeFlag strict);
// Clear the use of an inlined version.
static void ClearInlinedVersion(Address address);
@@ -473,6 +467,7 @@ class KeyedStoreIC: public IC {
KeyedStoreIC() : IC(NO_EXTRA_FRAME) { }
MUST_USE_RESULT MaybeObject* Store(State state,
+ Code::ExtraICState extra_ic_state,
Handle<Object> object,
Handle<Object> name,
Handle<Object> value);
@@ -480,8 +475,9 @@ class KeyedStoreIC: public IC {
// Code generators for stub routines. Only called once at startup.
static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
static void GenerateMiss(MacroAssembler* masm);
- static void GenerateRuntimeSetProperty(MacroAssembler* masm);
- static void GenerateGeneric(MacroAssembler* masm);
+ static void GenerateRuntimeSetProperty(MacroAssembler* masm,
+ StrictModeFlag strict_mode);
+ static void GenerateGeneric(MacroAssembler* masm, StrictModeFlag strict_mode);
// Clear the inlined version so the IC is always hit.
static void ClearInlinedVersion(Address address);
@@ -501,12 +497,21 @@ class KeyedStoreIC: public IC {
static Code* initialize_stub() {
return Builtins::builtin(Builtins::KeyedStoreIC_Initialize);
}
+ static Code* initialize_stub_strict() {
+ return Builtins::builtin(Builtins::KeyedStoreIC_Initialize_Strict);
+ }
static Code* megamorphic_stub() {
return Builtins::builtin(Builtins::KeyedStoreIC_Generic);
}
+ static Code* megamorphic_stub_strict() {
+ return Builtins::builtin(Builtins::KeyedStoreIC_Generic_Strict);
+ }
static Code* generic_stub() {
return Builtins::builtin(Builtins::KeyedStoreIC_Generic);
}
+ static Code* generic_stub_strict() {
+ return Builtins::builtin(Builtins::KeyedStoreIC_Generic_Strict);
+ }
static void Clear(Address address, Code* target);

Powered by Google App Engine
This is Rietveld 408576698