| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 String* name, | 126 String* name, |
| 127 String* receiver); | 127 String* receiver); |
| 128 | 128 |
| 129 MUST_USE_RESULT static MaybeObject* ComputeKeyedLoadFunctionPrototype( | 129 MUST_USE_RESULT static MaybeObject* ComputeKeyedLoadFunctionPrototype( |
| 130 String* name, | 130 String* name, |
| 131 JSFunction* receiver); | 131 JSFunction* receiver); |
| 132 | 132 |
| 133 MUST_USE_RESULT static MaybeObject* ComputeKeyedLoadSpecialized( | 133 MUST_USE_RESULT static MaybeObject* ComputeKeyedLoadSpecialized( |
| 134 JSObject* receiver); | 134 JSObject* receiver); |
| 135 | 135 |
| 136 MUST_USE_RESULT static MaybeObject* ComputeKeyedLoadPixelArray( | |
| 137 JSObject* receiver); | |
| 138 | |
| 139 // --- | 136 // --- |
| 140 | 137 |
| 141 MUST_USE_RESULT static MaybeObject* ComputeStoreField( | 138 MUST_USE_RESULT static MaybeObject* ComputeStoreField( |
| 142 String* name, | 139 String* name, |
| 143 JSObject* receiver, | 140 JSObject* receiver, |
| 144 int field_index, | 141 int field_index, |
| 145 Map* transition, | 142 Map* transition, |
| 146 Code::ExtraICState extra_ic_state); | 143 StrictModeFlag strict_mode); |
| 147 | 144 |
| 148 MUST_USE_RESULT static MaybeObject* ComputeStoreNormal( | 145 MUST_USE_RESULT static MaybeObject* ComputeStoreNormal( |
| 149 Code::ExtraICState extra_ic_state); | 146 StrictModeFlag strict_mode); |
| 150 | 147 |
| 151 MUST_USE_RESULT static MaybeObject* ComputeStoreGlobal( | 148 MUST_USE_RESULT static MaybeObject* ComputeStoreGlobal( |
| 152 String* name, | 149 String* name, |
| 153 GlobalObject* receiver, | 150 GlobalObject* receiver, |
| 154 JSGlobalPropertyCell* cell, | 151 JSGlobalPropertyCell* cell, |
| 155 Code::ExtraICState extra_ic_state); | 152 StrictModeFlag strict_mode); |
| 156 | 153 |
| 157 MUST_USE_RESULT static MaybeObject* ComputeStoreCallback( | 154 MUST_USE_RESULT static MaybeObject* ComputeStoreCallback( |
| 158 String* name, | 155 String* name, |
| 159 JSObject* receiver, | 156 JSObject* receiver, |
| 160 AccessorInfo* callback, | 157 AccessorInfo* callback, |
| 161 Code::ExtraICState extra_ic_state); | 158 StrictModeFlag strict_mode); |
| 162 | 159 |
| 163 MUST_USE_RESULT static MaybeObject* ComputeStoreInterceptor( | 160 MUST_USE_RESULT static MaybeObject* ComputeStoreInterceptor( |
| 164 String* name, | 161 String* name, |
| 165 JSObject* receiver, | 162 JSObject* receiver, |
| 166 Code::ExtraICState extra_ic_state); | 163 StrictModeFlag strict_mode); |
| 167 | 164 |
| 168 // --- | 165 // --- |
| 169 | 166 |
| 170 MUST_USE_RESULT static MaybeObject* ComputeKeyedStoreField( | 167 MUST_USE_RESULT static MaybeObject* ComputeKeyedStoreField( |
| 171 String* name, | 168 String* name, |
| 172 JSObject* receiver, | 169 JSObject* receiver, |
| 173 int field_index, | 170 int field_index, |
| 174 Map* transition = NULL); | 171 Map* transition, |
| 172 StrictModeFlag strict_mode); |
| 175 | 173 |
| 176 MUST_USE_RESULT static MaybeObject* ComputeKeyedStoreSpecialized( | 174 MUST_USE_RESULT static MaybeObject* ComputeKeyedStoreSpecialized( |
| 177 JSObject* receiver); | 175 JSObject* receiver, |
| 178 | 176 StrictModeFlag strict_mode); |
| 179 MUST_USE_RESULT static MaybeObject* ComputeKeyedStorePixelArray( | |
| 180 JSObject* receiver); | |
| 181 | 177 |
| 182 MUST_USE_RESULT static MaybeObject* ComputeKeyedLoadOrStoreExternalArray( | 178 MUST_USE_RESULT static MaybeObject* ComputeKeyedLoadOrStoreExternalArray( |
| 183 JSObject* receiver, | 179 JSObject* receiver, |
| 184 bool is_store); | 180 bool is_store, |
| 181 StrictModeFlag strict_mode); |
| 185 | 182 |
| 186 // --- | 183 // --- |
| 187 | 184 |
| 188 MUST_USE_RESULT static MaybeObject* ComputeCallField(int argc, | 185 MUST_USE_RESULT static MaybeObject* ComputeCallField(int argc, |
| 189 InLoopFlag in_loop, | 186 InLoopFlag in_loop, |
| 190 Code::Kind, | 187 Code::Kind, |
| 191 String* name, | 188 String* name, |
| 192 Object* object, | 189 Object* object, |
| 193 JSObject* holder, | 190 JSObject* holder, |
| 194 int index); | 191 int index); |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 | 609 |
| 613 MUST_USE_RESULT MaybeObject* CompileLoadInterceptor(JSObject* object, | 610 MUST_USE_RESULT MaybeObject* CompileLoadInterceptor(JSObject* object, |
| 614 JSObject* holder, | 611 JSObject* holder, |
| 615 String* name); | 612 String* name); |
| 616 | 613 |
| 617 MUST_USE_RESULT MaybeObject* CompileLoadArrayLength(String* name); | 614 MUST_USE_RESULT MaybeObject* CompileLoadArrayLength(String* name); |
| 618 MUST_USE_RESULT MaybeObject* CompileLoadStringLength(String* name); | 615 MUST_USE_RESULT MaybeObject* CompileLoadStringLength(String* name); |
| 619 MUST_USE_RESULT MaybeObject* CompileLoadFunctionPrototype(String* name); | 616 MUST_USE_RESULT MaybeObject* CompileLoadFunctionPrototype(String* name); |
| 620 | 617 |
| 621 MUST_USE_RESULT MaybeObject* CompileLoadSpecialized(JSObject* receiver); | 618 MUST_USE_RESULT MaybeObject* CompileLoadSpecialized(JSObject* receiver); |
| 622 MUST_USE_RESULT MaybeObject* CompileLoadPixelArray(JSObject* receiver); | |
| 623 | 619 |
| 624 private: | 620 private: |
| 625 MaybeObject* GetCode(PropertyType type, String* name); | 621 MaybeObject* GetCode(PropertyType type, String* name); |
| 626 }; | 622 }; |
| 627 | 623 |
| 628 | 624 |
| 629 class StoreStubCompiler: public StubCompiler { | 625 class StoreStubCompiler: public StubCompiler { |
| 630 public: | 626 public: |
| 631 explicit StoreStubCompiler(Code::ExtraICState extra_ic_state) | 627 explicit StoreStubCompiler(StrictModeFlag strict_mode) |
| 632 : extra_ic_state_(extra_ic_state) { } | 628 : strict_mode_(strict_mode) { } |
| 633 | 629 |
| 634 MUST_USE_RESULT MaybeObject* CompileStoreField(JSObject* object, | 630 MUST_USE_RESULT MaybeObject* CompileStoreField(JSObject* object, |
| 635 int index, | 631 int index, |
| 636 Map* transition, | 632 Map* transition, |
| 637 String* name); | 633 String* name); |
| 638 | 634 |
| 639 MUST_USE_RESULT MaybeObject* CompileStoreCallback(JSObject* object, | 635 MUST_USE_RESULT MaybeObject* CompileStoreCallback(JSObject* object, |
| 640 AccessorInfo* callbacks, | 636 AccessorInfo* callbacks, |
| 641 String* name); | 637 String* name); |
| 642 MUST_USE_RESULT MaybeObject* CompileStoreInterceptor(JSObject* object, | 638 MUST_USE_RESULT MaybeObject* CompileStoreInterceptor(JSObject* object, |
| 643 String* name); | 639 String* name); |
| 644 MUST_USE_RESULT MaybeObject* CompileStoreGlobal(GlobalObject* object, | 640 MUST_USE_RESULT MaybeObject* CompileStoreGlobal(GlobalObject* object, |
| 645 JSGlobalPropertyCell* holder, | 641 JSGlobalPropertyCell* holder, |
| 646 String* name); | 642 String* name); |
| 647 | 643 |
| 648 | 644 |
| 649 private: | 645 private: |
| 650 MaybeObject* GetCode(PropertyType type, String* name); | 646 MaybeObject* GetCode(PropertyType type, String* name); |
| 651 | 647 |
| 652 Code::ExtraICState extra_ic_state_; | 648 StrictModeFlag strict_mode_; |
| 653 }; | 649 }; |
| 654 | 650 |
| 655 | 651 |
| 656 class KeyedStoreStubCompiler: public StubCompiler { | 652 class KeyedStoreStubCompiler: public StubCompiler { |
| 657 public: | 653 public: |
| 654 explicit KeyedStoreStubCompiler(StrictModeFlag strict_mode) |
| 655 : strict_mode_(strict_mode) { } |
| 656 |
| 658 MUST_USE_RESULT MaybeObject* CompileStoreField(JSObject* object, | 657 MUST_USE_RESULT MaybeObject* CompileStoreField(JSObject* object, |
| 659 int index, | 658 int index, |
| 660 Map* transition, | 659 Map* transition, |
| 661 String* name); | 660 String* name); |
| 662 | 661 |
| 663 MUST_USE_RESULT MaybeObject* CompileStoreSpecialized(JSObject* receiver); | 662 MUST_USE_RESULT MaybeObject* CompileStoreSpecialized(JSObject* receiver); |
| 664 | 663 |
| 665 MUST_USE_RESULT MaybeObject* CompileStorePixelArray(JSObject* receiver); | |
| 666 | |
| 667 private: | 664 private: |
| 668 MaybeObject* GetCode(PropertyType type, String* name); | 665 MaybeObject* GetCode(PropertyType type, String* name); |
| 666 |
| 667 StrictModeFlag strict_mode_; |
| 669 }; | 668 }; |
| 670 | 669 |
| 671 | 670 |
| 672 // Subset of FUNCTIONS_WITH_ID_LIST with custom constant/global call | 671 // Subset of FUNCTIONS_WITH_ID_LIST with custom constant/global call |
| 673 // IC stubs. | 672 // IC stubs. |
| 674 #define CUSTOM_CALL_IC_GENERATORS(V) \ | 673 #define CUSTOM_CALL_IC_GENERATORS(V) \ |
| 675 V(ArrayPush) \ | 674 V(ArrayPush) \ |
| 676 V(ArrayPop) \ | 675 V(ArrayPop) \ |
| 677 V(StringCharCodeAt) \ | 676 V(StringCharCodeAt) \ |
| 678 V(StringCharAt) \ | 677 V(StringCharAt) \ |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 819 bool is_simple_api_call_; | 818 bool is_simple_api_call_; |
| 820 FunctionTemplateInfo* expected_receiver_type_; | 819 FunctionTemplateInfo* expected_receiver_type_; |
| 821 CallHandlerInfo* api_call_info_; | 820 CallHandlerInfo* api_call_info_; |
| 822 }; | 821 }; |
| 823 | 822 |
| 824 class ExternalArrayStubCompiler: public StubCompiler { | 823 class ExternalArrayStubCompiler: public StubCompiler { |
| 825 public: | 824 public: |
| 826 explicit ExternalArrayStubCompiler() {} | 825 explicit ExternalArrayStubCompiler() {} |
| 827 | 826 |
| 828 MUST_USE_RESULT MaybeObject* CompileKeyedLoadStub( | 827 MUST_USE_RESULT MaybeObject* CompileKeyedLoadStub( |
| 829 ExternalArrayType array_type, Code::Flags flags); | 828 JSObject* receiver, ExternalArrayType array_type, Code::Flags flags); |
| 830 | 829 |
| 831 MUST_USE_RESULT MaybeObject* CompileKeyedStoreStub( | 830 MUST_USE_RESULT MaybeObject* CompileKeyedStoreStub( |
| 832 ExternalArrayType array_type, Code::Flags flags); | 831 JSObject* receiver, ExternalArrayType array_type, Code::Flags flags); |
| 833 | 832 |
| 834 private: | 833 private: |
| 835 MaybeObject* GetCode(Code::Flags flags); | 834 MaybeObject* GetCode(Code::Flags flags); |
| 836 }; | 835 }; |
| 837 | 836 |
| 838 } } // namespace v8::internal | 837 } } // namespace v8::internal |
| 839 | 838 |
| 840 #endif // V8_STUB_CACHE_H_ | 839 #endif // V8_STUB_CACHE_H_ |
| OLD | NEW |