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

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

Issue 14063006: Disentangle field from transition stores. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 8 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/ic.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 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 Handle<Code> ComputeKeyedLoadInterceptor(Handle<Name> name, 156 Handle<Code> ComputeKeyedLoadInterceptor(Handle<Name> name,
157 Handle<JSObject> object, 157 Handle<JSObject> object,
158 Handle<JSObject> holder); 158 Handle<JSObject> holder);
159 159
160 // --- 160 // ---
161 161
162 Handle<Code> ComputeStoreField(Handle<Name> name, 162 Handle<Code> ComputeStoreField(Handle<Name> name,
163 Handle<JSObject> object, 163 Handle<JSObject> object,
164 LookupResult* lookup, 164 LookupResult* lookup,
165 Handle<Map> transition,
166 StrictModeFlag strict_mode); 165 StrictModeFlag strict_mode);
167 166
167 Handle<Code> ComputeStoreTransition(Handle<Name> name,
168 Handle<JSObject> object,
169 LookupResult* lookup,
170 Handle<Map> transition,
171 StrictModeFlag strict_mode);
172
168 Handle<Code> ComputeStoreNormal(StrictModeFlag strict_mode); 173 Handle<Code> ComputeStoreNormal(StrictModeFlag strict_mode);
169 174
170 Handle<Code> ComputeStoreGlobal(Handle<Name> name, 175 Handle<Code> ComputeStoreGlobal(Handle<Name> name,
171 Handle<GlobalObject> object, 176 Handle<GlobalObject> object,
172 Handle<JSGlobalPropertyCell> cell, 177 Handle<JSGlobalPropertyCell> cell,
173 StrictModeFlag strict_mode); 178 StrictModeFlag strict_mode);
174 179
175 Handle<Code> ComputeStoreCallback(Handle<Name> name, 180 Handle<Code> ComputeStoreCallback(Handle<Name> name,
176 Handle<JSObject> object, 181 Handle<JSObject> object,
177 Handle<JSObject> holder, 182 Handle<JSObject> holder,
178 Handle<ExecutableAccessorInfo> callback, 183 Handle<ExecutableAccessorInfo> callback,
179 StrictModeFlag strict_mode); 184 StrictModeFlag strict_mode);
180 185
181 Handle<Code> ComputeStoreViaSetter(Handle<Name> name, 186 Handle<Code> ComputeStoreViaSetter(Handle<Name> name,
182 Handle<JSObject> object, 187 Handle<JSObject> object,
183 Handle<JSObject> holder, 188 Handle<JSObject> holder,
184 Handle<JSFunction> setter, 189 Handle<JSFunction> setter,
185 StrictModeFlag strict_mode); 190 StrictModeFlag strict_mode);
186 191
187 Handle<Code> ComputeStoreInterceptor(Handle<Name> name, 192 Handle<Code> ComputeStoreInterceptor(Handle<Name> name,
188 Handle<JSObject> object, 193 Handle<JSObject> object,
189 StrictModeFlag strict_mode); 194 StrictModeFlag strict_mode);
190 195
191 // --- 196 // ---
192 197
193 Handle<Code> ComputeKeyedStoreField(Handle<Name> name, 198 Handle<Code> ComputeKeyedStoreField(Handle<Name> name,
194 Handle<JSObject> object, 199 Handle<JSObject> object,
195 LookupResult* lookup, 200 LookupResult* lookup,
196 Handle<Map> transition,
197 StrictModeFlag strict_mode); 201 StrictModeFlag strict_mode);
202 Handle<Code> ComputeKeyedStoreTransition(Handle<Name> name,
203 Handle<JSObject> object,
204 LookupResult* lookup,
205 Handle<Map> transition,
206 StrictModeFlag strict_mode);
198 207
199 Handle<Code> ComputeKeyedLoadElement(Handle<Map> receiver_map); 208 Handle<Code> ComputeKeyedLoadElement(Handle<Map> receiver_map);
200 209
201 Handle<Code> ComputeKeyedStoreElement(Handle<Map> receiver_map, 210 Handle<Code> ComputeKeyedStoreElement(Handle<Map> receiver_map,
202 StrictModeFlag strict_mode, 211 StrictModeFlag strict_mode,
203 KeyedAccessStoreMode store_mode); 212 KeyedAccessStoreMode store_mode);
204 213
205 // --- 214 // ---
206 215
207 Handle<Code> ComputeCallField(int argc, 216 Handle<Code> ComputeCallField(int argc,
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 Register scratch2, 511 Register scratch2,
503 Label* miss_label, 512 Label* miss_label,
504 bool support_wrappers); 513 bool support_wrappers);
505 514
506 static void GenerateLoadFunctionPrototype(MacroAssembler* masm, 515 static void GenerateLoadFunctionPrototype(MacroAssembler* masm,
507 Register receiver, 516 Register receiver,
508 Register scratch1, 517 Register scratch1,
509 Register scratch2, 518 Register scratch2,
510 Label* miss_label); 519 Label* miss_label);
511 520
521 void GenerateStoreTransition(MacroAssembler* masm,
522 Handle<JSObject> object,
523 LookupResult* lookup,
524 Handle<Map> transition,
525 Handle<Name> name,
526 Register receiver_reg,
527 Register name_reg,
528 Register value_reg,
529 Register scratch1,
530 Register scratch2,
531 Label* miss_label,
532 Label* miss_restore_name);
533
512 void GenerateStoreField(MacroAssembler* masm, 534 void GenerateStoreField(MacroAssembler* masm,
513 Handle<JSObject> object, 535 Handle<JSObject> object,
514 LookupResult* lookup, 536 LookupResult* lookup,
515 Handle<Map> transition,
516 Handle<Name> name,
517 Register receiver_reg, 537 Register receiver_reg,
518 Register name_reg, 538 Register name_reg,
519 Register value_reg, 539 Register value_reg,
520 Register scratch1, 540 Register scratch1,
521 Register scratch2, 541 Register scratch2,
522 Label* miss_label, 542 Label* miss_label);
523 Label* miss_restore_name);
524 543
525 static Builtins::Name MissBuiltin(Code::Kind kind) { 544 static Builtins::Name MissBuiltin(Code::Kind kind) {
526 switch (kind) { 545 switch (kind) {
527 case Code::LOAD_IC: return Builtins::kLoadIC_Miss; 546 case Code::LOAD_IC: return Builtins::kLoadIC_Miss;
528 case Code::STORE_IC: return Builtins::kStoreIC_Miss; 547 case Code::STORE_IC: return Builtins::kStoreIC_Miss;
529 case Code::KEYED_LOAD_IC: return Builtins::kKeyedLoadIC_Miss; 548 case Code::KEYED_LOAD_IC: return Builtins::kKeyedLoadIC_Miss;
530 case Code::KEYED_STORE_IC: return Builtins::kKeyedStoreIC_Miss; 549 case Code::KEYED_STORE_IC: return Builtins::kKeyedStoreIC_Miss;
531 default: UNREACHABLE(); 550 default: UNREACHABLE();
532 } 551 }
533 return Builtins::kLoadIC_Miss; 552 return Builtins::kLoadIC_Miss;
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 public: 793 public:
775 BaseStoreStubCompiler(Isolate* isolate, 794 BaseStoreStubCompiler(Isolate* isolate,
776 StrictModeFlag strict_mode, 795 StrictModeFlag strict_mode,
777 Register* registers) 796 Register* registers)
778 : StubCompiler(isolate), 797 : StubCompiler(isolate),
779 strict_mode_(strict_mode), 798 strict_mode_(strict_mode),
780 registers_(registers) { } 799 registers_(registers) { }
781 800
782 virtual ~BaseStoreStubCompiler() { } 801 virtual ~BaseStoreStubCompiler() { }
783 802
803 Handle<Code> CompileStoreTransition(Handle<JSObject> object,
804 LookupResult* lookup,
805 Handle<Map> transition,
806 Handle<Name> name);
807
784 Handle<Code> CompileStoreField(Handle<JSObject> object, 808 Handle<Code> CompileStoreField(Handle<JSObject> object,
785 LookupResult* lookup, 809 LookupResult* lookup,
786 Handle<Map> transition,
787 Handle<Name> name); 810 Handle<Name> name);
788 811
789 protected: 812 protected:
790 Handle<Code> GetICCode(Code::Kind kind, 813 Handle<Code> GetICCode(Code::Kind kind,
791 Code::StubType type, 814 Code::StubType type,
792 Handle<Name> name, 815 Handle<Name> name,
793 InlineCacheState state = MONOMORPHIC); 816 InlineCacheState state = MONOMORPHIC);
794 817
795 Handle<Code> GetCode(Code::Kind kind, 818 Handle<Code> GetCode(Code::Kind kind,
796 Code::StubType type, 819 Code::StubType type,
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 Handle<JSFunction> constant_function_; 1100 Handle<JSFunction> constant_function_;
1078 bool is_simple_api_call_; 1101 bool is_simple_api_call_;
1079 Handle<FunctionTemplateInfo> expected_receiver_type_; 1102 Handle<FunctionTemplateInfo> expected_receiver_type_;
1080 Handle<CallHandlerInfo> api_call_info_; 1103 Handle<CallHandlerInfo> api_call_info_;
1081 }; 1104 };
1082 1105
1083 1106
1084 } } // namespace v8::internal 1107 } } // namespace v8::internal
1085 1108
1086 #endif // V8_STUB_CACHE_H_ 1109 #endif // V8_STUB_CACHE_H_
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698