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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 V(StringLessThanOrEqual) \ | 135 V(StringLessThanOrEqual) \ |
136 V(StringGreaterThan) \ | 136 V(StringGreaterThan) \ |
137 V(StringGreaterThanOrEqual) \ | 137 V(StringGreaterThanOrEqual) \ |
138 V(ToBoolean) \ | 138 V(ToBoolean) \ |
139 V(ToInteger) \ | 139 V(ToInteger) \ |
140 V(ToLength) \ | 140 V(ToLength) \ |
141 V(HasProperty) \ | 141 V(HasProperty) \ |
142 V(LoadICTrampolineTF) \ | 142 V(LoadICTrampolineTF) \ |
143 V(LoadICTF) \ | 143 V(LoadICTF) \ |
144 /* IC Handler stubs */ \ | 144 /* IC Handler stubs */ \ |
| 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) \ |
153 V(StoreGlobal) \ | 154 V(StoreGlobal) \ |
154 V(StoreInterceptor) \ | 155 V(StoreInterceptor) \ |
(...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1447 protected: | 1448 protected: |
1448 Code::Kind kind() const override { return Code::LOAD_IC; } | 1449 Code::Kind kind() const override { return Code::LOAD_IC; } |
1449 | 1450 |
1450 private: | 1451 private: |
1451 class LoadFieldByIndexBits : public BitField<int, 0, 13> {}; | 1452 class LoadFieldByIndexBits : public BitField<int, 0, 13> {}; |
1452 | 1453 |
1453 DEFINE_HANDLER_CODE_STUB(LoadField, HandlerStub); | 1454 DEFINE_HANDLER_CODE_STUB(LoadField, HandlerStub); |
1454 }; | 1455 }; |
1455 | 1456 |
1456 | 1457 |
| 1458 class ArrayBufferViewLoadFieldStub : public HandlerStub { |
| 1459 public: |
| 1460 ArrayBufferViewLoadFieldStub(Isolate* isolate, FieldIndex index) |
| 1461 : HandlerStub(isolate) { |
| 1462 int property_index_key = index.GetFieldAccessStubKey(); |
| 1463 set_sub_minor_key( |
| 1464 ArrayBufferViewLoadFieldByIndexBits::encode(property_index_key)); |
| 1465 } |
| 1466 |
| 1467 FieldIndex index() const { |
| 1468 int property_index_key = |
| 1469 ArrayBufferViewLoadFieldByIndexBits::decode(sub_minor_key()); |
| 1470 return FieldIndex::FromFieldAccessStubKey(property_index_key); |
| 1471 } |
| 1472 |
| 1473 protected: |
| 1474 Code::Kind kind() const override { return Code::LOAD_IC; } |
| 1475 |
| 1476 private: |
| 1477 class ArrayBufferViewLoadFieldByIndexBits : public BitField<int, 0, 13> {}; |
| 1478 |
| 1479 DEFINE_HANDLER_CODE_STUB(ArrayBufferViewLoadField, HandlerStub); |
| 1480 }; |
| 1481 |
| 1482 |
1457 class KeyedLoadSloppyArgumentsStub : public HandlerStub { | 1483 class KeyedLoadSloppyArgumentsStub : public HandlerStub { |
1458 public: | 1484 public: |
1459 explicit KeyedLoadSloppyArgumentsStub(Isolate* isolate) | 1485 explicit KeyedLoadSloppyArgumentsStub(Isolate* isolate) |
1460 : HandlerStub(isolate) {} | 1486 : HandlerStub(isolate) {} |
1461 | 1487 |
1462 protected: | 1488 protected: |
1463 Code::Kind kind() const override { return Code::KEYED_LOAD_IC; } | 1489 Code::Kind kind() const override { return Code::KEYED_LOAD_IC; } |
1464 | 1490 |
1465 private: | 1491 private: |
1466 DEFINE_HANDLER_CODE_STUB(KeyedLoadSloppyArguments, HandlerStub); | 1492 DEFINE_HANDLER_CODE_STUB(KeyedLoadSloppyArguments, HandlerStub); |
(...skipping 1798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3265 #undef DEFINE_HYDROGEN_CODE_STUB | 3291 #undef DEFINE_HYDROGEN_CODE_STUB |
3266 #undef DEFINE_CODE_STUB | 3292 #undef DEFINE_CODE_STUB |
3267 #undef DEFINE_CODE_STUB_BASE | 3293 #undef DEFINE_CODE_STUB_BASE |
3268 | 3294 |
3269 extern Representation RepresentationFromType(Type* type); | 3295 extern Representation RepresentationFromType(Type* type); |
3270 | 3296 |
3271 } // namespace internal | 3297 } // namespace internal |
3272 } // namespace v8 | 3298 } // namespace v8 |
3273 | 3299 |
3274 #endif // V8_CODE_STUBS_H_ | 3300 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |