| Index: src/ic.h
|
| ===================================================================
|
| --- src/ic.h (revision 8618)
|
| +++ src/ic.h (working copy)
|
| @@ -66,7 +66,6 @@
|
| //
|
| class IC {
|
| public:
|
| -
|
| // The ids for utility called from the generated code.
|
| enum UtilityId {
|
| #define CONST_NAME(name) k##name,
|
| @@ -284,6 +283,7 @@
|
| static void GenerateMiss(MacroAssembler* masm, int argc);
|
| static void GenerateMegamorphic(MacroAssembler* masm, int argc);
|
| static void GenerateNormal(MacroAssembler* masm, int argc);
|
| + static void GenerateNonStrictArguments(MacroAssembler* masm, int argc);
|
| };
|
|
|
|
|
| @@ -345,14 +345,10 @@
|
| explicit KeyedIC(Isolate* isolate) : IC(NO_EXTRA_FRAME, isolate) {}
|
| virtual ~KeyedIC() {}
|
|
|
| - static const int kMaxKeyedPolymorphism = 4;
|
| + virtual MaybeObject* GetElementStubWithoutMapCheck(
|
| + bool is_js_array,
|
| + JSObject::ElementsKind elements_kind) = 0;
|
|
|
| - virtual MaybeObject* GetFastElementStubWithoutMapCheck(
|
| - bool is_js_array) = 0;
|
| -
|
| - virtual MaybeObject* GetExternalArrayStubWithoutMapCheck(
|
| - ExternalArrayType array_type) = 0;
|
| -
|
| protected:
|
| virtual Code* string_stub() {
|
| return NULL;
|
| @@ -360,8 +356,6 @@
|
|
|
| virtual Code::Kind kind() const = 0;
|
|
|
| - virtual String* GetStubNameForCache(IC::State ic_state) = 0;
|
| -
|
| MaybeObject* ComputeStub(JSObject* receiver,
|
| bool is_store,
|
| StrictModeFlag strict_mode,
|
| @@ -377,8 +371,7 @@
|
|
|
| MaybeObject* ComputeMonomorphicStubWithoutMapCheck(
|
| Map* receiver_map,
|
| - StrictModeFlag strict_mode,
|
| - Code* generic_stub);
|
| + StrictModeFlag strict_mode);
|
|
|
| MaybeObject* ComputeMonomorphicStub(JSObject* receiver,
|
| bool is_store,
|
| @@ -409,8 +402,8 @@
|
| }
|
| static void GenerateGeneric(MacroAssembler* masm);
|
| static void GenerateString(MacroAssembler* masm);
|
| -
|
| static void GenerateIndexedInterceptor(MacroAssembler* masm);
|
| + static void GenerateNonStrictArguments(MacroAssembler* masm);
|
|
|
| // Bit mask to be tested against bit field for the cases when
|
| // generic stub should go into slow case.
|
| @@ -419,17 +412,13 @@
|
| static const int kSlowCaseBitFieldMask =
|
| (1 << Map::kIsAccessCheckNeeded) | (1 << Map::kHasIndexedInterceptor);
|
|
|
| - virtual MaybeObject* GetFastElementStubWithoutMapCheck(
|
| - bool is_js_array);
|
| + virtual MaybeObject* GetElementStubWithoutMapCheck(
|
| + bool is_js_array,
|
| + JSObject::ElementsKind elements_kind);
|
|
|
| - virtual MaybeObject* GetExternalArrayStubWithoutMapCheck(
|
| - ExternalArrayType array_type);
|
| -
|
| protected:
|
| virtual Code::Kind kind() const { return Code::KEYED_LOAD_IC; }
|
|
|
| - virtual String* GetStubNameForCache(IC::State ic_state);
|
| -
|
| virtual MaybeObject* ConstructMegamorphicStub(
|
| MapList* receiver_maps,
|
| CodeList* targets,
|
| @@ -468,6 +457,10 @@
|
| return isolate()->builtins()->builtin(
|
| Builtins::kKeyedLoadIC_IndexedInterceptor);
|
| }
|
| + Code* non_strict_arguments_stub() {
|
| + return isolate()->builtins()->builtin(
|
| + Builtins::kKeyedLoadIC_NonStrictArguments);
|
| + }
|
|
|
| static void Clear(Address address, Code* target);
|
|
|
| @@ -568,18 +561,15 @@
|
| static void GenerateRuntimeSetProperty(MacroAssembler* masm,
|
| StrictModeFlag strict_mode);
|
| static void GenerateGeneric(MacroAssembler* masm, StrictModeFlag strict_mode);
|
| + static void GenerateNonStrictArguments(MacroAssembler* masm);
|
|
|
| - virtual MaybeObject* GetFastElementStubWithoutMapCheck(
|
| - bool is_js_array);
|
| + virtual MaybeObject* GetElementStubWithoutMapCheck(
|
| + bool is_js_array,
|
| + JSObject::ElementsKind elements_kind);
|
|
|
| - virtual MaybeObject* GetExternalArrayStubWithoutMapCheck(
|
| - ExternalArrayType array_type);
|
| -
|
| protected:
|
| virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; }
|
|
|
| - virtual String* GetStubNameForCache(IC::State ic_state);
|
| -
|
| virtual MaybeObject* ConstructMegamorphicStub(
|
| MapList* receiver_maps,
|
| CodeList* targets,
|
| @@ -626,6 +616,10 @@
|
| return isolate()->builtins()->builtin(
|
| Builtins::kKeyedStoreIC_Generic_Strict);
|
| }
|
| + Code* non_strict_arguments_stub() {
|
| + return isolate()->builtins()->builtin(
|
| + Builtins::kKeyedStoreIC_NonStrictArguments);
|
| + }
|
|
|
| static void Clear(Address address, Code* target);
|
|
|
| @@ -635,7 +629,6 @@
|
|
|
| class UnaryOpIC: public IC {
|
| public:
|
| -
|
| // sorted: increasingly more unspecific (ignoring UNINITIALIZED)
|
| // TODO(svenpanne) Using enums+switch is an antipattern, use a class instead.
|
| enum TypeInfo {
|
| @@ -662,7 +655,6 @@
|
| // Type Recording BinaryOpIC, that records the types of the inputs and outputs.
|
| class BinaryOpIC: public IC {
|
| public:
|
| -
|
| enum TypeInfo {
|
| UNINITIALIZED,
|
| SMI,
|
|
|