OLD | NEW |
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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 public: | 313 public: |
314 LoadGlobalIC(FrameDepth depth, Isolate* isolate, FeedbackNexus* nexus = NULL) | 314 LoadGlobalIC(FrameDepth depth, Isolate* isolate, FeedbackNexus* nexus = NULL) |
315 : LoadIC(depth, isolate, nexus) {} | 315 : LoadIC(depth, isolate, nexus) {} |
316 | 316 |
317 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Name> name); | 317 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Name> name); |
318 | 318 |
319 static void Clear(Isolate* isolate, Code* host, LoadGlobalICNexus* nexus); | 319 static void Clear(Isolate* isolate, Code* host, LoadGlobalICNexus* nexus); |
320 | 320 |
321 protected: | 321 protected: |
322 Handle<Code> slow_stub() const override { | 322 Handle<Code> slow_stub() const override { |
323 if (LoadGlobalICState::GetTypeofMode(extra_ic_state()) == | 323 return isolate()->builtins()->LoadGlobalIC_Slow(); |
324 NOT_INSIDE_TYPEOF) { | |
325 return isolate()->builtins()->LoadGlobalIC_SlowNotInsideTypeof(); | |
326 } else { | |
327 return isolate()->builtins()->LoadGlobalIC_SlowInsideTypeof(); | |
328 } | |
329 } | 324 } |
330 }; | 325 }; |
331 | 326 |
332 class KeyedLoadIC : public LoadIC { | 327 class KeyedLoadIC : public LoadIC { |
333 public: | 328 public: |
334 KeyedLoadIC(FrameDepth depth, Isolate* isolate, | 329 KeyedLoadIC(FrameDepth depth, Isolate* isolate, |
335 KeyedLoadICNexus* nexus = NULL) | 330 KeyedLoadICNexus* nexus = NULL) |
336 : LoadIC(depth, isolate, nexus) { | 331 : LoadIC(depth, isolate, nexus) { |
337 DCHECK(nexus != NULL); | 332 DCHECK(nexus != NULL); |
338 } | 333 } |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 | 499 |
505 // Helper for BinaryOpIC and CompareIC. | 500 // Helper for BinaryOpIC and CompareIC. |
506 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; | 501 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; |
507 void PatchInlinedSmiCode(Isolate* isolate, Address address, | 502 void PatchInlinedSmiCode(Isolate* isolate, Address address, |
508 InlinedSmiCheck check); | 503 InlinedSmiCheck check); |
509 | 504 |
510 } // namespace internal | 505 } // namespace internal |
511 } // namespace v8 | 506 } // namespace v8 |
512 | 507 |
513 #endif // V8_IC_H_ | 508 #endif // V8_IC_H_ |
OLD | NEW |