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 "macro-assembler.h" | 8 #include "macro-assembler.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
886 static const char* KindToString(Kind kind); | 886 static const char* KindToString(Kind kind); |
887 static Type* KindToType(Kind kind, Zone* zone); | 887 static Type* KindToType(Kind kind, Zone* zone); |
888 static bool KindMaybeSmi(Kind kind) { | 888 static bool KindMaybeSmi(Kind kind) { |
889 return (kind >= SMI && kind <= NUMBER) || kind == GENERIC; | 889 return (kind >= SMI && kind <= NUMBER) || kind == GENERIC; |
890 } | 890 } |
891 | 891 |
892 // We truncate the last bit of the token. | 892 // We truncate the last bit of the token. |
893 STATIC_ASSERT(LAST_TOKEN - FIRST_TOKEN < (1 << 4)); | 893 STATIC_ASSERT(LAST_TOKEN - FIRST_TOKEN < (1 << 4)); |
894 class OpField: public BitField<int, 0, 4> {}; | 894 class OpField: public BitField<int, 0, 4> {}; |
895 class OverwriteModeField: public BitField<OverwriteMode, 4, 2> {}; | 895 class OverwriteModeField: public BitField<OverwriteMode, 4, 2> {}; |
896 class SSE2Field: public BitField<bool, 6, 1> {}; | 896 class ResultKindField: public BitField<Kind, 6, 3> {}; |
897 class ResultKindField: public BitField<Kind, 7, 3> {}; | 897 class LeftKindField: public BitField<Kind, 9, 3> {}; |
898 class LeftKindField: public BitField<Kind, 10, 3> {}; | |
899 // When fixed right arg is set, we don't need to store the right kind. | 898 // When fixed right arg is set, we don't need to store the right kind. |
900 // Thus the two fields can overlap. | 899 // Thus the two fields can overlap. |
901 class HasFixedRightArgField: public BitField<bool, 13, 1> {}; | 900 class HasFixedRightArgField: public BitField<bool, 12, 1> {}; |
902 class FixedRightArgValueField: public BitField<int, 14, 4> {}; | 901 class FixedRightArgValueField: public BitField<int, 13, 4> {}; |
903 class RightKindField: public BitField<Kind, 14, 3> {}; | 902 class RightKindField: public BitField<Kind, 13, 3> {}; |
904 | 903 |
905 Token::Value op_; | 904 Token::Value op_; |
906 OverwriteMode mode_; | 905 OverwriteMode mode_; |
907 Kind left_kind_; | 906 Kind left_kind_; |
908 Kind right_kind_; | 907 Kind right_kind_; |
909 Kind result_kind_; | 908 Kind result_kind_; |
910 Maybe<int> fixed_right_arg_; | 909 Maybe<int> fixed_right_arg_; |
911 Isolate* isolate_; | 910 Isolate* isolate_; |
912 }; | 911 }; |
913 | 912 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1031 DECLARE_RUNTIME_FUNCTION(ElementsTransitionAndStoreIC_Miss); | 1030 DECLARE_RUNTIME_FUNCTION(ElementsTransitionAndStoreIC_Miss); |
1032 DECLARE_RUNTIME_FUNCTION(BinaryOpIC_Miss); | 1031 DECLARE_RUNTIME_FUNCTION(BinaryOpIC_Miss); |
1033 DECLARE_RUNTIME_FUNCTION(BinaryOpIC_MissWithAllocationSite); | 1032 DECLARE_RUNTIME_FUNCTION(BinaryOpIC_MissWithAllocationSite); |
1034 DECLARE_RUNTIME_FUNCTION(CompareNilIC_Miss); | 1033 DECLARE_RUNTIME_FUNCTION(CompareNilIC_Miss); |
1035 DECLARE_RUNTIME_FUNCTION(ToBooleanIC_Miss); | 1034 DECLARE_RUNTIME_FUNCTION(ToBooleanIC_Miss); |
1036 | 1035 |
1037 | 1036 |
1038 } } // namespace v8::internal | 1037 } } // namespace v8::internal |
1039 | 1038 |
1040 #endif // V8_IC_H_ | 1039 #endif // V8_IC_H_ |
OLD | NEW |