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 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 CompareIC(Isolate* isolate, Token::Value op) | 611 CompareIC(Isolate* isolate, Token::Value op) |
612 : IC(EXTRA_CALL_FRAME, isolate), op_(op) {} | 612 : IC(EXTRA_CALL_FRAME, isolate), op_(op) {} |
613 | 613 |
614 // Update the inline cache for the given operands. | 614 // Update the inline cache for the given operands. |
615 Code* UpdateCaches(Handle<Object> x, Handle<Object> y); | 615 Code* UpdateCaches(Handle<Object> x, Handle<Object> y); |
616 | 616 |
617 // Helper function for computing the condition for a compare operation. | 617 // Helper function for computing the condition for a compare operation. |
618 static Condition ComputeCondition(Token::Value op); | 618 static Condition ComputeCondition(Token::Value op); |
619 | 619 |
620 // Factory method for getting an uninitialized compare stub. | 620 // Factory method for getting an uninitialized compare stub. |
621 static Handle<Code> GetUninitialized(Isolate* isolate, Token::Value op, | 621 static Handle<Code> GetUninitialized(Isolate* isolate, Token::Value op); |
622 Strength strength); | |
623 | 622 |
624 private: | 623 private: |
625 static bool HasInlinedSmiCode(Address address); | 624 static bool HasInlinedSmiCode(Address address); |
626 | 625 |
627 bool strict() const { return op_ == Token::EQ_STRICT; } | 626 bool strict() const { return op_ == Token::EQ_STRICT; } |
628 Condition GetCondition() const { return ComputeCondition(op_); } | 627 Condition GetCondition() const { return ComputeCondition(op_); } |
629 | 628 |
630 static Code* GetRawUninitialized(Isolate* isolate, Token::Value op, | 629 static Code* GetRawUninitialized(Isolate* isolate, Token::Value op); |
631 Strength strength); | |
632 | 630 |
633 static void Clear(Isolate* isolate, Address address, Code* target, | 631 static void Clear(Isolate* isolate, Address address, Code* target, |
634 Address constant_pool); | 632 Address constant_pool); |
635 | 633 |
636 Token::Value op_; | 634 Token::Value op_; |
637 | 635 |
638 friend class IC; | 636 friend class IC; |
639 }; | 637 }; |
640 | 638 |
641 | 639 |
(...skipping 19 matching lines...) Expand all Loading... |
661 | 659 |
662 // Helper for BinaryOpIC and CompareIC. | 660 // Helper for BinaryOpIC and CompareIC. |
663 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; | 661 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; |
664 void PatchInlinedSmiCode(Isolate* isolate, Address address, | 662 void PatchInlinedSmiCode(Isolate* isolate, Address address, |
665 InlinedSmiCheck check); | 663 InlinedSmiCheck check); |
666 | 664 |
667 } // namespace internal | 665 } // namespace internal |
668 } // namespace v8 | 666 } // namespace v8 |
669 | 667 |
670 #endif // V8_IC_H_ | 668 #endif // V8_IC_H_ |
OLD | NEW |