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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 | 321 |
322 static Handle<Code> initialize_stub_in_optimized_code( | 322 static Handle<Code> initialize_stub_in_optimized_code( |
323 Isolate* isolate, ExtraICState extra_state); | 323 Isolate* isolate, ExtraICState extra_state); |
324 | 324 |
325 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Name> name); | 325 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Name> name); |
326 | 326 |
327 static void Clear(Isolate* isolate, Code* host, LoadGlobalICNexus* nexus); | 327 static void Clear(Isolate* isolate, Code* host, LoadGlobalICNexus* nexus); |
328 | 328 |
329 protected: | 329 protected: |
330 Handle<Code> slow_stub() const override { | 330 Handle<Code> slow_stub() const override { |
331 return isolate()->builtins()->LoadGlobalIC_Slow(); | 331 if (LoadGlobalICState::GetTypeofMode(extra_ic_state()) == |
| 332 NOT_INSIDE_TYPEOF) { |
| 333 return isolate()->builtins()->LoadGlobalIC_SlowNotInsideTypeof(); |
| 334 } else { |
| 335 return isolate()->builtins()->LoadGlobalIC_SlowInsideTypeof(); |
| 336 } |
332 } | 337 } |
333 }; | 338 }; |
334 | 339 |
335 class KeyedLoadIC : public LoadIC { | 340 class KeyedLoadIC : public LoadIC { |
336 public: | 341 public: |
337 KeyedLoadIC(FrameDepth depth, Isolate* isolate, | 342 KeyedLoadIC(FrameDepth depth, Isolate* isolate, |
338 KeyedLoadICNexus* nexus = NULL) | 343 KeyedLoadICNexus* nexus = NULL) |
339 : LoadIC(depth, isolate, nexus) { | 344 : LoadIC(depth, isolate, nexus) { |
340 DCHECK(nexus != NULL); | 345 DCHECK(nexus != NULL); |
341 } | 346 } |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 | 514 |
510 // Helper for BinaryOpIC and CompareIC. | 515 // Helper for BinaryOpIC and CompareIC. |
511 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; | 516 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; |
512 void PatchInlinedSmiCode(Isolate* isolate, Address address, | 517 void PatchInlinedSmiCode(Isolate* isolate, Address address, |
513 InlinedSmiCheck check); | 518 InlinedSmiCheck check); |
514 | 519 |
515 } // namespace internal | 520 } // namespace internal |
516 } // namespace v8 | 521 } // namespace v8 |
517 | 522 |
518 #endif // V8_IC_H_ | 523 #endif // V8_IC_H_ |
OLD | NEW |