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

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

Issue 9310117: Implement KeyedStoreICs to grow arrays on out-of-bound stores. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add missing WB stub Created 8 years, 10 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/profile-generator.cc ('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 2011 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
11 // with the distribution. 11 // with the distribution.
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 663
664 private: 664 private:
665 Handle<Code> GetCode(PropertyType type, Handle<String> name); 665 Handle<Code> GetCode(PropertyType type, Handle<String> name);
666 666
667 StrictModeFlag strict_mode_; 667 StrictModeFlag strict_mode_;
668 }; 668 };
669 669
670 670
671 class KeyedStoreStubCompiler: public StubCompiler { 671 class KeyedStoreStubCompiler: public StubCompiler {
672 public: 672 public:
673 KeyedStoreStubCompiler(Isolate* isolate, StrictModeFlag strict_mode) 673 KeyedStoreStubCompiler(Isolate* isolate,
674 : StubCompiler(isolate), strict_mode_(strict_mode) { } 674 StrictModeFlag strict_mode,
675 KeyedAccessGrowMode grow_mode)
676 : StubCompiler(isolate),
677 strict_mode_(strict_mode),
678 grow_mode_(grow_mode) { }
675 679
676 Handle<Code> CompileStoreField(Handle<JSObject> object, 680 Handle<Code> CompileStoreField(Handle<JSObject> object,
677 int index, 681 int index,
678 Handle<Map> transition, 682 Handle<Map> transition,
679 Handle<String> name); 683 Handle<String> name);
680 684
681 Handle<Code> CompileStoreElement(Handle<Map> receiver_map); 685 Handle<Code> CompileStoreElement(Handle<Map> receiver_map);
682 686
683 Handle<Code> CompileStorePolymorphic(MapHandleList* receiver_maps, 687 Handle<Code> CompileStorePolymorphic(MapHandleList* receiver_maps,
684 CodeHandleList* handler_stubs, 688 CodeHandleList* handler_stubs,
685 MapHandleList* transitioned_maps); 689 MapHandleList* transitioned_maps);
686 690
687 static void GenerateStoreFastElement(MacroAssembler* masm, 691 static void GenerateStoreFastElement(MacroAssembler* masm,
688 bool is_js_array, 692 bool is_js_array,
689 ElementsKind element_kind); 693 ElementsKind element_kind,
694 KeyedAccessGrowMode grow_mode);
690 695
691 static void GenerateStoreFastDoubleElement(MacroAssembler* masm, 696 static void GenerateStoreFastDoubleElement(MacroAssembler* masm,
692 bool is_js_array); 697 bool is_js_array,
698 KeyedAccessGrowMode grow_mode);
693 699
694 static void GenerateStoreExternalArray(MacroAssembler* masm, 700 static void GenerateStoreExternalArray(MacroAssembler* masm,
695 ElementsKind elements_kind); 701 ElementsKind elements_kind);
696 702
697 static void GenerateStoreDictionaryElement(MacroAssembler* masm); 703 static void GenerateStoreDictionaryElement(MacroAssembler* masm);
698 704
699 private: 705 private:
700 Handle<Code> GetCode(PropertyType type, 706 Handle<Code> GetCode(PropertyType type,
701 Handle<String> name, 707 Handle<String> name,
702 InlineCacheState state = MONOMORPHIC); 708 InlineCacheState state = MONOMORPHIC);
703 709
704 StrictModeFlag strict_mode_; 710 StrictModeFlag strict_mode_;
711 KeyedAccessGrowMode grow_mode_;
705 }; 712 };
706 713
707 714
708 // Subset of FUNCTIONS_WITH_ID_LIST with custom constant/global call 715 // Subset of FUNCTIONS_WITH_ID_LIST with custom constant/global call
709 // IC stubs. 716 // IC stubs.
710 #define CUSTOM_CALL_IC_GENERATORS(V) \ 717 #define CUSTOM_CALL_IC_GENERATORS(V) \
711 V(ArrayPush) \ 718 V(ArrayPush) \
712 V(ArrayPop) \ 719 V(ArrayPop) \
713 V(StringCharCodeAt) \ 720 V(StringCharCodeAt) \
714 V(StringCharAt) \ 721 V(StringCharAt) \
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 Handle<JSFunction> constant_function_; 867 Handle<JSFunction> constant_function_;
861 bool is_simple_api_call_; 868 bool is_simple_api_call_;
862 Handle<FunctionTemplateInfo> expected_receiver_type_; 869 Handle<FunctionTemplateInfo> expected_receiver_type_;
863 Handle<CallHandlerInfo> api_call_info_; 870 Handle<CallHandlerInfo> api_call_info_;
864 }; 871 };
865 872
866 873
867 } } // namespace v8::internal 874 } } // namespace v8::internal
868 875
869 #endif // V8_STUB_CACHE_H_ 876 #endif // V8_STUB_CACHE_H_
OLDNEW
« no previous file with comments | « src/profile-generator.cc ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698