Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/stub-cache.h

Issue 10656018: Separate stub types from property types. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Also moving all other bits to the left Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/property-details.h ('k') | src/stub-cache.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 Handle<JSObject> holder, 621 Handle<JSObject> holder,
622 Handle<String> name); 622 Handle<String> name);
623 623
624 Handle<Code> CompileLoadGlobal(Handle<JSObject> object, 624 Handle<Code> CompileLoadGlobal(Handle<JSObject> object,
625 Handle<GlobalObject> holder, 625 Handle<GlobalObject> holder,
626 Handle<JSGlobalPropertyCell> cell, 626 Handle<JSGlobalPropertyCell> cell,
627 Handle<String> name, 627 Handle<String> name,
628 bool is_dont_delete); 628 bool is_dont_delete);
629 629
630 private: 630 private:
631 Handle<Code> GetCode(PropertyType type, Handle<String> name); 631 Handle<Code> GetCode(Code::StubType type, Handle<String> name);
632 }; 632 };
633 633
634 634
635 class KeyedLoadStubCompiler: public StubCompiler { 635 class KeyedLoadStubCompiler: public StubCompiler {
636 public: 636 public:
637 explicit KeyedLoadStubCompiler(Isolate* isolate) : StubCompiler(isolate) { } 637 explicit KeyedLoadStubCompiler(Isolate* isolate) : StubCompiler(isolate) { }
638 638
639 Handle<Code> CompileLoadField(Handle<String> name, 639 Handle<Code> CompileLoadField(Handle<String> name,
640 Handle<JSObject> object, 640 Handle<JSObject> object,
641 Handle<JSObject> holder, 641 Handle<JSObject> holder,
(...skipping 27 matching lines...) Expand all
669 static void GenerateLoadExternalArray(MacroAssembler* masm, 669 static void GenerateLoadExternalArray(MacroAssembler* masm,
670 ElementsKind elements_kind); 670 ElementsKind elements_kind);
671 671
672 static void GenerateLoadFastElement(MacroAssembler* masm); 672 static void GenerateLoadFastElement(MacroAssembler* masm);
673 673
674 static void GenerateLoadFastDoubleElement(MacroAssembler* masm); 674 static void GenerateLoadFastDoubleElement(MacroAssembler* masm);
675 675
676 static void GenerateLoadDictionaryElement(MacroAssembler* masm); 676 static void GenerateLoadDictionaryElement(MacroAssembler* masm);
677 677
678 private: 678 private:
679 Handle<Code> GetCode(PropertyType type, 679 Handle<Code> GetCode(Code::StubType type,
680 Handle<String> name, 680 Handle<String> name,
681 InlineCacheState state = MONOMORPHIC); 681 InlineCacheState state = MONOMORPHIC);
682 }; 682 };
683 683
684 684
685 class StoreStubCompiler: public StubCompiler { 685 class StoreStubCompiler: public StubCompiler {
686 public: 686 public:
687 StoreStubCompiler(Isolate* isolate, StrictModeFlag strict_mode) 687 StoreStubCompiler(Isolate* isolate, StrictModeFlag strict_mode)
688 : StubCompiler(isolate), strict_mode_(strict_mode) { } 688 : StubCompiler(isolate), strict_mode_(strict_mode) { }
689 689
(...skipping 12 matching lines...) Expand all
702 Handle<String> name); 702 Handle<String> name);
703 703
704 Handle<Code> CompileStoreInterceptor(Handle<JSObject> object, 704 Handle<Code> CompileStoreInterceptor(Handle<JSObject> object,
705 Handle<String> name); 705 Handle<String> name);
706 706
707 Handle<Code> CompileStoreGlobal(Handle<GlobalObject> object, 707 Handle<Code> CompileStoreGlobal(Handle<GlobalObject> object,
708 Handle<JSGlobalPropertyCell> holder, 708 Handle<JSGlobalPropertyCell> holder,
709 Handle<String> name); 709 Handle<String> name);
710 710
711 private: 711 private:
712 Handle<Code> GetCode(PropertyType type, Handle<String> name); 712 Handle<Code> GetCode(Code::StubType type, Handle<String> name);
713 713
714 StrictModeFlag strict_mode_; 714 StrictModeFlag strict_mode_;
715 }; 715 };
716 716
717 717
718 class KeyedStoreStubCompiler: public StubCompiler { 718 class KeyedStoreStubCompiler: public StubCompiler {
719 public: 719 public:
720 KeyedStoreStubCompiler(Isolate* isolate, 720 KeyedStoreStubCompiler(Isolate* isolate,
721 StrictModeFlag strict_mode, 721 StrictModeFlag strict_mode,
722 KeyedAccessGrowMode grow_mode) 722 KeyedAccessGrowMode grow_mode)
(...skipping 20 matching lines...) Expand all
743 static void GenerateStoreFastDoubleElement(MacroAssembler* masm, 743 static void GenerateStoreFastDoubleElement(MacroAssembler* masm,
744 bool is_js_array, 744 bool is_js_array,
745 KeyedAccessGrowMode grow_mode); 745 KeyedAccessGrowMode grow_mode);
746 746
747 static void GenerateStoreExternalArray(MacroAssembler* masm, 747 static void GenerateStoreExternalArray(MacroAssembler* masm,
748 ElementsKind elements_kind); 748 ElementsKind elements_kind);
749 749
750 static void GenerateStoreDictionaryElement(MacroAssembler* masm); 750 static void GenerateStoreDictionaryElement(MacroAssembler* masm);
751 751
752 private: 752 private:
753 Handle<Code> GetCode(PropertyType type, 753 Handle<Code> GetCode(Code::StubType type,
754 Handle<String> name, 754 Handle<String> name,
755 InlineCacheState state = MONOMORPHIC); 755 InlineCacheState state = MONOMORPHIC);
756 756
757 StrictModeFlag strict_mode_; 757 StrictModeFlag strict_mode_;
758 KeyedAccessGrowMode grow_mode_; 758 KeyedAccessGrowMode grow_mode_;
759 }; 759 };
760 760
761 761
762 // Subset of FUNCTIONS_WITH_ID_LIST with custom constant/global call 762 // Subset of FUNCTIONS_WITH_ID_LIST with custom constant/global call
763 // IC stubs. 763 // IC stubs.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 CUSTOM_CALL_IC_GENERATORS(DECLARE_CALL_GENERATOR) 823 CUSTOM_CALL_IC_GENERATORS(DECLARE_CALL_GENERATOR)
824 #undef DECLARE_CALL_GENERATOR 824 #undef DECLARE_CALL_GENERATOR
825 825
826 Handle<Code> CompileFastApiCall(const CallOptimization& optimization, 826 Handle<Code> CompileFastApiCall(const CallOptimization& optimization,
827 Handle<Object> object, 827 Handle<Object> object,
828 Handle<JSObject> holder, 828 Handle<JSObject> holder,
829 Handle<JSGlobalPropertyCell> cell, 829 Handle<JSGlobalPropertyCell> cell,
830 Handle<JSFunction> function, 830 Handle<JSFunction> function,
831 Handle<String> name); 831 Handle<String> name);
832 832
833 Handle<Code> GetCode(PropertyType type, Handle<String> name); 833 Handle<Code> GetCode(Code::StubType type, Handle<String> name);
834 Handle<Code> GetCode(Handle<JSFunction> function); 834 Handle<Code> GetCode(Handle<JSFunction> function);
835 835
836 const ParameterCount& arguments() { return arguments_; } 836 const ParameterCount& arguments() { return arguments_; }
837 837
838 void GenerateNameCheck(Handle<String> name, Label* miss); 838 void GenerateNameCheck(Handle<String> name, Label* miss);
839 839
840 void GenerateGlobalReceiverCheck(Handle<JSObject> object, 840 void GenerateGlobalReceiverCheck(Handle<JSObject> object,
841 Handle<JSObject> holder, 841 Handle<JSObject> holder,
842 Handle<String> name, 842 Handle<String> name,
843 Label* miss); 843 Label* miss);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 Handle<JSFunction> constant_function_; 914 Handle<JSFunction> constant_function_;
915 bool is_simple_api_call_; 915 bool is_simple_api_call_;
916 Handle<FunctionTemplateInfo> expected_receiver_type_; 916 Handle<FunctionTemplateInfo> expected_receiver_type_;
917 Handle<CallHandlerInfo> api_call_info_; 917 Handle<CallHandlerInfo> api_call_info_;
918 }; 918 };
919 919
920 920
921 } } // namespace v8::internal 921 } } // namespace v8::internal
922 922
923 #endif // V8_STUB_CACHE_H_ 923 #endif // V8_STUB_CACHE_H_
OLDNEW
« no previous file with comments | « src/property-details.h ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698