| 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 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1075 static compiler::Node* Generate(CodeStubAssembler* assembler, | 1075 static compiler::Node* Generate(CodeStubAssembler* assembler, |
| 1076 compiler::Node* shared_info, | 1076 compiler::Node* shared_info, |
| 1077 compiler::Node* context); | 1077 compiler::Node* context); |
| 1078 | 1078 |
| 1079 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewClosure); | 1079 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewClosure); |
| 1080 DEFINE_TURBOFAN_CODE_STUB(FastNewClosure, TurboFanCodeStub); | 1080 DEFINE_TURBOFAN_CODE_STUB(FastNewClosure, TurboFanCodeStub); |
| 1081 }; | 1081 }; |
| 1082 | 1082 |
| 1083 class FastNewFunctionContextStub final : public TurboFanCodeStub { | 1083 class FastNewFunctionContextStub final : public TurboFanCodeStub { |
| 1084 public: | 1084 public: |
| 1085 static const int kMaximumSlots = 64; | 1085 explicit FastNewFunctionContextStub(Isolate* isolate) |
| 1086 | 1086 : TurboFanCodeStub(isolate) {} |
| 1087 FastNewFunctionContextStub(Isolate* isolate, int slots) | |
| 1088 : TurboFanCodeStub(isolate) { | |
| 1089 DCHECK(slots >= 0 && slots <= kMaximumSlots); | |
| 1090 minor_key_ = SlotsBits::encode(slots); | |
| 1091 } | |
| 1092 | |
| 1093 int slots() const { return SlotsBits::decode(minor_key_); } | |
| 1094 | 1087 |
| 1095 private: | 1088 private: |
| 1096 class SlotsBits : public BitField<int, 0, 8> {}; | |
| 1097 | |
| 1098 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewFunctionContext); | 1089 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewFunctionContext); |
| 1099 DEFINE_TURBOFAN_CODE_STUB(FastNewFunctionContext, TurboFanCodeStub); | 1090 DEFINE_TURBOFAN_CODE_STUB(FastNewFunctionContext, TurboFanCodeStub); |
| 1100 }; | 1091 }; |
| 1101 | 1092 |
| 1102 | 1093 |
| 1103 class FastNewObjectStub final : public PlatformCodeStub { | 1094 class FastNewObjectStub final : public PlatformCodeStub { |
| 1104 public: | 1095 public: |
| 1105 explicit FastNewObjectStub(Isolate* isolate) : PlatformCodeStub(isolate) {} | 1096 explicit FastNewObjectStub(Isolate* isolate) : PlatformCodeStub(isolate) {} |
| 1106 | 1097 |
| 1107 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewObject); | 1098 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewObject); |
| (...skipping 2040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3148 #undef DEFINE_HYDROGEN_CODE_STUB | 3139 #undef DEFINE_HYDROGEN_CODE_STUB |
| 3149 #undef DEFINE_CODE_STUB | 3140 #undef DEFINE_CODE_STUB |
| 3150 #undef DEFINE_CODE_STUB_BASE | 3141 #undef DEFINE_CODE_STUB_BASE |
| 3151 | 3142 |
| 3152 extern Representation RepresentationFromType(Type* type); | 3143 extern Representation RepresentationFromType(Type* type); |
| 3153 | 3144 |
| 3154 } // namespace internal | 3145 } // namespace internal |
| 3155 } // namespace v8 | 3146 } // namespace v8 |
| 3156 | 3147 |
| 3157 #endif // V8_CODE_STUBS_H_ | 3148 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |