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

Side by Side Diff: src/ic/ic.h

Issue 1221433010: Move compatible receiver check from CompileHandler to UpdateCaches (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | src/ic/ic.cc » ('j') | src/ic/ic.cc » ('J')
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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_IC_H_ 5 #ifndef V8_IC_H_
6 #define V8_IC_H_ 6 #define V8_IC_H_
7 7
8 #include "src/ic/ic-state.h" 8 #include "src/ic/ic-state.h"
9 #include "src/macro-assembler.h" 9 #include "src/macro-assembler.h"
10 #include "src/messages.h" 10 #include "src/messages.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 static void OnTypeFeedbackChanged(Isolate* isolate, Address address, 177 static void OnTypeFeedbackChanged(Isolate* isolate, Address address,
178 State old_state, State new_state, 178 State old_state, State new_state,
179 bool target_remains_ic_stub); 179 bool target_remains_ic_stub);
180 // As a vector-based IC, type feedback must be updated differently. 180 // As a vector-based IC, type feedback must be updated differently.
181 static void OnTypeFeedbackChanged(Isolate* isolate, Code* host, 181 static void OnTypeFeedbackChanged(Isolate* isolate, Code* host,
182 TypeFeedbackVector* vector, State old_state, 182 TypeFeedbackVector* vector, State old_state,
183 State new_state); 183 State new_state);
184 static void PostPatching(Address address, Code* target, Code* old_target); 184 static void PostPatching(Address address, Code* target, Code* old_target);
185 185
186 // Compute the handler either by compiling or by retrieving a cached version. 186 // Compute the handler either by compiling or by retrieving a cached version.
187 Handle<Code> ComputeHandler(LookupIterator* lookup, 187 virtual Handle<Code> ComputeHandler(
188 Handle<Object> value = Handle<Code>::null()); 188 LookupIterator* lookup, Handle<Object> value = Handle<Code>::null());
189 virtual Handle<Code> CompileHandler(LookupIterator* lookup, 189 virtual Handle<Code> CompileHandler(LookupIterator* lookup,
190 Handle<Object> value, 190 Handle<Object> value,
191 CacheHolderFlag cache_holder) { 191 CacheHolderFlag cache_holder) {
192 UNREACHABLE(); 192 UNREACHABLE();
193 return Handle<Code>::null(); 193 return Handle<Code>::null();
194 } 194 }
195 195
196 void UpdateMonomorphicIC(Handle<Code> handler, Handle<Name> name); 196 void UpdateMonomorphicIC(Handle<Code> handler, Handle<Name> name);
197 bool UpdatePolymorphicIC(Handle<Name> name, Handle<Code> code); 197 bool UpdatePolymorphicIC(Handle<Name> name, Handle<Code> code);
198 void UpdateMegamorphicCache(Map* map, Name* name, Code* code); 198 void UpdateMegamorphicCache(Map* map, Name* name, Code* code);
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 : isolate()->builtins()->KeyedLoadIC_Slow(); 425 : isolate()->builtins()->KeyedLoadIC_Slow();
426 } 426 }
427 } 427 }
428 428
429 Handle<Code> megamorphic_stub() override; 429 Handle<Code> megamorphic_stub() override;
430 430
431 // Update the inline cache and the global stub cache based on the 431 // Update the inline cache and the global stub cache based on the
432 // lookup result. 432 // lookup result.
433 void UpdateCaches(LookupIterator* lookup); 433 void UpdateCaches(LookupIterator* lookup);
434 434
435 virtual Handle<Code> CompileHandler(LookupIterator* lookup, 435 Handle<Code> ComputeHandler(
436 Handle<Object> unused, 436 LookupIterator* lookup,
437 CacheHolderFlag cache_holder) override; 437 Handle<Object> value = Handle<Code>::null()) override;
438 Handle<Code> CompileHandler(LookupIterator* lookup, Handle<Object> unused,
439 CacheHolderFlag cache_holder) override;
438 440
439 private: 441 private:
440 Handle<Code> SimpleFieldLoad(FieldIndex index); 442 Handle<Code> SimpleFieldLoad(FieldIndex index);
441 443
442 static void Clear(Isolate* isolate, Address address, Code* target, 444 static void Clear(Isolate* isolate, Address address, Code* target,
443 Address constant_pool); 445 Address constant_pool);
444 446
445 friend class IC; 447 friend class IC;
446 }; 448 };
447 449
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 768
767 // Support functions for interceptor handlers. 769 // Support functions for interceptor handlers.
768 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); 770 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly);
769 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); 771 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor);
770 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); 772 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor);
771 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); 773 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor);
772 } 774 }
773 } // namespace v8::internal 775 } // namespace v8::internal
774 776
775 #endif // V8_IC_H_ 777 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « no previous file | src/ic/ic.cc » ('j') | src/ic/ic.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698