| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 | 190 |
| 191 Handle<Code> ComputeKeyedStoreField(Handle<Name> name, | 191 Handle<Code> ComputeKeyedStoreField(Handle<Name> name, |
| 192 Handle<JSObject> object, | 192 Handle<JSObject> object, |
| 193 int field_index, | 193 int field_index, |
| 194 Handle<Map> transition, | 194 Handle<Map> transition, |
| 195 StrictModeFlag strict_mode); | 195 StrictModeFlag strict_mode); |
| 196 | 196 |
| 197 Handle<Code> ComputeKeyedLoadElement(Handle<Map> receiver_map); | 197 Handle<Code> ComputeKeyedLoadElement(Handle<Map> receiver_map); |
| 198 | 198 |
| 199 Handle<Code> ComputeKeyedStoreElement(Handle<Map> receiver_map, | 199 Handle<Code> ComputeKeyedStoreElement(Handle<Map> receiver_map, |
| 200 KeyedStoreIC::StubKind stub_kind, | |
| 201 StrictModeFlag strict_mode, | 200 StrictModeFlag strict_mode, |
| 202 KeyedAccessGrowMode grow_mode); | 201 KeyedAccessStoreMode store_mode); |
| 203 | 202 |
| 204 // --- | 203 // --- |
| 205 | 204 |
| 206 Handle<Code> ComputeCallField(int argc, | 205 Handle<Code> ComputeCallField(int argc, |
| 207 Code::Kind, | 206 Code::Kind, |
| 208 Code::ExtraICState extra_state, | 207 Code::ExtraICState extra_state, |
| 209 Handle<Name> name, | 208 Handle<Name> name, |
| 210 Handle<Object> object, | 209 Handle<Object> object, |
| 211 Handle<JSObject> holder, | 210 Handle<JSObject> holder, |
| 212 PropertyIndex index); | 211 PropertyIndex index); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 Code::ExtraICState state); | 255 Code::ExtraICState state); |
| 257 | 256 |
| 258 Handle<Code> ComputeCallMiss(int argc, | 257 Handle<Code> ComputeCallMiss(int argc, |
| 259 Code::Kind kind, | 258 Code::Kind kind, |
| 260 Code::ExtraICState state); | 259 Code::ExtraICState state); |
| 261 | 260 |
| 262 // --- | 261 // --- |
| 263 | 262 |
| 264 Handle<Code> ComputeLoadElementPolymorphic(MapHandleList* receiver_maps); | 263 Handle<Code> ComputeLoadElementPolymorphic(MapHandleList* receiver_maps); |
| 265 Handle<Code> ComputeStoreElementPolymorphic(MapHandleList* receiver_maps, | 264 Handle<Code> ComputeStoreElementPolymorphic(MapHandleList* receiver_maps, |
| 266 KeyedAccessGrowMode grow_mode, | 265 KeyedAccessStoreMode store_mode, |
| 267 StrictModeFlag strict_mode); | 266 StrictModeFlag strict_mode); |
| 268 | 267 |
| 269 Handle<Code> ComputePolymorphicIC(MapHandleList* receiver_maps, | 268 Handle<Code> ComputePolymorphicIC(MapHandleList* receiver_maps, |
| 270 CodeHandleList* handlers, | 269 CodeHandleList* handlers, |
| 271 Handle<Name> name); | 270 Handle<Name> name); |
| 272 | 271 |
| 273 // Finds the Code object stored in the Heap::non_monomorphic_cache(). | 272 // Finds the Code object stored in the Heap::non_monomorphic_cache(). |
| 274 Code* FindCallInitialize(int argc, RelocInfo::Mode mode, Code::Kind kind); | 273 Code* FindCallInitialize(int argc, RelocInfo::Mode mode, Code::Kind kind); |
| 275 | 274 |
| 276 #ifdef ENABLE_DEBUGGER_SUPPORT | 275 #ifdef ENABLE_DEBUGGER_SUPPORT |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 791 Handle<Code> GetCode(Code::StubType type, Handle<Name> name); | 790 Handle<Code> GetCode(Code::StubType type, Handle<Name> name); |
| 792 | 791 |
| 793 StrictModeFlag strict_mode_; | 792 StrictModeFlag strict_mode_; |
| 794 }; | 793 }; |
| 795 | 794 |
| 796 | 795 |
| 797 class KeyedStoreStubCompiler: public StubCompiler { | 796 class KeyedStoreStubCompiler: public StubCompiler { |
| 798 public: | 797 public: |
| 799 KeyedStoreStubCompiler(Isolate* isolate, | 798 KeyedStoreStubCompiler(Isolate* isolate, |
| 800 StrictModeFlag strict_mode, | 799 StrictModeFlag strict_mode, |
| 801 KeyedAccessGrowMode grow_mode) | 800 KeyedAccessStoreMode store_mode) |
| 802 : StubCompiler(isolate), | 801 : StubCompiler(isolate), |
| 803 strict_mode_(strict_mode), | 802 strict_mode_(strict_mode), |
| 804 grow_mode_(grow_mode) { } | 803 store_mode_(store_mode) { } |
| 805 | 804 |
| 806 Handle<Code> CompileStoreField(Handle<JSObject> object, | 805 Handle<Code> CompileStoreField(Handle<JSObject> object, |
| 807 int index, | 806 int index, |
| 808 Handle<Map> transition, | 807 Handle<Map> transition, |
| 809 Handle<Name> name); | 808 Handle<Name> name); |
| 810 | 809 |
| 811 Handle<Code> CompileStoreElement(Handle<Map> receiver_map); | 810 Handle<Code> CompileStoreElement(Handle<Map> receiver_map); |
| 812 | 811 |
| 813 Handle<Code> CompileStorePolymorphic(MapHandleList* receiver_maps, | 812 Handle<Code> CompileStorePolymorphic(MapHandleList* receiver_maps, |
| 814 CodeHandleList* handler_stubs, | 813 CodeHandleList* handler_stubs, |
| 815 MapHandleList* transitioned_maps); | 814 MapHandleList* transitioned_maps); |
| 816 | 815 |
| 817 Handle<Code> CompileStoreElementPolymorphic(MapHandleList* receiver_maps); | 816 Handle<Code> CompileStoreElementPolymorphic(MapHandleList* receiver_maps); |
| 818 | 817 |
| 819 static void GenerateStoreFastElement(MacroAssembler* masm, | 818 static void GenerateStoreFastElement(MacroAssembler* masm, |
| 820 bool is_js_array, | 819 bool is_js_array, |
| 821 ElementsKind element_kind, | 820 ElementsKind element_kind, |
| 822 KeyedAccessGrowMode grow_mode); | 821 KeyedAccessStoreMode store_mode); |
| 823 | 822 |
| 824 static void GenerateStoreFastDoubleElement(MacroAssembler* masm, | 823 static void GenerateStoreFastDoubleElement(MacroAssembler* masm, |
| 825 bool is_js_array, | 824 bool is_js_array, |
| 826 KeyedAccessGrowMode grow_mode); | 825 KeyedAccessStoreMode store_mode); |
| 827 | 826 |
| 828 static void GenerateStoreExternalArray(MacroAssembler* masm, | 827 static void GenerateStoreExternalArray(MacroAssembler* masm, |
| 829 ElementsKind elements_kind); | 828 ElementsKind elements_kind); |
| 830 | 829 |
| 831 static void GenerateStoreDictionaryElement(MacroAssembler* masm); | 830 static void GenerateStoreDictionaryElement(MacroAssembler* masm); |
| 832 | 831 |
| 833 private: | 832 private: |
| 834 Handle<Code> GetCode(Code::StubType type, | 833 Handle<Code> GetCode(Code::StubType type, |
| 835 Handle<Name> name, | 834 Handle<Name> name, |
| 836 InlineCacheState state = MONOMORPHIC); | 835 InlineCacheState state = MONOMORPHIC); |
| 837 | 836 |
| 838 StrictModeFlag strict_mode_; | 837 StrictModeFlag strict_mode_; |
| 839 KeyedAccessGrowMode grow_mode_; | 838 KeyedAccessStoreMode store_mode_; |
| 840 }; | 839 }; |
| 841 | 840 |
| 842 | 841 |
| 843 // Subset of FUNCTIONS_WITH_ID_LIST with custom constant/global call | 842 // Subset of FUNCTIONS_WITH_ID_LIST with custom constant/global call |
| 844 // IC stubs. | 843 // IC stubs. |
| 845 #define CUSTOM_CALL_IC_GENERATORS(V) \ | 844 #define CUSTOM_CALL_IC_GENERATORS(V) \ |
| 846 V(ArrayPush) \ | 845 V(ArrayPush) \ |
| 847 V(ArrayPop) \ | 846 V(ArrayPop) \ |
| 848 V(StringCharCodeAt) \ | 847 V(StringCharCodeAt) \ |
| 849 V(StringCharAt) \ | 848 V(StringCharAt) \ |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1003 Handle<JSFunction> constant_function_; | 1002 Handle<JSFunction> constant_function_; |
| 1004 bool is_simple_api_call_; | 1003 bool is_simple_api_call_; |
| 1005 Handle<FunctionTemplateInfo> expected_receiver_type_; | 1004 Handle<FunctionTemplateInfo> expected_receiver_type_; |
| 1006 Handle<CallHandlerInfo> api_call_info_; | 1005 Handle<CallHandlerInfo> api_call_info_; |
| 1007 }; | 1006 }; |
| 1008 | 1007 |
| 1009 | 1008 |
| 1010 } } // namespace v8::internal | 1009 } } // namespace v8::internal |
| 1011 | 1010 |
| 1012 #endif // V8_STUB_CACHE_H_ | 1011 #endif // V8_STUB_CACHE_H_ |
| OLD | NEW |