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

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: Rebasing 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') | 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 // 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 }
81 76
77 static InlineCacheState StateFromCode(Code* code);
78
82 protected: 79 protected:
83 Address fp() const { return fp_; } 80 Address fp() const { return fp_; }
84 Address pc() const { return *pc_address_; } 81 Address pc() const { return *pc_address_; }
85 Isolate* isolate() const { return isolate_; } 82 Isolate* isolate() const { return isolate_; }
86 83
87 // Get the shared function info of the caller. 84 // Get the shared function info of the caller.
88 SharedFunctionInfo* GetSharedFunctionInfo() const; 85 SharedFunctionInfo* GetSharedFunctionInfo() const;
89 // Get the code object of the caller. 86 // Get the code object of the caller.
90 Code* GetCode() const; 87 Code* GetCode() const;
91 88
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 495
499 // Helper for BinaryOpIC and CompareIC. 496 // Helper for BinaryOpIC and CompareIC.
500 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; 497 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK };
501 void PatchInlinedSmiCode(Isolate* isolate, Address address, 498 void PatchInlinedSmiCode(Isolate* isolate, Address address,
502 InlinedSmiCheck check); 499 InlinedSmiCheck check);
503 500
504 } // namespace internal 501 } // namespace internal
505 } // namespace v8 502 } // namespace v8
506 503
507 #endif // V8_IC_H_ 504 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « src/globals.h ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698