| 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 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1053 compiler::Node* context); | 1053 compiler::Node* context); |
| 1054 | 1054 |
| 1055 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewClosure); | 1055 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewClosure); |
| 1056 DEFINE_TURBOFAN_CODE_STUB(FastNewClosure, TurboFanCodeStub); | 1056 DEFINE_TURBOFAN_CODE_STUB(FastNewClosure, TurboFanCodeStub); |
| 1057 }; | 1057 }; |
| 1058 | 1058 |
| 1059 class FastNewFunctionContextStub final : public TurboFanCodeStub { | 1059 class FastNewFunctionContextStub final : public TurboFanCodeStub { |
| 1060 public: | 1060 public: |
| 1061 static const int kMaximumSlots = 64; | 1061 static const int kMaximumSlots = 64; |
| 1062 | 1062 |
| 1063 FastNewFunctionContextStub(Isolate* isolate, int slots) | 1063 explicit FastNewFunctionContextStub(Isolate* isolate) |
| 1064 : TurboFanCodeStub(isolate) { | 1064 : TurboFanCodeStub(isolate) {} |
| 1065 DCHECK(slots >= 0 && slots <= kMaximumSlots); | |
| 1066 minor_key_ = SlotsBits::encode(slots); | |
| 1067 } | |
| 1068 | |
| 1069 int slots() const { return SlotsBits::decode(minor_key_); } | |
| 1070 | 1065 |
| 1071 private: | 1066 private: |
| 1072 class SlotsBits : public BitField<int, 0, 8> {}; | |
| 1073 | |
| 1074 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewFunctionContext); | 1067 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewFunctionContext); |
| 1075 DEFINE_TURBOFAN_CODE_STUB(FastNewFunctionContext, TurboFanCodeStub); | 1068 DEFINE_TURBOFAN_CODE_STUB(FastNewFunctionContext, TurboFanCodeStub); |
| 1076 }; | 1069 }; |
| 1077 | 1070 |
| 1078 | 1071 |
| 1079 class FastNewObjectStub final : public PlatformCodeStub { | 1072 class FastNewObjectStub final : public PlatformCodeStub { |
| 1080 public: | 1073 public: |
| 1081 explicit FastNewObjectStub(Isolate* isolate) : PlatformCodeStub(isolate) {} | 1074 explicit FastNewObjectStub(Isolate* isolate) : PlatformCodeStub(isolate) {} |
| 1082 | 1075 |
| 1083 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewObject); | 1076 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewObject); |
| (...skipping 2027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3111 #undef DEFINE_HYDROGEN_CODE_STUB | 3104 #undef DEFINE_HYDROGEN_CODE_STUB |
| 3112 #undef DEFINE_CODE_STUB | 3105 #undef DEFINE_CODE_STUB |
| 3113 #undef DEFINE_CODE_STUB_BASE | 3106 #undef DEFINE_CODE_STUB_BASE |
| 3114 | 3107 |
| 3115 extern Representation RepresentationFromType(Type* type); | 3108 extern Representation RepresentationFromType(Type* type); |
| 3116 | 3109 |
| 3117 } // namespace internal | 3110 } // namespace internal |
| 3118 } // namespace v8 | 3111 } // namespace v8 |
| 3119 | 3112 |
| 3120 #endif // V8_CODE_STUBS_H_ | 3113 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |