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

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

Issue 8166017: Track elements_kind transitions in KeyedStoreICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix nits Created 9 years, 2 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/runtime.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 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 12 matching lines...) Expand all
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #ifndef V8_STUB_CACHE_H_ 28 #ifndef V8_STUB_CACHE_H_
29 #define V8_STUB_CACHE_H_ 29 #define V8_STUB_CACHE_H_
30 30
31 #include "allocation.h" 31 #include "allocation.h"
32 #include "arguments.h" 32 #include "arguments.h"
33 #include "ic-inl.h"
33 #include "macro-assembler.h" 34 #include "macro-assembler.h"
34 #include "objects.h" 35 #include "objects.h"
35 #include "zone-inl.h" 36 #include "zone-inl.h"
36 37
37 namespace v8 { 38 namespace v8 {
38 namespace internal { 39 namespace internal {
39 40
40 41
41 // The stub cache is used for megamorphic calls and property accesses. 42 // The stub cache is used for megamorphic calls and property accesses.
42 // It maps (map, name, type)->Code* 43 // It maps (map, name, type)->Code*
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 181
181 MUST_USE_RESULT MaybeObject* ComputeKeyedStoreField( 182 MUST_USE_RESULT MaybeObject* ComputeKeyedStoreField(
182 String* name, 183 String* name,
183 JSObject* receiver, 184 JSObject* receiver,
184 int field_index, 185 int field_index,
185 Map* transition, 186 Map* transition,
186 StrictModeFlag strict_mode); 187 StrictModeFlag strict_mode);
187 188
188 MUST_USE_RESULT MaybeObject* ComputeKeyedLoadOrStoreElement( 189 MUST_USE_RESULT MaybeObject* ComputeKeyedLoadOrStoreElement(
189 JSObject* receiver, 190 JSObject* receiver,
190 bool is_store, 191 KeyedIC::StubKind stub_kind,
191 StrictModeFlag strict_mode); 192 StrictModeFlag strict_mode);
192 193
193 // --- 194 // ---
194 195
195 MUST_USE_RESULT MaybeObject* ComputeCallField( 196 MUST_USE_RESULT MaybeObject* ComputeCallField(
196 int argc, 197 int argc,
197 Code::Kind, 198 Code::Kind,
198 Code::ExtraICState extra_ic_state, 199 Code::ExtraICState extra_ic_state,
199 String* name, 200 String* name,
200 Object* object, 201 Object* object,
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 explicit KeyedStoreStubCompiler(StrictModeFlag strict_mode) 693 explicit KeyedStoreStubCompiler(StrictModeFlag strict_mode)
693 : strict_mode_(strict_mode) { } 694 : strict_mode_(strict_mode) { }
694 695
695 MUST_USE_RESULT MaybeObject* CompileStoreField(JSObject* object, 696 MUST_USE_RESULT MaybeObject* CompileStoreField(JSObject* object,
696 int index, 697 int index,
697 Map* transition, 698 Map* transition,
698 String* name); 699 String* name);
699 700
700 MUST_USE_RESULT MaybeObject* CompileStoreElement(Map* receiver_map); 701 MUST_USE_RESULT MaybeObject* CompileStoreElement(Map* receiver_map);
701 702
703 MUST_USE_RESULT MaybeObject* CompileStoreElementWithTransition(
704 Map* transitioned_map,
705 Map* untransitioned_map_1,
706 Map* untransitioned_map_2 = NULL);
707
702 MUST_USE_RESULT MaybeObject* CompileStoreMegamorphic( 708 MUST_USE_RESULT MaybeObject* CompileStoreMegamorphic(
703 MapList* receiver_maps, 709 MapList* receiver_maps,
704 CodeList* handler_ics); 710 CodeList* handler_ics);
705 711
706 static void GenerateStoreFastElement(MacroAssembler* masm, 712 static void GenerateStoreFastElement(MacroAssembler* masm,
707 bool is_js_array, 713 bool is_js_array,
708 ElementsKind element_kind); 714 ElementsKind element_kind);
709 715
710 static void GenerateStoreFastDoubleElement(MacroAssembler* masm, 716 static void GenerateStoreFastDoubleElement(MacroAssembler* masm,
711 bool is_js_array); 717 bool is_js_array);
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 JSFunction* constant_function_; 893 JSFunction* constant_function_;
888 bool is_simple_api_call_; 894 bool is_simple_api_call_;
889 FunctionTemplateInfo* expected_receiver_type_; 895 FunctionTemplateInfo* expected_receiver_type_;
890 CallHandlerInfo* api_call_info_; 896 CallHandlerInfo* api_call_info_;
891 }; 897 };
892 898
893 899
894 } } // namespace v8::internal 900 } } // namespace v8::internal
895 901
896 #endif // V8_STUB_CACHE_H_ 902 #endif // V8_STUB_CACHE_H_
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698