| 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 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 friend class IC; | 646 friend class IC; |
| 647 }; | 647 }; |
| 648 | 648 |
| 649 | 649 |
| 650 // Type Recording BinaryOpIC, that records the types of the inputs and outputs. | 650 // Type Recording BinaryOpIC, that records the types of the inputs and outputs. |
| 651 class BinaryOpIC : public IC { | 651 class BinaryOpIC : public IC { |
| 652 public: | 652 public: |
| 653 explicit BinaryOpIC(Isolate* isolate) : IC(EXTRA_CALL_FRAME, isolate) {} | 653 explicit BinaryOpIC(Isolate* isolate) : IC(EXTRA_CALL_FRAME, isolate) {} |
| 654 | 654 |
| 655 static Builtins::JavaScript TokenToJSBuiltin(Token::Value op, | 655 static Builtins::JavaScript TokenToJSBuiltin(Token::Value op, |
| 656 LanguageMode language_mode); | 656 Strength strength); |
| 657 | 657 |
| 658 MaybeHandle<Object> Transition(Handle<AllocationSite> allocation_site, | 658 MaybeHandle<Object> Transition(Handle<AllocationSite> allocation_site, |
| 659 Handle<Object> left, | 659 Handle<Object> left, |
| 660 Handle<Object> right) WARN_UNUSED_RESULT; | 660 Handle<Object> right) WARN_UNUSED_RESULT; |
| 661 }; | 661 }; |
| 662 | 662 |
| 663 | 663 |
| 664 class CompareIC : public IC { | 664 class CompareIC : public IC { |
| 665 public: | 665 public: |
| 666 CompareIC(Isolate* isolate, Token::Value op) | 666 CompareIC(Isolate* isolate, Token::Value op) |
| 667 : IC(EXTRA_CALL_FRAME, isolate), op_(op) {} | 667 : IC(EXTRA_CALL_FRAME, isolate), op_(op) {} |
| 668 | 668 |
| 669 // Update the inline cache for the given operands. | 669 // Update the inline cache for the given operands. |
| 670 Code* UpdateCaches(Handle<Object> x, Handle<Object> y); | 670 Code* UpdateCaches(Handle<Object> x, Handle<Object> y); |
| 671 | 671 |
| 672 // Helper function for computing the condition for a compare operation. | 672 // Helper function for computing the condition for a compare operation. |
| 673 static Condition ComputeCondition(Token::Value op); | 673 static Condition ComputeCondition(Token::Value op); |
| 674 | 674 |
| 675 // Factory method for getting an uninitialized compare stub. | 675 // Factory method for getting an uninitialized compare stub. |
| 676 static Handle<Code> GetUninitialized(Isolate* isolate, Token::Value op, | 676 static Handle<Code> GetUninitialized(Isolate* isolate, Token::Value op, |
| 677 bool strong); | 677 Strength strength); |
| 678 | 678 |
| 679 private: | 679 private: |
| 680 static bool HasInlinedSmiCode(Address address); | 680 static bool HasInlinedSmiCode(Address address); |
| 681 | 681 |
| 682 bool strict() const { return op_ == Token::EQ_STRICT; } | 682 bool strict() const { return op_ == Token::EQ_STRICT; } |
| 683 Condition GetCondition() const { return ComputeCondition(op_); } | 683 Condition GetCondition() const { return ComputeCondition(op_); } |
| 684 | 684 |
| 685 static Code* GetRawUninitialized(Isolate* isolate, Token::Value op, | 685 static Code* GetRawUninitialized(Isolate* isolate, Token::Value op, |
| 686 bool strong); | 686 Strength strength); |
| 687 | 687 |
| 688 static void Clear(Isolate* isolate, Address address, Code* target, | 688 static void Clear(Isolate* isolate, Address address, Code* target, |
| 689 ConstantPoolArray* constant_pool); | 689 ConstantPoolArray* constant_pool); |
| 690 | 690 |
| 691 Token::Value op_; | 691 Token::Value op_; |
| 692 | 692 |
| 693 friend class IC; | 693 friend class IC; |
| 694 }; | 694 }; |
| 695 | 695 |
| 696 | 696 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 | 738 |
| 739 // Support functions for interceptor handlers. | 739 // Support functions for interceptor handlers. |
| 740 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); | 740 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); |
| 741 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); | 741 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); |
| 742 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); | 742 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); |
| 743 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); | 743 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); |
| 744 } | 744 } |
| 745 } // namespace v8::internal | 745 } // namespace v8::internal |
| 746 | 746 |
| 747 #endif // V8_IC_H_ | 747 #endif // V8_IC_H_ |
| OLD | NEW |