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

Powered by Google App Engine
This is Rietveld 408576698