| 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 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1153 static compiler::Node* Generate(CodeStubAssembler* assembler, | 1153 static compiler::Node* Generate(CodeStubAssembler* assembler, |
| 1154 compiler::Node* shared_info, | 1154 compiler::Node* shared_info, |
| 1155 compiler::Node* context); | 1155 compiler::Node* context); |
| 1156 | 1156 |
| 1157 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewClosure); | 1157 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewClosure); |
| 1158 DEFINE_TURBOFAN_CODE_STUB(FastNewClosure, TurboFanCodeStub); | 1158 DEFINE_TURBOFAN_CODE_STUB(FastNewClosure, TurboFanCodeStub); |
| 1159 }; | 1159 }; |
| 1160 | 1160 |
| 1161 class FastNewFunctionContextStub final : public TurboFanCodeStub { | 1161 class FastNewFunctionContextStub final : public TurboFanCodeStub { |
| 1162 public: | 1162 public: |
| 1163 static const int kMaximumSlots = 0x8000; |
| 1164 |
| 1163 explicit FastNewFunctionContextStub(Isolate* isolate) | 1165 explicit FastNewFunctionContextStub(Isolate* isolate) |
| 1164 : TurboFanCodeStub(isolate) {} | 1166 : TurboFanCodeStub(isolate) {} |
| 1165 | 1167 |
| 1166 static compiler::Node* Generate(CodeStubAssembler* assembler, | 1168 static compiler::Node* Generate(CodeStubAssembler* assembler, |
| 1167 compiler::Node* function, | 1169 compiler::Node* function, |
| 1168 compiler::Node* slots, | 1170 compiler::Node* slots, |
| 1169 compiler::Node* context); | 1171 compiler::Node* context); |
| 1170 | 1172 |
| 1171 private: | 1173 private: |
| 1174 // FastNewFunctionContextStub can only allocate closures which fit in the |
| 1175 // new space. |
| 1176 STATIC_ASSERT(((kMaximumSlots + Context::MIN_CONTEXT_SLOTS) * kPointerSize + |
| 1177 FixedArray::kHeaderSize) < Page::kMaxRegularHeapObjectSize); |
| 1178 |
| 1172 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewFunctionContext); | 1179 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewFunctionContext); |
| 1173 DEFINE_TURBOFAN_CODE_STUB(FastNewFunctionContext, TurboFanCodeStub); | 1180 DEFINE_TURBOFAN_CODE_STUB(FastNewFunctionContext, TurboFanCodeStub); |
| 1174 }; | 1181 }; |
| 1175 | 1182 |
| 1176 | 1183 |
| 1177 class FastNewObjectStub final : public PlatformCodeStub { | 1184 class FastNewObjectStub final : public PlatformCodeStub { |
| 1178 public: | 1185 public: |
| 1179 explicit FastNewObjectStub(Isolate* isolate) : PlatformCodeStub(isolate) {} | 1186 explicit FastNewObjectStub(Isolate* isolate) : PlatformCodeStub(isolate) {} |
| 1180 | 1187 |
| 1181 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewObject); | 1188 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewObject); |
| (...skipping 2041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3223 #undef DEFINE_HYDROGEN_CODE_STUB | 3230 #undef DEFINE_HYDROGEN_CODE_STUB |
| 3224 #undef DEFINE_CODE_STUB | 3231 #undef DEFINE_CODE_STUB |
| 3225 #undef DEFINE_CODE_STUB_BASE | 3232 #undef DEFINE_CODE_STUB_BASE |
| 3226 | 3233 |
| 3227 extern Representation RepresentationFromType(Type* type); | 3234 extern Representation RepresentationFromType(Type* type); |
| 3228 | 3235 |
| 3229 } // namespace internal | 3236 } // namespace internal |
| 3230 } // namespace v8 | 3237 } // namespace v8 |
| 3231 | 3238 |
| 3232 #endif // V8_CODE_STUBS_H_ | 3239 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |