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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 JSReceiver::CERTAINLY_NOT_STORE_FROM_KEYED); | 394 JSReceiver::CERTAINLY_NOT_STORE_FROM_KEYED); |
395 | 395 |
396 bool LookupForWrite(LookupIterator* it, Handle<Object> value, | 396 bool LookupForWrite(LookupIterator* it, Handle<Object> value, |
397 JSReceiver::StoreFromKeyed store_mode); | 397 JSReceiver::StoreFromKeyed store_mode); |
398 | 398 |
399 static void Clear(Isolate* isolate, Code* host, StoreICNexus* nexus); | 399 static void Clear(Isolate* isolate, Code* host, StoreICNexus* nexus); |
400 | 400 |
401 protected: | 401 protected: |
402 // Stub accessors. | 402 // Stub accessors. |
403 Handle<Code> slow_stub() const { | 403 Handle<Code> slow_stub() const { |
404 return isolate()->builtins()->StoreIC_Slow(); | 404 switch (language_mode()) { |
| 405 case SLOPPY: |
| 406 return isolate()->builtins()->StoreIC_SlowSloppy(); |
| 407 case STRICT: |
| 408 return isolate()->builtins()->StoreIC_SlowStrict(); |
| 409 default: |
| 410 UNREACHABLE(); |
| 411 return Handle<Code>(); |
| 412 } |
405 } | 413 } |
406 | 414 |
407 // Update the inline cache and the global stub cache based on the | 415 // Update the inline cache and the global stub cache based on the |
408 // lookup result. | 416 // lookup result. |
409 void UpdateCaches(LookupIterator* lookup, Handle<Object> value, | 417 void UpdateCaches(LookupIterator* lookup, Handle<Object> value, |
410 JSReceiver::StoreFromKeyed store_mode); | 418 JSReceiver::StoreFromKeyed store_mode); |
411 Handle<Code> GetMapIndependentHandler(LookupIterator* lookup) override; | 419 Handle<Code> GetMapIndependentHandler(LookupIterator* lookup) override; |
412 Handle<Code> CompileHandler(LookupIterator* lookup, Handle<Object> value, | 420 Handle<Code> CompileHandler(LookupIterator* lookup, Handle<Object> value, |
413 CacheHolderFlag cache_holder) override; | 421 CacheHolderFlag cache_holder) override; |
414 | 422 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 | 522 |
515 // Helper for BinaryOpIC and CompareIC. | 523 // Helper for BinaryOpIC and CompareIC. |
516 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; | 524 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; |
517 void PatchInlinedSmiCode(Isolate* isolate, Address address, | 525 void PatchInlinedSmiCode(Isolate* isolate, Address address, |
518 InlinedSmiCheck check); | 526 InlinedSmiCheck check); |
519 | 527 |
520 } // namespace internal | 528 } // namespace internal |
521 } // namespace v8 | 529 } // namespace v8 |
522 | 530 |
523 #endif // V8_IC_H_ | 531 #endif // V8_IC_H_ |
OLD | NEW |