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

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

Issue 2052763003: [ic] [stubs] Remove InlineCacheState field from the code flags. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 | « src/globals.h ('k') | src/ic/ic.cc » ('j') | src/objects.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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #endif 56 #endif
57 57
58 static inline Handle<Map> GetHandlerCacheHolder(Handle<Map> receiver_map, 58 static inline Handle<Map> GetHandlerCacheHolder(Handle<Map> receiver_map,
59 bool receiver_is_holder, 59 bool receiver_is_holder,
60 Isolate* isolate, 60 Isolate* isolate,
61 CacheHolderFlag* flag); 61 CacheHolderFlag* flag);
62 static inline Handle<Map> GetICCacheHolder(Handle<Map> receiver_map, 62 static inline Handle<Map> GetICCacheHolder(Handle<Map> receiver_map,
63 Isolate* isolate, 63 Isolate* isolate,
64 CacheHolderFlag* flag); 64 CacheHolderFlag* flag);
65 65
66 static bool IsCleared(Code* code) {
67 InlineCacheState state = code->ic_state();
68 return !FLAG_use_ic || state == UNINITIALIZED || state == PREMONOMORPHIC;
69 }
70
71 static bool IsCleared(FeedbackNexus* nexus) { 66 static bool IsCleared(FeedbackNexus* nexus) {
72 InlineCacheState state = nexus->StateFromFeedback(); 67 InlineCacheState state = nexus->StateFromFeedback();
73 return !FLAG_use_ic || state == UNINITIALIZED || state == PREMONOMORPHIC; 68 return !FLAG_use_ic || state == UNINITIALIZED || state == PREMONOMORPHIC;
74 } 69 }
75 70
76 static bool ICUseVector(Code::Kind kind) { 71 static bool ICUseVector(Code::Kind kind) {
77 return kind == Code::LOAD_IC || kind == Code::KEYED_LOAD_IC || 72 return kind == Code::LOAD_IC || kind == Code::KEYED_LOAD_IC ||
78 kind == Code::CALL_IC || kind == Code::STORE_IC || 73 kind == Code::CALL_IC || kind == Code::STORE_IC ||
79 kind == Code::KEYED_STORE_IC; 74 kind == Code::KEYED_STORE_IC;
80 } 75 }
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 493
499 // Helper for BinaryOpIC and CompareIC. 494 // Helper for BinaryOpIC and CompareIC.
500 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; 495 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK };
501 void PatchInlinedSmiCode(Isolate* isolate, Address address, 496 void PatchInlinedSmiCode(Isolate* isolate, Address address,
502 InlinedSmiCheck check); 497 InlinedSmiCheck check);
503 498
504 } // namespace internal 499 } // namespace internal
505 } // namespace v8 500 } // namespace v8
506 501
507 #endif // V8_IC_H_ 502 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « src/globals.h ('k') | src/ic/ic.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698