| Index: src/stub-cache.h
|
| diff --git a/src/stub-cache.h b/src/stub-cache.h
|
| index a1b55d8d111d6a8345fb740d6165281e1e38b41d..5cb92af97ebcb8b09fae532f75a2615e2478eeac 100644
|
| --- a/src/stub-cache.h
|
| +++ b/src/stub-cache.h
|
| @@ -140,7 +140,7 @@ class StubCache {
|
| Handle<Code> ComputeLoadGlobal(Handle<Name> name,
|
| Handle<JSObject> object,
|
| Handle<GlobalObject> holder,
|
| - Handle<JSGlobalPropertyCell> cell,
|
| + Handle<PropertyCell> cell,
|
| bool is_dont_delete);
|
|
|
| // ---
|
| @@ -183,7 +183,7 @@ class StubCache {
|
|
|
| Handle<Code> ComputeStoreGlobal(Handle<Name> name,
|
| Handle<GlobalObject> object,
|
| - Handle<JSGlobalPropertyCell> cell,
|
| + Handle<PropertyCell> cell,
|
| StrictModeFlag strict_mode);
|
|
|
| Handle<Code> ComputeStoreCallback(Handle<Name> name,
|
| @@ -251,7 +251,7 @@ class StubCache {
|
| Handle<Name> name,
|
| Handle<JSObject> object,
|
| Handle<GlobalObject> holder,
|
| - Handle<JSGlobalPropertyCell> cell,
|
| + Handle<PropertyCell> cell,
|
| Handle<JSFunction> function);
|
|
|
| // ---
|
| @@ -765,7 +765,7 @@ class LoadStubCompiler: public BaseLoadStubCompiler {
|
|
|
| Handle<Code> CompileLoadGlobal(Handle<JSObject> object,
|
| Handle<GlobalObject> holder,
|
| - Handle<JSGlobalPropertyCell> cell,
|
| + Handle<PropertyCell> cell,
|
| Handle<Name> name,
|
| bool is_dont_delete);
|
|
|
| @@ -890,7 +890,7 @@ class StoreStubCompiler: public BaseStoreStubCompiler {
|
| Handle<Name> name);
|
|
|
| Handle<Code> CompileStoreGlobal(Handle<GlobalObject> object,
|
| - Handle<JSGlobalPropertyCell> holder,
|
| + Handle<PropertyCell> holder,
|
| Handle<Name> name);
|
|
|
| private:
|
| @@ -969,7 +969,12 @@ class KeyedStoreStubCompiler: public BaseStoreStubCompiler {
|
| V(StringCharAt) \
|
| V(StringFromCharCode) \
|
| V(MathFloor) \
|
| - V(MathAbs)
|
| + V(MathAbs) \
|
| + V(ArrayCode)
|
| +
|
| +
|
| +#define SITE_SPECIFIC_CALL_GENERATORS(V) \
|
| + V(ArrayCode)
|
|
|
|
|
| class CallOptimization;
|
| @@ -1007,11 +1012,12 @@ class CallStubCompiler: public StubCompiler {
|
|
|
| Handle<Code> CompileCallGlobal(Handle<JSObject> object,
|
| Handle<GlobalObject> holder,
|
| - Handle<JSGlobalPropertyCell> cell,
|
| + Handle<PropertyCell> cell,
|
| Handle<JSFunction> function,
|
| Handle<Name> name);
|
|
|
| static bool HasCustomCallGenerator(Handle<JSFunction> function);
|
| + static bool CanBeCached(Handle<JSFunction> function);
|
|
|
| private:
|
| // Compiles a custom call constant/global IC. For constant calls cell is
|
| @@ -1019,23 +1025,25 @@ class CallStubCompiler: public StubCompiler {
|
| // given function.
|
| Handle<Code> CompileCustomCall(Handle<Object> object,
|
| Handle<JSObject> holder,
|
| - Handle<JSGlobalPropertyCell> cell,
|
| + Handle<Cell> cell,
|
| Handle<JSFunction> function,
|
| - Handle<String> name);
|
| + Handle<String> name,
|
| + Code::StubType type);
|
|
|
| #define DECLARE_CALL_GENERATOR(name) \
|
| Handle<Code> Compile##name##Call(Handle<Object> object, \
|
| Handle<JSObject> holder, \
|
| - Handle<JSGlobalPropertyCell> cell, \
|
| + Handle<Cell> cell, \
|
| Handle<JSFunction> function, \
|
| - Handle<String> fname);
|
| + Handle<String> fname, \
|
| + Code::StubType type);
|
| CUSTOM_CALL_IC_GENERATORS(DECLARE_CALL_GENERATOR)
|
| #undef DECLARE_CALL_GENERATOR
|
|
|
| Handle<Code> CompileFastApiCall(const CallOptimization& optimization,
|
| Handle<Object> object,
|
| Handle<JSObject> holder,
|
| - Handle<JSGlobalPropertyCell> cell,
|
| + Handle<Cell> cell,
|
| Handle<JSFunction> function,
|
| Handle<String> name);
|
|
|
| @@ -1053,7 +1061,7 @@ class CallStubCompiler: public StubCompiler {
|
|
|
| // Generates code to load the function from the cell checking that
|
| // it still contains the same function.
|
| - void GenerateLoadFunctionFromCell(Handle<JSGlobalPropertyCell> cell,
|
| + void GenerateLoadFunctionFromCell(Handle<Cell> cell,
|
| Handle<JSFunction> function,
|
| Label* miss);
|
|
|
|
|