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/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 V(NumberToString) \ | 81 V(NumberToString) \ |
82 V(RegExpConstructResult) \ | 82 V(RegExpConstructResult) \ |
83 V(StoreFastElement) \ | 83 V(StoreFastElement) \ |
84 V(StoreScriptContextField) \ | 84 V(StoreScriptContextField) \ |
85 V(StringAdd) \ | 85 V(StringAdd) \ |
86 V(ToBoolean) \ | 86 V(ToBoolean) \ |
87 V(TransitionElementsKind) \ | 87 V(TransitionElementsKind) \ |
88 V(VectorRawKeyedLoad) \ | 88 V(VectorRawKeyedLoad) \ |
89 V(VectorRawLoad) \ | 89 V(VectorRawLoad) \ |
90 /* IC Handler stubs */ \ | 90 /* IC Handler stubs */ \ |
| 91 V(ArrayBufferViewLoadField) \ |
91 V(LoadConstant) \ | 92 V(LoadConstant) \ |
92 V(LoadField) \ | 93 V(LoadField) \ |
93 V(KeyedLoadSloppyArguments) \ | 94 V(KeyedLoadSloppyArguments) \ |
94 V(StoreField) \ | 95 V(StoreField) \ |
95 V(StoreGlobal) \ | 96 V(StoreGlobal) \ |
96 V(StoreTransition) \ | 97 V(StoreTransition) \ |
97 V(StringLength) \ | 98 V(StringLength) \ |
98 V(RestParamAccess) | 99 V(RestParamAccess) |
99 | 100 |
100 // List of code stubs only used on ARM 32 bits platforms. | 101 // List of code stubs only used on ARM 32 bits platforms. |
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 Code::Kind kind() const override { return Code::LOAD_IC; } | 967 Code::Kind kind() const override { return Code::LOAD_IC; } |
967 Code::StubType GetStubType() const override { return Code::FAST; } | 968 Code::StubType GetStubType() const override { return Code::FAST; } |
968 | 969 |
969 private: | 970 private: |
970 class LoadFieldByIndexBits : public BitField<int, 0, 13> {}; | 971 class LoadFieldByIndexBits : public BitField<int, 0, 13> {}; |
971 | 972 |
972 DEFINE_HANDLER_CODE_STUB(LoadField, HandlerStub); | 973 DEFINE_HANDLER_CODE_STUB(LoadField, HandlerStub); |
973 }; | 974 }; |
974 | 975 |
975 | 976 |
| 977 class ArrayBufferViewLoadFieldStub : public HandlerStub { |
| 978 public: |
| 979 ArrayBufferViewLoadFieldStub(Isolate* isolate, FieldIndex index) |
| 980 : HandlerStub(isolate) { |
| 981 int property_index_key = index.GetFieldAccessStubKey(); |
| 982 set_sub_minor_key( |
| 983 ArrayBufferViewLoadFieldByIndexBits::encode(property_index_key)); |
| 984 } |
| 985 |
| 986 FieldIndex index() const { |
| 987 int property_index_key = |
| 988 ArrayBufferViewLoadFieldByIndexBits::decode(sub_minor_key()); |
| 989 return FieldIndex::FromFieldAccessStubKey(property_index_key); |
| 990 } |
| 991 |
| 992 protected: |
| 993 Code::Kind kind() const override { return Code::LOAD_IC; } |
| 994 Code::StubType GetStubType() const override { return Code::FAST; } |
| 995 |
| 996 private: |
| 997 class ArrayBufferViewLoadFieldByIndexBits : public BitField<int, 0, 13> {}; |
| 998 |
| 999 DEFINE_HANDLER_CODE_STUB(ArrayBufferViewLoadField, HandlerStub); |
| 1000 }; |
| 1001 |
| 1002 |
976 class KeyedLoadSloppyArgumentsStub : public HandlerStub { | 1003 class KeyedLoadSloppyArgumentsStub : public HandlerStub { |
977 public: | 1004 public: |
978 explicit KeyedLoadSloppyArgumentsStub(Isolate* isolate) | 1005 explicit KeyedLoadSloppyArgumentsStub(Isolate* isolate) |
979 : HandlerStub(isolate) {} | 1006 : HandlerStub(isolate) {} |
980 | 1007 |
981 protected: | 1008 protected: |
982 Code::Kind kind() const override { return Code::KEYED_LOAD_IC; } | 1009 Code::Kind kind() const override { return Code::KEYED_LOAD_IC; } |
983 Code::StubType GetStubType() const override { return Code::FAST; } | 1010 Code::StubType GetStubType() const override { return Code::FAST; } |
984 | 1011 |
985 private: | 1012 private: |
(...skipping 1768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2754 | 2781 |
2755 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR | 2782 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR |
2756 #undef DEFINE_PLATFORM_CODE_STUB | 2783 #undef DEFINE_PLATFORM_CODE_STUB |
2757 #undef DEFINE_HANDLER_CODE_STUB | 2784 #undef DEFINE_HANDLER_CODE_STUB |
2758 #undef DEFINE_HYDROGEN_CODE_STUB | 2785 #undef DEFINE_HYDROGEN_CODE_STUB |
2759 #undef DEFINE_CODE_STUB | 2786 #undef DEFINE_CODE_STUB |
2760 #undef DEFINE_CODE_STUB_BASE | 2787 #undef DEFINE_CODE_STUB_BASE |
2761 } } // namespace v8::internal | 2788 } } // namespace v8::internal |
2762 | 2789 |
2763 #endif // V8_CODE_STUBS_H_ | 2790 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |