| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 V(StoreFastElement) \ | 75 V(StoreFastElement) \ |
| 76 V(StringAdd) \ | 76 V(StringAdd) \ |
| 77 V(ToBoolean) \ | 77 V(ToBoolean) \ |
| 78 V(ToNumber) \ | 78 V(ToNumber) \ |
| 79 V(TransitionElementsKind) \ | 79 V(TransitionElementsKind) \ |
| 80 V(VectorKeyedLoad) \ | 80 V(VectorKeyedLoad) \ |
| 81 V(VectorLoad) \ | 81 V(VectorLoad) \ |
| 82 /* IC Handler stubs */ \ | 82 /* IC Handler stubs */ \ |
| 83 V(LoadConstant) \ | 83 V(LoadConstant) \ |
| 84 V(LoadField) \ | 84 V(LoadField) \ |
| 85 V(KeyedLoadSloppyArguments) \ |
| 85 V(StoreField) \ | 86 V(StoreField) \ |
| 86 V(StoreGlobal) \ | 87 V(StoreGlobal) \ |
| 87 V(StringLength) | 88 V(StringLength) |
| 88 | 89 |
| 89 // List of code stubs only used on ARM 32 bits platforms. | 90 // List of code stubs only used on ARM 32 bits platforms. |
| 90 #if V8_TARGET_ARCH_ARM | 91 #if V8_TARGET_ARCH_ARM |
| 91 #define CODE_STUB_LIST_ARM(V) \ | 92 #define CODE_STUB_LIST_ARM(V) \ |
| 92 V(DirectCEntry) \ | 93 V(DirectCEntry) \ |
| 93 V(WriteInt32ToHeapNumber) | 94 V(WriteInt32ToHeapNumber) |
| 94 | 95 |
| (...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 virtual Code::Kind kind() const { return Code::LOAD_IC; } | 908 virtual Code::Kind kind() const { return Code::LOAD_IC; } |
| 908 virtual Code::StubType GetStubType() { return Code::FAST; } | 909 virtual Code::StubType GetStubType() { return Code::FAST; } |
| 909 | 910 |
| 910 private: | 911 private: |
| 911 class LoadFieldByIndexBits : public BitField<int, 0, 13> {}; | 912 class LoadFieldByIndexBits : public BitField<int, 0, 13> {}; |
| 912 | 913 |
| 913 DEFINE_HANDLER_CODE_STUB(LoadField, HandlerStub); | 914 DEFINE_HANDLER_CODE_STUB(LoadField, HandlerStub); |
| 914 }; | 915 }; |
| 915 | 916 |
| 916 | 917 |
| 918 class KeyedLoadSloppyArgumentsStub : public HandlerStub { |
| 919 public: |
| 920 explicit KeyedLoadSloppyArgumentsStub(Isolate* isolate) |
| 921 : HandlerStub(isolate) {} |
| 922 |
| 923 protected: |
| 924 virtual Code::Kind kind() const { return Code::KEYED_LOAD_IC; } |
| 925 virtual Code::StubType GetStubType() { return Code::FAST; } |
| 926 |
| 927 private: |
| 928 DEFINE_HANDLER_CODE_STUB(KeyedLoadSloppyArguments, HandlerStub); |
| 929 }; |
| 930 |
| 931 |
| 917 class LoadConstantStub : public HandlerStub { | 932 class LoadConstantStub : public HandlerStub { |
| 918 public: | 933 public: |
| 919 LoadConstantStub(Isolate* isolate, int constant_index) | 934 LoadConstantStub(Isolate* isolate, int constant_index) |
| 920 : HandlerStub(isolate) { | 935 : HandlerStub(isolate) { |
| 921 set_sub_minor_key(ConstantIndexBits::encode(constant_index)); | 936 set_sub_minor_key(ConstantIndexBits::encode(constant_index)); |
| 922 } | 937 } |
| 923 | 938 |
| 924 int constant_index() const { | 939 int constant_index() const { |
| 925 return ConstantIndexBits::decode(sub_minor_key()); | 940 return ConstantIndexBits::decode(sub_minor_key()); |
| 926 } | 941 } |
| (...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2413 | 2428 |
| 2414 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR | 2429 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR |
| 2415 #undef DEFINE_PLATFORM_CODE_STUB | 2430 #undef DEFINE_PLATFORM_CODE_STUB |
| 2416 #undef DEFINE_HANDLER_CODE_STUB | 2431 #undef DEFINE_HANDLER_CODE_STUB |
| 2417 #undef DEFINE_HYDROGEN_CODE_STUB | 2432 #undef DEFINE_HYDROGEN_CODE_STUB |
| 2418 #undef DEFINE_CODE_STUB | 2433 #undef DEFINE_CODE_STUB |
| 2419 #undef DEFINE_CODE_STUB_BASE | 2434 #undef DEFINE_CODE_STUB_BASE |
| 2420 } } // namespace v8::internal | 2435 } } // namespace v8::internal |
| 2421 | 2436 |
| 2422 #endif // V8_CODE_STUBS_H_ | 2437 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |