OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 | 176 |
177 // --- | 177 // --- |
178 | 178 |
179 MUST_USE_RESULT MaybeObject* ComputeKeyedStoreField( | 179 MUST_USE_RESULT MaybeObject* ComputeKeyedStoreField( |
180 String* name, | 180 String* name, |
181 JSObject* receiver, | 181 JSObject* receiver, |
182 int field_index, | 182 int field_index, |
183 Map* transition, | 183 Map* transition, |
184 StrictModeFlag strict_mode); | 184 StrictModeFlag strict_mode); |
185 | 185 |
186 MUST_USE_RESULT MaybeObject* ComputeKeyedLoadOrStoreExternalArray( | 186 MUST_USE_RESULT MaybeObject* ComputeKeyedLoadOrStoreElement( |
187 JSObject* receiver, | 187 JSObject* receiver, |
188 bool is_store, | 188 bool is_store, |
189 StrictModeFlag strict_mode); | 189 StrictModeFlag strict_mode); |
190 | 190 |
191 MUST_USE_RESULT MaybeObject* ComputeKeyedLoadOrStoreFastElement( | |
192 JSObject* receiver, | |
193 bool is_store, | |
194 StrictModeFlag strict_mode); | |
195 // --- | 191 // --- |
196 | 192 |
197 MUST_USE_RESULT MaybeObject* ComputeCallField( | 193 MUST_USE_RESULT MaybeObject* ComputeCallField( |
198 int argc, | 194 int argc, |
199 InLoopFlag in_loop, | 195 InLoopFlag in_loop, |
200 Code::Kind, | 196 Code::Kind, |
201 Code::ExtraICState extra_ic_state, | 197 Code::ExtraICState extra_ic_state, |
202 String* name, | 198 String* name, |
203 Object* object, | 199 Object* object, |
204 JSObject* holder, | 200 JSObject* holder, |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 Object* value); | 639 Object* value); |
644 | 640 |
645 MUST_USE_RESULT MaybeObject* CompileLoadInterceptor(JSObject* object, | 641 MUST_USE_RESULT MaybeObject* CompileLoadInterceptor(JSObject* object, |
646 JSObject* holder, | 642 JSObject* holder, |
647 String* name); | 643 String* name); |
648 | 644 |
649 MUST_USE_RESULT MaybeObject* CompileLoadArrayLength(String* name); | 645 MUST_USE_RESULT MaybeObject* CompileLoadArrayLength(String* name); |
650 MUST_USE_RESULT MaybeObject* CompileLoadStringLength(String* name); | 646 MUST_USE_RESULT MaybeObject* CompileLoadStringLength(String* name); |
651 MUST_USE_RESULT MaybeObject* CompileLoadFunctionPrototype(String* name); | 647 MUST_USE_RESULT MaybeObject* CompileLoadFunctionPrototype(String* name); |
652 | 648 |
653 MUST_USE_RESULT MaybeObject* CompileLoadFastElement(Map* receiver_map); | 649 MUST_USE_RESULT MaybeObject* CompileLoadElement(Map* receiver_map); |
654 | 650 |
655 MUST_USE_RESULT MaybeObject* CompileLoadMegamorphic( | 651 MUST_USE_RESULT MaybeObject* CompileLoadMegamorphic( |
656 MapList* receiver_maps, | 652 MapList* receiver_maps, |
657 CodeList* handler_ics); | 653 CodeList* handler_ics); |
658 | 654 |
659 static void GenerateLoadExternalArray(MacroAssembler* masm, | 655 static void GenerateLoadExternalArray(MacroAssembler* masm, |
660 ExternalArrayType array_type); | 656 JSObject::ElementsKind elements_kind); |
661 | 657 |
662 static void GenerateLoadFastElement(MacroAssembler* masm); | 658 static void GenerateLoadFastElement(MacroAssembler* masm); |
663 | 659 |
664 private: | 660 private: |
665 MaybeObject* GetCode(PropertyType type, | 661 MaybeObject* GetCode(PropertyType type, |
666 String* name, | 662 String* name, |
667 InlineCacheState state = MONOMORPHIC); | 663 InlineCacheState state = MONOMORPHIC); |
668 }; | 664 }; |
669 | 665 |
670 | 666 |
(...skipping 27 matching lines...) Expand all Loading... |
698 class KeyedStoreStubCompiler: public StubCompiler { | 694 class KeyedStoreStubCompiler: public StubCompiler { |
699 public: | 695 public: |
700 explicit KeyedStoreStubCompiler(StrictModeFlag strict_mode) | 696 explicit KeyedStoreStubCompiler(StrictModeFlag strict_mode) |
701 : strict_mode_(strict_mode) { } | 697 : strict_mode_(strict_mode) { } |
702 | 698 |
703 MUST_USE_RESULT MaybeObject* CompileStoreField(JSObject* object, | 699 MUST_USE_RESULT MaybeObject* CompileStoreField(JSObject* object, |
704 int index, | 700 int index, |
705 Map* transition, | 701 Map* transition, |
706 String* name); | 702 String* name); |
707 | 703 |
708 MUST_USE_RESULT MaybeObject* CompileStoreFastElement(Map* receiver_map); | 704 MUST_USE_RESULT MaybeObject* CompileStoreElement(Map* receiver_map); |
709 | 705 |
710 MUST_USE_RESULT MaybeObject* CompileStoreMegamorphic( | 706 MUST_USE_RESULT MaybeObject* CompileStoreMegamorphic( |
711 MapList* receiver_maps, | 707 MapList* receiver_maps, |
712 CodeList* handler_ics); | 708 CodeList* handler_ics); |
713 | 709 |
714 static void GenerateStoreFastElement(MacroAssembler* masm, | 710 static void GenerateStoreFastElement(MacroAssembler* masm, |
715 bool is_js_array); | 711 bool is_js_array); |
716 | 712 |
717 static void GenerateStoreExternalArray(MacroAssembler* masm, | 713 static void GenerateStoreExternalArray(MacroAssembler* masm, |
718 ExternalArrayType array_type); | 714 JSObject::ElementsKind elements_kind); |
719 | 715 |
720 private: | 716 private: |
721 MaybeObject* GetCode(PropertyType type, | 717 MaybeObject* GetCode(PropertyType type, |
722 String* name, | 718 String* name, |
723 InlineCacheState state = MONOMORPHIC); | 719 InlineCacheState state = MONOMORPHIC); |
724 | 720 |
725 StrictModeFlag strict_mode_; | 721 StrictModeFlag strict_mode_; |
726 }; | 722 }; |
727 | 723 |
728 | 724 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
887 // Determines whether the given function can be called using the | 883 // Determines whether the given function can be called using the |
888 // fast api call builtin. | 884 // fast api call builtin. |
889 void AnalyzePossibleApiFunction(JSFunction* function); | 885 void AnalyzePossibleApiFunction(JSFunction* function); |
890 | 886 |
891 JSFunction* constant_function_; | 887 JSFunction* constant_function_; |
892 bool is_simple_api_call_; | 888 bool is_simple_api_call_; |
893 FunctionTemplateInfo* expected_receiver_type_; | 889 FunctionTemplateInfo* expected_receiver_type_; |
894 CallHandlerInfo* api_call_info_; | 890 CallHandlerInfo* api_call_info_; |
895 }; | 891 }; |
896 | 892 |
897 class ExternalArrayLoadStubCompiler: public StubCompiler { | |
898 public: | |
899 explicit ExternalArrayLoadStubCompiler(StrictModeFlag strict_mode) | |
900 : strict_mode_(strict_mode) { } | |
901 | |
902 MUST_USE_RESULT MaybeObject* CompileLoad( | |
903 JSObject* receiver, ExternalArrayType array_type); | |
904 | |
905 private: | |
906 MaybeObject* GetCode(); | |
907 | |
908 StrictModeFlag strict_mode_; | |
909 }; | |
910 | |
911 | |
912 class ExternalArrayStoreStubCompiler: public StubCompiler { | |
913 public: | |
914 explicit ExternalArrayStoreStubCompiler(StrictModeFlag strict_mode) | |
915 : strict_mode_(strict_mode) {} | |
916 | |
917 MUST_USE_RESULT MaybeObject* CompileStore( | |
918 JSObject* receiver, ExternalArrayType array_type); | |
919 | |
920 private: | |
921 MaybeObject* GetCode(); | |
922 | |
923 StrictModeFlag strict_mode_; | |
924 }; | |
925 | |
926 | 893 |
927 } } // namespace v8::internal | 894 } } // namespace v8::internal |
928 | 895 |
929 #endif // V8_STUB_CACHE_H_ | 896 #endif // V8_STUB_CACHE_H_ |
OLD | NEW |