OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 | 859 |
860 bool UseInlinedSmiCode() const { | 860 bool UseInlinedSmiCode() const { |
861 return KindMaybeSmi(left_kind_) || KindMaybeSmi(right_kind_); | 861 return KindMaybeSmi(left_kind_) || KindMaybeSmi(right_kind_); |
862 } | 862 } |
863 | 863 |
864 static const int FIRST_TOKEN = Token::BIT_OR; | 864 static const int FIRST_TOKEN = Token::BIT_OR; |
865 static const int LAST_TOKEN = Token::MOD; | 865 static const int LAST_TOKEN = Token::MOD; |
866 | 866 |
867 Token::Value op() const { return op_; } | 867 Token::Value op() const { return op_; } |
868 OverwriteMode mode() const { return mode_; } | 868 OverwriteMode mode() const { return mode_; } |
869 Maybe<int> fixed_right_arg() const { return fixed_right_arg_; } | |
870 | 869 |
871 Handle<Type> GetLeftType(Isolate* isolate) const { | 870 Handle<Type> GetLeftType(Isolate* isolate) const { |
872 return KindToType(left_kind_, isolate); | 871 return KindToType(left_kind_, isolate); |
873 } | 872 } |
874 Handle<Type> GetRightType(Isolate* isolate) const { | 873 Handle<Type> GetRightType(Isolate* isolate) const; |
875 return KindToType(right_kind_, isolate); | |
876 } | |
877 Handle<Type> GetResultType(Isolate* isolate) const; | 874 Handle<Type> GetResultType(Isolate* isolate) const; |
878 | 875 |
879 void Print(StringStream* stream) const; | 876 void Print(StringStream* stream) const; |
880 | 877 |
881 void Update(Handle<Object> left, | 878 void Update(Handle<Object> left, |
882 Handle<Object> right, | 879 Handle<Object> right, |
883 Handle<Object> result); | 880 Handle<Object> result); |
884 | 881 |
885 private: | 882 private: |
886 enum Kind { NONE, SMI, INT32, NUMBER, STRING, GENERIC }; | 883 enum Kind { NONE, SMI, INT32, NUMBER, STRING, GENERIC }; |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1028 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedCallIC_MissFromStubFailure); | 1025 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedCallIC_MissFromStubFailure); |
1029 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss); | 1026 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss); |
1030 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss); | 1027 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss); |
1031 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); | 1028 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); |
1032 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); | 1029 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); |
1033 | 1030 |
1034 | 1031 |
1035 } } // namespace v8::internal | 1032 } } // namespace v8::internal |
1036 | 1033 |
1037 #endif // V8_IC_H_ | 1034 #endif // V8_IC_H_ |
OLD | NEW |