| 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 | 10 |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 }; | 535 }; |
| 536 | 536 |
| 537 | 537 |
| 538 class KeyedStoreIC : public StoreIC { | 538 class KeyedStoreIC : public StoreIC { |
| 539 public: | 539 public: |
| 540 // ExtraICState bits (building on IC) | 540 // ExtraICState bits (building on IC) |
| 541 // ExtraICState bits | 541 // ExtraICState bits |
| 542 class ExtraICStateKeyedAccessStoreMode | 542 class ExtraICStateKeyedAccessStoreMode |
| 543 : public BitField<KeyedAccessStoreMode, 2, 4> {}; // NOLINT | 543 : public BitField<KeyedAccessStoreMode, 2, 4> {}; // NOLINT |
| 544 | 544 |
| 545 class IcCheckTypeField : public BitField<IcCheckType, 6, 1> {}; |
| 546 |
| 545 static ExtraICState ComputeExtraICState(StrictMode flag, | 547 static ExtraICState ComputeExtraICState(StrictMode flag, |
| 546 KeyedAccessStoreMode mode) { | 548 KeyedAccessStoreMode mode) { |
| 547 return StrictModeState::encode(flag) | | 549 return StrictModeState::encode(flag) | |
| 548 ExtraICStateKeyedAccessStoreMode::encode(mode); | 550 ExtraICStateKeyedAccessStoreMode::encode(mode); |
| 549 } | 551 } |
| 550 | 552 |
| 551 static KeyedAccessStoreMode GetKeyedAccessStoreMode( | 553 static KeyedAccessStoreMode GetKeyedAccessStoreMode( |
| 552 ExtraICState extra_state) { | 554 ExtraICState extra_state) { |
| 553 return ExtraICStateKeyedAccessStoreMode::decode(extra_state); | 555 return ExtraICStateKeyedAccessStoreMode::decode(extra_state); |
| 554 } | 556 } |
| 555 | 557 |
| 558 static IcCheckType GetKeyType(ExtraICState extra_state) { |
| 559 return IcCheckTypeField::decode(extra_state); |
| 560 } |
| 561 |
| 556 KeyedStoreIC(FrameDepth depth, Isolate* isolate) : StoreIC(depth, isolate) { | 562 KeyedStoreIC(FrameDepth depth, Isolate* isolate) : StoreIC(depth, isolate) { |
| 557 DCHECK(target()->is_keyed_store_stub()); | 563 DCHECK(target()->is_keyed_store_stub()); |
| 558 } | 564 } |
| 559 | 565 |
| 560 MUST_USE_RESULT MaybeHandle<Object> Store(Handle<Object> object, | 566 MUST_USE_RESULT MaybeHandle<Object> Store(Handle<Object> object, |
| 561 Handle<Object> name, | 567 Handle<Object> name, |
| 562 Handle<Object> value); | 568 Handle<Object> value); |
| 563 | 569 |
| 564 // Code generators for stub routines. Only called once at startup. | 570 // Code generators for stub routines. Only called once at startup. |
| 565 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } | 571 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 | 704 |
| 699 // Support functions for interceptor handlers. | 705 // Support functions for interceptor handlers. |
| 700 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); | 706 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); |
| 701 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); | 707 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); |
| 702 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); | 708 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); |
| 703 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); | 709 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); |
| 704 } | 710 } |
| 705 } // namespace v8::internal | 711 } // namespace v8::internal |
| 706 | 712 |
| 707 #endif // V8_IC_H_ | 713 #endif // V8_IC_H_ |
| OLD | NEW |