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

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

Issue 1489413006: Revert of Provide call counts for constructor calls, surface them as a vector IC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/ia32/interface-descriptors-ia32.cc ('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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 return !FLAG_use_ic || state == UNINITIALIZED || state == PREMONOMORPHIC; 70 return !FLAG_use_ic || state == UNINITIALIZED || state == PREMONOMORPHIC;
71 } 71 }
72 72
73 static bool IsCleared(FeedbackNexus* nexus) { 73 static bool IsCleared(FeedbackNexus* nexus) {
74 InlineCacheState state = nexus->StateFromFeedback(); 74 InlineCacheState state = nexus->StateFromFeedback();
75 return !FLAG_use_ic || state == UNINITIALIZED || state == PREMONOMORPHIC; 75 return !FLAG_use_ic || state == UNINITIALIZED || state == PREMONOMORPHIC;
76 } 76 }
77 77
78 static bool ICUseVector(Code::Kind kind) { 78 static bool ICUseVector(Code::Kind kind) {
79 return kind == Code::LOAD_IC || kind == Code::KEYED_LOAD_IC || 79 return kind == Code::LOAD_IC || kind == Code::KEYED_LOAD_IC ||
80 kind == Code::CALL_IC || kind == Code::CONSTRUCT_IC || 80 kind == Code::CALL_IC || kind == Code::STORE_IC ||
81 kind == Code::STORE_IC || kind == Code::KEYED_STORE_IC; 81 kind == Code::KEYED_STORE_IC;
82 } 82 }
83 83
84 protected: 84 protected:
85 // Get the call-site target; used for determining the state. 85 // Get the call-site target; used for determining the state.
86 Handle<Code> target() const { return target_; } 86 Handle<Code> target() const { return target_; }
87 87
88 Address fp() const { return fp_; } 88 Address fp() const { return fp_; }
89 Address pc() const { return *pc_address_; } 89 Address pc() const { return *pc_address_; }
90 Isolate* isolate() const { return isolate_; } 90 Isolate* isolate() const { return isolate_; }
91 91
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 // Code generator routines. 287 // Code generator routines.
288 static Handle<Code> initialize_stub(Isolate* isolate, int argc, 288 static Handle<Code> initialize_stub(Isolate* isolate, int argc,
289 ConvertReceiverMode mode); 289 ConvertReceiverMode mode);
290 static Handle<Code> initialize_stub_in_optimized_code( 290 static Handle<Code> initialize_stub_in_optimized_code(
291 Isolate* isolate, int argc, ConvertReceiverMode mode); 291 Isolate* isolate, int argc, ConvertReceiverMode mode);
292 292
293 static void Clear(Isolate* isolate, Code* host, CallICNexus* nexus); 293 static void Clear(Isolate* isolate, Code* host, CallICNexus* nexus);
294 }; 294 };
295 295
296 296
297 class ConstructIC : public IC {
298 public:
299 ConstructIC(Isolate* isolate, ConstructICNexus* nexus)
300 : IC(EXTRA_CALL_FRAME, isolate, nexus) {
301 DCHECK(nexus != NULL);
302 }
303
304 static void Clear(Isolate* isolate, Code* host, ConstructICNexus* nexus);
305 };
306
307
308 class LoadIC : public IC { 297 class LoadIC : public IC {
309 public: 298 public:
310 static ExtraICState ComputeExtraICState(TypeofMode typeof_mode, 299 static ExtraICState ComputeExtraICState(TypeofMode typeof_mode,
311 LanguageMode language_mode) { 300 LanguageMode language_mode) {
312 return LoadICState(typeof_mode, language_mode).GetExtraICState(); 301 return LoadICState(typeof_mode, language_mode).GetExtraICState();
313 } 302 }
314 303
315 TypeofMode typeof_mode() const { 304 TypeofMode typeof_mode() const {
316 return LoadICState::GetTypeofMode(extra_ic_state()); 305 return LoadICState::GetTypeofMode(extra_ic_state());
317 } 306 }
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 664
676 // Helper for BinaryOpIC and CompareIC. 665 // Helper for BinaryOpIC and CompareIC.
677 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; 666 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK };
678 void PatchInlinedSmiCode(Isolate* isolate, Address address, 667 void PatchInlinedSmiCode(Isolate* isolate, Address address,
679 InlinedSmiCheck check); 668 InlinedSmiCheck check);
680 669
681 } // namespace internal 670 } // namespace internal
682 } // namespace v8 671 } // namespace v8
683 672
684 #endif // V8_IC_H_ 673 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « src/ia32/interface-descriptors-ia32.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698