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

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

Issue 2673383002: [ic] Encode LoadGlobalIC's typeof mode in slot kind instead of code object's flags. (Closed)
Patch Set: Addressed comments and added check to FCG Created 3 years, 10 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/ic/ia32/handler-compiler-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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 269
270 270
271 class LoadIC : public IC { 271 class LoadIC : public IC {
272 public: 272 public:
273 LoadIC(FrameDepth depth, Isolate* isolate, FeedbackNexus* nexus = NULL) 273 LoadIC(FrameDepth depth, Isolate* isolate, FeedbackNexus* nexus = NULL)
274 : IC(depth, isolate, nexus) { 274 : IC(depth, isolate, nexus) {
275 DCHECK(nexus != NULL); 275 DCHECK(nexus != NULL);
276 DCHECK(IsLoadStub()); 276 DCHECK(IsLoadStub());
277 } 277 }
278 278
279 static bool ShouldThrowReferenceError(FeedbackVectorSlotKind kind) {
280 return kind == FeedbackVectorSlotKind::LOAD_GLOBAL_NOT_INSIDE_TYPEOF_IC;
281 }
282
279 bool ShouldThrowReferenceError() const { 283 bool ShouldThrowReferenceError() const {
280 return kind() == Code::LOAD_GLOBAL_IC && 284 return UseVector() && ShouldThrowReferenceError(
281 LoadGlobalICState::GetTypeofMode(extra_ic_state()) == 285 nexus()->vector()->GetKind(nexus()->slot()));
282 NOT_INSIDE_TYPEOF;
283 } 286 }
284 287
285 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, 288 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object,
286 Handle<Name> name); 289 Handle<Name> name);
287 290
288 static void Clear(Isolate* isolate, Code* host, LoadICNexus* nexus); 291 static void Clear(Isolate* isolate, Code* host, LoadICNexus* nexus);
289 292
290 protected: 293 protected:
291 virtual Handle<Code> slow_stub() const { 294 virtual Handle<Code> slow_stub() const {
292 return isolate()->builtins()->LoadIC_Slow(); 295 return isolate()->builtins()->LoadIC_Slow();
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 487
485 // Helper for BinaryOpIC and CompareIC. 488 // Helper for BinaryOpIC and CompareIC.
486 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; 489 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK };
487 void PatchInlinedSmiCode(Isolate* isolate, Address address, 490 void PatchInlinedSmiCode(Isolate* isolate, Address address,
488 InlinedSmiCheck check); 491 InlinedSmiCheck check);
489 492
490 } // namespace internal 493 } // namespace internal
491 } // namespace v8 494 } // namespace v8
492 495
493 #endif // V8_IC_H_ 496 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « src/ic/ia32/handler-compiler-ia32.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698