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) \ | |
92 V(LoadConstant) \ | 91 V(LoadConstant) \ |
93 V(LoadField) \ | 92 V(LoadField) \ |
94 V(KeyedLoadSloppyArguments) \ | 93 V(KeyedLoadSloppyArguments) \ |
95 V(StoreField) \ | 94 V(StoreField) \ |
96 V(StoreGlobal) \ | 95 V(StoreGlobal) \ |
97 V(StoreTransition) \ | 96 V(StoreTransition) \ |
98 V(StringLength) \ | 97 V(StringLength) \ |
99 V(RestParamAccess) | 98 V(RestParamAccess) |
100 | 99 |
101 // List of code stubs only used on ARM 32 bits platforms. | 100 // List of code stubs only used on ARM 32 bits platforms. |
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
967 Code::Kind kind() const override { return Code::LOAD_IC; } | 966 Code::Kind kind() const override { return Code::LOAD_IC; } |
968 Code::StubType GetStubType() const override { return Code::FAST; } | 967 Code::StubType GetStubType() const override { return Code::FAST; } |
969 | 968 |
970 private: | 969 private: |
971 class LoadFieldByIndexBits : public BitField<int, 0, 13> {}; | 970 class LoadFieldByIndexBits : public BitField<int, 0, 13> {}; |
972 | 971 |
973 DEFINE_HANDLER_CODE_STUB(LoadField, HandlerStub); | 972 DEFINE_HANDLER_CODE_STUB(LoadField, HandlerStub); |
974 }; | 973 }; |
975 | 974 |
976 | 975 |
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 | |
1003 class KeyedLoadSloppyArgumentsStub : public HandlerStub { | 976 class KeyedLoadSloppyArgumentsStub : public HandlerStub { |
1004 public: | 977 public: |
1005 explicit KeyedLoadSloppyArgumentsStub(Isolate* isolate) | 978 explicit KeyedLoadSloppyArgumentsStub(Isolate* isolate) |
1006 : HandlerStub(isolate) {} | 979 : HandlerStub(isolate) {} |
1007 | 980 |
1008 protected: | 981 protected: |
1009 Code::Kind kind() const override { return Code::KEYED_LOAD_IC; } | 982 Code::Kind kind() const override { return Code::KEYED_LOAD_IC; } |
1010 Code::StubType GetStubType() const override { return Code::FAST; } | 983 Code::StubType GetStubType() const override { return Code::FAST; } |
1011 | 984 |
1012 private: | 985 private: |
(...skipping 1768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2781 | 2754 |
2782 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR | 2755 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR |
2783 #undef DEFINE_PLATFORM_CODE_STUB | 2756 #undef DEFINE_PLATFORM_CODE_STUB |
2784 #undef DEFINE_HANDLER_CODE_STUB | 2757 #undef DEFINE_HANDLER_CODE_STUB |
2785 #undef DEFINE_HYDROGEN_CODE_STUB | 2758 #undef DEFINE_HYDROGEN_CODE_STUB |
2786 #undef DEFINE_CODE_STUB | 2759 #undef DEFINE_CODE_STUB |
2787 #undef DEFINE_CODE_STUB_BASE | 2760 #undef DEFINE_CODE_STUB_BASE |
2788 } } // namespace v8::internal | 2761 } } // namespace v8::internal |
2789 | 2762 |
2790 #endif // V8_CODE_STUBS_H_ | 2763 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |