| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 V(Inc) \ | 106 V(Inc) \ |
| 107 V(InternalArrayNoArgumentConstructor) \ | 107 V(InternalArrayNoArgumentConstructor) \ |
| 108 V(InternalArraySingleArgumentConstructor) \ | 108 V(InternalArraySingleArgumentConstructor) \ |
| 109 V(Dec) \ | 109 V(Dec) \ |
| 110 V(ElementsTransitionAndStore) \ | 110 V(ElementsTransitionAndStore) \ |
| 111 V(FastCloneRegExp) \ | 111 V(FastCloneRegExp) \ |
| 112 V(FastCloneShallowArray) \ | 112 V(FastCloneShallowArray) \ |
| 113 V(FastCloneShallowObject) \ | 113 V(FastCloneShallowObject) \ |
| 114 V(FastNewClosure) \ | 114 V(FastNewClosure) \ |
| 115 V(FastNewFunctionContext) \ | 115 V(FastNewFunctionContext) \ |
| 116 V(FastNewEvalContext) \ |
| 116 V(KeyedLoadSloppyArguments) \ | 117 V(KeyedLoadSloppyArguments) \ |
| 117 V(KeyedStoreSloppyArguments) \ | 118 V(KeyedStoreSloppyArguments) \ |
| 118 V(LoadScriptContextField) \ | 119 V(LoadScriptContextField) \ |
| 119 V(StoreScriptContextField) \ | 120 V(StoreScriptContextField) \ |
| 120 V(NumberToString) \ | 121 V(NumberToString) \ |
| 121 V(StringAdd) \ | 122 V(StringAdd) \ |
| 122 V(GetProperty) \ | 123 V(GetProperty) \ |
| 123 V(LoadIC) \ | 124 V(LoadIC) \ |
| 124 V(KeyedLoadICTF) \ | 125 V(KeyedLoadICTF) \ |
| 125 V(StoreFastElement) \ | 126 V(StoreFastElement) \ |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 858 private: | 859 private: |
| 859 // FastNewFunctionContextStub can only allocate closures which fit in the | 860 // FastNewFunctionContextStub can only allocate closures which fit in the |
| 860 // new space. | 861 // new space. |
| 861 STATIC_ASSERT(((kMaximumSlots + Context::MIN_CONTEXT_SLOTS) * kPointerSize + | 862 STATIC_ASSERT(((kMaximumSlots + Context::MIN_CONTEXT_SLOTS) * kPointerSize + |
| 862 FixedArray::kHeaderSize) < kMaxRegularHeapObjectSize); | 863 FixedArray::kHeaderSize) < kMaxRegularHeapObjectSize); |
| 863 | 864 |
| 864 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewFunctionContext); | 865 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewFunctionContext); |
| 865 DEFINE_TURBOFAN_CODE_STUB(FastNewFunctionContext, TurboFanCodeStub); | 866 DEFINE_TURBOFAN_CODE_STUB(FastNewFunctionContext, TurboFanCodeStub); |
| 866 }; | 867 }; |
| 867 | 868 |
| 869 class FastNewEvalContextStub final : public TurboFanCodeStub { |
| 870 public: |
| 871 static const int kMaximumSlots = 0x8000; |
| 872 |
| 873 explicit FastNewEvalContextStub(Isolate* isolate) |
| 874 : TurboFanCodeStub(isolate) {} |
| 875 |
| 876 static compiler::Node* Generate(CodeStubAssembler* assembler, |
| 877 compiler::Node* function, |
| 878 compiler::Node* slots, |
| 879 compiler::Node* context); |
| 880 |
| 881 private: |
| 882 // FastNewEvalContextStub can only allocate closures which fit in the |
| 883 // new space. |
| 884 STATIC_ASSERT(((kMaximumSlots + Context::MIN_CONTEXT_SLOTS) * kPointerSize + |
| 885 FixedArray::kHeaderSize) < kMaxRegularHeapObjectSize); |
| 886 |
| 887 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewEvalContext); |
| 888 DEFINE_TURBOFAN_CODE_STUB(FastNewEvalContext, TurboFanCodeStub); |
| 889 }; |
| 868 | 890 |
| 869 class FastNewObjectStub final : public PlatformCodeStub { | 891 class FastNewObjectStub final : public PlatformCodeStub { |
| 870 public: | 892 public: |
| 871 explicit FastNewObjectStub(Isolate* isolate) : PlatformCodeStub(isolate) {} | 893 explicit FastNewObjectStub(Isolate* isolate) : PlatformCodeStub(isolate) {} |
| 872 | 894 |
| 873 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewObject); | 895 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewObject); |
| 874 DEFINE_PLATFORM_CODE_STUB(FastNewObject, PlatformCodeStub); | 896 DEFINE_PLATFORM_CODE_STUB(FastNewObject, PlatformCodeStub); |
| 875 }; | 897 }; |
| 876 | 898 |
| 877 | 899 |
| (...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2719 #undef DEFINE_PLATFORM_CODE_STUB | 2741 #undef DEFINE_PLATFORM_CODE_STUB |
| 2720 #undef DEFINE_HANDLER_CODE_STUB | 2742 #undef DEFINE_HANDLER_CODE_STUB |
| 2721 #undef DEFINE_HYDROGEN_CODE_STUB | 2743 #undef DEFINE_HYDROGEN_CODE_STUB |
| 2722 #undef DEFINE_CODE_STUB | 2744 #undef DEFINE_CODE_STUB |
| 2723 #undef DEFINE_CODE_STUB_BASE | 2745 #undef DEFINE_CODE_STUB_BASE |
| 2724 | 2746 |
| 2725 } // namespace internal | 2747 } // namespace internal |
| 2726 } // namespace v8 | 2748 } // namespace v8 |
| 2727 | 2749 |
| 2728 #endif // V8_CODE_STUBS_H_ | 2750 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |