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_CODE_STUBS_H_ | 5 #ifndef V8_CODE_STUBS_H_ |
6 #define V8_CODE_STUBS_H_ | 6 #define V8_CODE_STUBS_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
10 #include "src/code-stub-assembler.h" | 10 #include "src/code-stub-assembler.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 V(StrictNotEqual) \ | 132 V(StrictNotEqual) \ |
133 V(StringEqual) \ | 133 V(StringEqual) \ |
134 V(StringNotEqual) \ | 134 V(StringNotEqual) \ |
135 V(StringLessThan) \ | 135 V(StringLessThan) \ |
136 V(StringLessThanOrEqual) \ | 136 V(StringLessThanOrEqual) \ |
137 V(StringGreaterThan) \ | 137 V(StringGreaterThan) \ |
138 V(StringGreaterThanOrEqual) \ | 138 V(StringGreaterThanOrEqual) \ |
139 V(ToBoolean) \ | 139 V(ToBoolean) \ |
140 V(ToInteger) \ | 140 V(ToInteger) \ |
141 V(ToLength) \ | 141 V(ToLength) \ |
| 142 V(HasProperty) \ |
142 /* IC Handler stubs */ \ | 143 /* IC Handler stubs */ \ |
143 V(ArrayBufferViewLoadField) \ | 144 V(ArrayBufferViewLoadField) \ |
144 V(LoadConstant) \ | 145 V(LoadConstant) \ |
145 V(LoadFastElement) \ | 146 V(LoadFastElement) \ |
146 V(LoadField) \ | 147 V(LoadField) \ |
147 V(LoadIndexedInterceptor) \ | 148 V(LoadIndexedInterceptor) \ |
148 V(KeyedLoadSloppyArguments) \ | 149 V(KeyedLoadSloppyArguments) \ |
149 V(KeyedStoreSloppyArguments) \ | 150 V(KeyedStoreSloppyArguments) \ |
150 V(StoreField) \ | 151 V(StoreField) \ |
151 V(StoreInterceptor) \ | 152 V(StoreInterceptor) \ |
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
924 : TurboFanCodeStub(isolate) {} | 925 : TurboFanCodeStub(isolate) {} |
925 | 926 |
926 Code::Kind GetCodeKind() const override { return Code::HANDLER; } | 927 Code::Kind GetCodeKind() const override { return Code::HANDLER; } |
927 ExtraICState GetExtraICState() const override { return Code::KEYED_LOAD_IC; } | 928 ExtraICState GetExtraICState() const override { return Code::KEYED_LOAD_IC; } |
928 InlineCacheState GetICState() const override { return MONOMORPHIC; } | 929 InlineCacheState GetICState() const override { return MONOMORPHIC; } |
929 | 930 |
930 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); | 931 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); |
931 DEFINE_TURBOFAN_CODE_STUB(LoadIndexedInterceptor, TurboFanCodeStub); | 932 DEFINE_TURBOFAN_CODE_STUB(LoadIndexedInterceptor, TurboFanCodeStub); |
932 }; | 933 }; |
933 | 934 |
| 935 // ES6 section 12.10.3 "in" operator evaluation. |
| 936 class HasPropertyStub : public TurboFanCodeStub { |
| 937 public: |
| 938 explicit HasPropertyStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} |
| 939 |
| 940 DEFINE_CALL_INTERFACE_DESCRIPTOR(HasProperty); |
| 941 DEFINE_TURBOFAN_CODE_STUB(HasProperty, TurboFanCodeStub); |
| 942 }; |
| 943 |
934 enum StringAddFlags { | 944 enum StringAddFlags { |
935 // Omit both parameter checks. | 945 // Omit both parameter checks. |
936 STRING_ADD_CHECK_NONE = 0, | 946 STRING_ADD_CHECK_NONE = 0, |
937 // Check left parameter. | 947 // Check left parameter. |
938 STRING_ADD_CHECK_LEFT = 1 << 0, | 948 STRING_ADD_CHECK_LEFT = 1 << 0, |
939 // Check right parameter. | 949 // Check right parameter. |
940 STRING_ADD_CHECK_RIGHT = 1 << 1, | 950 STRING_ADD_CHECK_RIGHT = 1 << 1, |
941 // Check both parameters. | 951 // Check both parameters. |
942 STRING_ADD_CHECK_BOTH = STRING_ADD_CHECK_LEFT | STRING_ADD_CHECK_RIGHT, | 952 STRING_ADD_CHECK_BOTH = STRING_ADD_CHECK_LEFT | STRING_ADD_CHECK_RIGHT, |
943 // Convert parameters when check fails (instead of throwing an exception). | 953 // Convert parameters when check fails (instead of throwing an exception). |
(...skipping 2216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3160 #undef DEFINE_HYDROGEN_CODE_STUB | 3170 #undef DEFINE_HYDROGEN_CODE_STUB |
3161 #undef DEFINE_CODE_STUB | 3171 #undef DEFINE_CODE_STUB |
3162 #undef DEFINE_CODE_STUB_BASE | 3172 #undef DEFINE_CODE_STUB_BASE |
3163 | 3173 |
3164 extern Representation RepresentationFromType(Type* type); | 3174 extern Representation RepresentationFromType(Type* type); |
3165 | 3175 |
3166 } // namespace internal | 3176 } // namespace internal |
3167 } // namespace v8 | 3177 } // namespace v8 |
3168 | 3178 |
3169 #endif // V8_CODE_STUBS_H_ | 3179 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |