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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 V(StrictNotEqual) \ | 133 V(StrictNotEqual) \ |
134 V(StringEqual) \ | 134 V(StringEqual) \ |
135 V(StringNotEqual) \ | 135 V(StringNotEqual) \ |
136 V(StringLessThan) \ | 136 V(StringLessThan) \ |
137 V(StringLessThanOrEqual) \ | 137 V(StringLessThanOrEqual) \ |
138 V(StringGreaterThan) \ | 138 V(StringGreaterThan) \ |
139 V(StringGreaterThanOrEqual) \ | 139 V(StringGreaterThanOrEqual) \ |
140 V(ToBoolean) \ | 140 V(ToBoolean) \ |
141 V(ToInteger) \ | 141 V(ToInteger) \ |
142 V(ToLength) \ | 142 V(ToLength) \ |
| 143 V(HasProperty) \ |
143 /* IC Handler stubs */ \ | 144 /* IC Handler stubs */ \ |
144 V(ArrayBufferViewLoadField) \ | 145 V(ArrayBufferViewLoadField) \ |
145 V(KeyedLoadSloppyArguments) \ | 146 V(KeyedLoadSloppyArguments) \ |
146 V(KeyedStoreSloppyArguments) \ | 147 V(KeyedStoreSloppyArguments) \ |
147 V(LoadApiGetter) \ | 148 V(LoadApiGetter) \ |
148 V(LoadConstant) \ | 149 V(LoadConstant) \ |
149 V(LoadFastElement) \ | 150 V(LoadFastElement) \ |
150 V(LoadField) \ | 151 V(LoadField) \ |
151 V(LoadIndexedInterceptor) \ | 152 V(LoadIndexedInterceptor) \ |
152 V(StoreField) \ | 153 V(StoreField) \ |
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
954 : TurboFanCodeStub(isolate) {} | 955 : TurboFanCodeStub(isolate) {} |
955 | 956 |
956 Code::Kind GetCodeKind() const override { return Code::HANDLER; } | 957 Code::Kind GetCodeKind() const override { return Code::HANDLER; } |
957 ExtraICState GetExtraICState() const override { return Code::KEYED_LOAD_IC; } | 958 ExtraICState GetExtraICState() const override { return Code::KEYED_LOAD_IC; } |
958 InlineCacheState GetICState() const override { return MONOMORPHIC; } | 959 InlineCacheState GetICState() const override { return MONOMORPHIC; } |
959 | 960 |
960 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); | 961 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); |
961 DEFINE_TURBOFAN_CODE_STUB(LoadIndexedInterceptor, TurboFanCodeStub); | 962 DEFINE_TURBOFAN_CODE_STUB(LoadIndexedInterceptor, TurboFanCodeStub); |
962 }; | 963 }; |
963 | 964 |
| 965 // ES6 section 12.10.3 "in" operator evaluation. |
| 966 class HasPropertyStub : public TurboFanCodeStub { |
| 967 public: |
| 968 explicit HasPropertyStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} |
| 969 |
| 970 DEFINE_CALL_INTERFACE_DESCRIPTOR(HasProperty); |
| 971 DEFINE_TURBOFAN_CODE_STUB(HasProperty, TurboFanCodeStub); |
| 972 }; |
| 973 |
964 enum StringAddFlags { | 974 enum StringAddFlags { |
965 // Omit both parameter checks. | 975 // Omit both parameter checks. |
966 STRING_ADD_CHECK_NONE = 0, | 976 STRING_ADD_CHECK_NONE = 0, |
967 // Check left parameter. | 977 // Check left parameter. |
968 STRING_ADD_CHECK_LEFT = 1 << 0, | 978 STRING_ADD_CHECK_LEFT = 1 << 0, |
969 // Check right parameter. | 979 // Check right parameter. |
970 STRING_ADD_CHECK_RIGHT = 1 << 1, | 980 STRING_ADD_CHECK_RIGHT = 1 << 1, |
971 // Check both parameters. | 981 // Check both parameters. |
972 STRING_ADD_CHECK_BOTH = STRING_ADD_CHECK_LEFT | STRING_ADD_CHECK_RIGHT, | 982 STRING_ADD_CHECK_BOTH = STRING_ADD_CHECK_LEFT | STRING_ADD_CHECK_RIGHT, |
973 // Convert parameters when check fails (instead of throwing an exception). | 983 // Convert parameters when check fails (instead of throwing an exception). |
(...skipping 2232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3206 #undef DEFINE_HYDROGEN_CODE_STUB | 3216 #undef DEFINE_HYDROGEN_CODE_STUB |
3207 #undef DEFINE_CODE_STUB | 3217 #undef DEFINE_CODE_STUB |
3208 #undef DEFINE_CODE_STUB_BASE | 3218 #undef DEFINE_CODE_STUB_BASE |
3209 | 3219 |
3210 extern Representation RepresentationFromType(Type* type); | 3220 extern Representation RepresentationFromType(Type* type); |
3211 | 3221 |
3212 } // namespace internal | 3222 } // namespace internal |
3213 } // namespace v8 | 3223 } // namespace v8 |
3214 | 3224 |
3215 #endif // V8_CODE_STUBS_H_ | 3225 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |