| 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 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1093 static compiler::Node* Generate(CodeStubAssembler* assembler, | 1093 static compiler::Node* Generate(CodeStubAssembler* assembler, |
| 1094 compiler::Node* shared_info, | 1094 compiler::Node* shared_info, |
| 1095 compiler::Node* context); | 1095 compiler::Node* context); |
| 1096 | 1096 |
| 1097 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewClosure); | 1097 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewClosure); |
| 1098 DEFINE_TURBOFAN_CODE_STUB(FastNewClosure, TurboFanCodeStub); | 1098 DEFINE_TURBOFAN_CODE_STUB(FastNewClosure, TurboFanCodeStub); |
| 1099 }; | 1099 }; |
| 1100 | 1100 |
| 1101 class FastNewFunctionContextStub final : public TurboFanCodeStub { | 1101 class FastNewFunctionContextStub final : public TurboFanCodeStub { |
| 1102 public: | 1102 public: |
| 1103 static const int kMaximumSlots = 0x8000; |
| 1104 |
| 1103 explicit FastNewFunctionContextStub(Isolate* isolate) | 1105 explicit FastNewFunctionContextStub(Isolate* isolate) |
| 1104 : TurboFanCodeStub(isolate) {} | 1106 : TurboFanCodeStub(isolate) {} |
| 1105 | 1107 |
| 1106 static compiler::Node* Generate(CodeStubAssembler* assembler, | 1108 static compiler::Node* Generate(CodeStubAssembler* assembler, |
| 1107 compiler::Node* function, | 1109 compiler::Node* function, |
| 1108 compiler::Node* slots, | 1110 compiler::Node* slots, |
| 1109 compiler::Node* context); | 1111 compiler::Node* context); |
| 1110 | 1112 |
| 1111 private: | 1113 private: |
| 1114 // FastNewFunctionContextStub can only allocate closures which fit in the |
| 1115 // new space. |
| 1116 STATIC_ASSERT(((kMaximumSlots + Context::MIN_CONTEXT_SLOTS) * kPointerSize + |
| 1117 FixedArray::kHeaderSize) < kMaxRegularHeapObjectSize); |
| 1118 |
| 1112 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewFunctionContext); | 1119 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewFunctionContext); |
| 1113 DEFINE_TURBOFAN_CODE_STUB(FastNewFunctionContext, TurboFanCodeStub); | 1120 DEFINE_TURBOFAN_CODE_STUB(FastNewFunctionContext, TurboFanCodeStub); |
| 1114 }; | 1121 }; |
| 1115 | 1122 |
| 1116 | 1123 |
| 1117 class FastNewObjectStub final : public PlatformCodeStub { | 1124 class FastNewObjectStub final : public PlatformCodeStub { |
| 1118 public: | 1125 public: |
| 1119 explicit FastNewObjectStub(Isolate* isolate) : PlatformCodeStub(isolate) {} | 1126 explicit FastNewObjectStub(Isolate* isolate) : PlatformCodeStub(isolate) {} |
| 1120 | 1127 |
| 1121 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewObject); | 1128 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewObject); |
| (...skipping 2008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3130 #undef DEFINE_HYDROGEN_CODE_STUB | 3137 #undef DEFINE_HYDROGEN_CODE_STUB |
| 3131 #undef DEFINE_CODE_STUB | 3138 #undef DEFINE_CODE_STUB |
| 3132 #undef DEFINE_CODE_STUB_BASE | 3139 #undef DEFINE_CODE_STUB_BASE |
| 3133 | 3140 |
| 3134 extern Representation RepresentationFromMachineType(MachineType type); | 3141 extern Representation RepresentationFromMachineType(MachineType type); |
| 3135 | 3142 |
| 3136 } // namespace internal | 3143 } // namespace internal |
| 3137 } // namespace v8 | 3144 } // namespace v8 |
| 3138 | 3145 |
| 3139 #endif // V8_CODE_STUBS_H_ | 3146 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |