| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 V(StoreFastElement) \ | 74 V(StoreFastElement) \ |
| 75 V(StringAdd) \ | 75 V(StringAdd) \ |
| 76 V(ToBoolean) \ | 76 V(ToBoolean) \ |
| 77 V(ToNumber) \ | 77 V(ToNumber) \ |
| 78 V(TransitionElementsKind) \ | 78 V(TransitionElementsKind) \ |
| 79 V(VectorKeyedLoad) \ | 79 V(VectorKeyedLoad) \ |
| 80 V(VectorLoad) \ | 80 V(VectorLoad) \ |
| 81 /* IC Handler stubs */ \ | 81 /* IC Handler stubs */ \ |
| 82 V(LoadConstant) \ | 82 V(LoadConstant) \ |
| 83 V(LoadField) \ | 83 V(LoadField) \ |
| 84 V(KeyedLoadSloppyArguments) \ |
| 84 V(StoreField) \ | 85 V(StoreField) \ |
| 85 V(StoreGlobal) \ | 86 V(StoreGlobal) \ |
| 86 V(StringLength) | 87 V(StringLength) |
| 87 | 88 |
| 88 // List of code stubs only used on ARM 32 bits platforms. | 89 // List of code stubs only used on ARM 32 bits platforms. |
| 89 #if V8_TARGET_ARCH_ARM | 90 #if V8_TARGET_ARCH_ARM |
| 90 #define CODE_STUB_LIST_ARM(V) \ | 91 #define CODE_STUB_LIST_ARM(V) \ |
| 91 V(DirectCEntry) \ | 92 V(DirectCEntry) \ |
| 92 V(WriteInt32ToHeapNumber) | 93 V(WriteInt32ToHeapNumber) |
| 93 | 94 |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 virtual Code::Kind kind() const { return Code::LOAD_IC; } | 893 virtual Code::Kind kind() const { return Code::LOAD_IC; } |
| 893 virtual Code::StubType GetStubType() { return Code::FAST; } | 894 virtual Code::StubType GetStubType() { return Code::FAST; } |
| 894 | 895 |
| 895 private: | 896 private: |
| 896 class LoadFieldByIndexBits : public BitField<int, 0, 13> {}; | 897 class LoadFieldByIndexBits : public BitField<int, 0, 13> {}; |
| 897 | 898 |
| 898 DEFINE_HANDLER_CODE_STUB(LoadField, HandlerStub); | 899 DEFINE_HANDLER_CODE_STUB(LoadField, HandlerStub); |
| 899 }; | 900 }; |
| 900 | 901 |
| 901 | 902 |
| 903 class KeyedLoadSloppyArgumentsStub : public HandlerStub { |
| 904 public: |
| 905 explicit KeyedLoadSloppyArgumentsStub(Isolate* isolate) |
| 906 : HandlerStub(isolate) {} |
| 907 |
| 908 protected: |
| 909 virtual Code::Kind kind() const { return Code::KEYED_LOAD_IC; } |
| 910 virtual Code::StubType GetStubType() { return Code::FAST; } |
| 911 |
| 912 private: |
| 913 DEFINE_HANDLER_CODE_STUB(KeyedLoadSloppyArguments, HandlerStub); |
| 914 }; |
| 915 |
| 916 |
| 902 class LoadConstantStub : public HandlerStub { | 917 class LoadConstantStub : public HandlerStub { |
| 903 public: | 918 public: |
| 904 LoadConstantStub(Isolate* isolate, int constant_index) | 919 LoadConstantStub(Isolate* isolate, int constant_index) |
| 905 : HandlerStub(isolate) { | 920 : HandlerStub(isolate) { |
| 906 set_sub_minor_key(ConstantIndexBits::encode(constant_index)); | 921 set_sub_minor_key(ConstantIndexBits::encode(constant_index)); |
| 907 } | 922 } |
| 908 | 923 |
| 909 int constant_index() const { | 924 int constant_index() const { |
| 910 return ConstantIndexBits::decode(sub_minor_key()); | 925 return ConstantIndexBits::decode(sub_minor_key()); |
| 911 } | 926 } |
| (...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2398 | 2413 |
| 2399 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR | 2414 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR |
| 2400 #undef DEFINE_PLATFORM_CODE_STUB | 2415 #undef DEFINE_PLATFORM_CODE_STUB |
| 2401 #undef DEFINE_HANDLER_CODE_STUB | 2416 #undef DEFINE_HANDLER_CODE_STUB |
| 2402 #undef DEFINE_HYDROGEN_CODE_STUB | 2417 #undef DEFINE_HYDROGEN_CODE_STUB |
| 2403 #undef DEFINE_CODE_STUB | 2418 #undef DEFINE_CODE_STUB |
| 2404 #undef DEFINE_CODE_STUB_BASE | 2419 #undef DEFINE_CODE_STUB_BASE |
| 2405 } } // namespace v8::internal | 2420 } } // namespace v8::internal |
| 2406 | 2421 |
| 2407 #endif // V8_CODE_STUBS_H_ | 2422 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |