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 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1061 DEFINE_PLATFORM_CODE_STUB(FastNewObject, PlatformCodeStub); | 1061 DEFINE_PLATFORM_CODE_STUB(FastNewObject, PlatformCodeStub); |
1062 }; | 1062 }; |
1063 | 1063 |
1064 | 1064 |
1065 // TODO(turbofan): This stub should be possible to write in TurboFan | 1065 // TODO(turbofan): This stub should be possible to write in TurboFan |
1066 // using the CodeStubAssembler very soon in a way that is as efficient | 1066 // using the CodeStubAssembler very soon in a way that is as efficient |
1067 // and easy as the current handwritten version, which is partly a copy | 1067 // and easy as the current handwritten version, which is partly a copy |
1068 // of the strict arguments object materialization code. | 1068 // of the strict arguments object materialization code. |
1069 class FastNewRestParameterStub final : public PlatformCodeStub { | 1069 class FastNewRestParameterStub final : public PlatformCodeStub { |
1070 public: | 1070 public: |
1071 explicit FastNewRestParameterStub(Isolate* isolate) | 1071 explicit FastNewRestParameterStub(Isolate* isolate, |
1072 : PlatformCodeStub(isolate) {} | 1072 bool skip_stub_frame = false) |
| 1073 : PlatformCodeStub(isolate) { |
| 1074 minor_key_ = SkipStubFrameBits::encode(skip_stub_frame); |
| 1075 } |
1073 | 1076 |
1074 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewRestParameter); | 1077 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewRestParameter); |
1075 DEFINE_PLATFORM_CODE_STUB(FastNewRestParameter, PlatformCodeStub); | 1078 DEFINE_PLATFORM_CODE_STUB(FastNewRestParameter, PlatformCodeStub); |
| 1079 |
| 1080 int skip_stub_frame() const { return SkipStubFrameBits::decode(minor_key_); } |
| 1081 |
| 1082 private: |
| 1083 class SkipStubFrameBits : public BitField<bool, 0, 1> {}; |
1076 }; | 1084 }; |
1077 | 1085 |
1078 | 1086 |
1079 // TODO(turbofan): This stub should be possible to write in TurboFan | 1087 // TODO(turbofan): This stub should be possible to write in TurboFan |
1080 // using the CodeStubAssembler very soon in a way that is as efficient | 1088 // using the CodeStubAssembler very soon in a way that is as efficient |
1081 // and easy as the current handwritten version. | 1089 // and easy as the current handwritten version. |
1082 class FastNewSloppyArgumentsStub final : public PlatformCodeStub { | 1090 class FastNewSloppyArgumentsStub final : public PlatformCodeStub { |
1083 public: | 1091 public: |
1084 explicit FastNewSloppyArgumentsStub(Isolate* isolate) | 1092 explicit FastNewSloppyArgumentsStub(Isolate* isolate, |
1085 : PlatformCodeStub(isolate) {} | 1093 bool skip_stub_frame = false) |
| 1094 : PlatformCodeStub(isolate) { |
| 1095 minor_key_ = SkipStubFrameBits::encode(skip_stub_frame); |
| 1096 } |
| 1097 |
| 1098 int skip_stub_frame() const { return SkipStubFrameBits::decode(minor_key_); } |
1086 | 1099 |
1087 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewSloppyArguments); | 1100 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewSloppyArguments); |
1088 DEFINE_PLATFORM_CODE_STUB(FastNewSloppyArguments, PlatformCodeStub); | 1101 DEFINE_PLATFORM_CODE_STUB(FastNewSloppyArguments, PlatformCodeStub); |
| 1102 |
| 1103 private: |
| 1104 class SkipStubFrameBits : public BitField<bool, 0, 1> {}; |
1089 }; | 1105 }; |
1090 | 1106 |
1091 | 1107 |
1092 // TODO(turbofan): This stub should be possible to write in TurboFan | 1108 // TODO(turbofan): This stub should be possible to write in TurboFan |
1093 // using the CodeStubAssembler very soon in a way that is as efficient | 1109 // using the CodeStubAssembler very soon in a way that is as efficient |
1094 // and easy as the current handwritten version. | 1110 // and easy as the current handwritten version. |
1095 class FastNewStrictArgumentsStub final : public PlatformCodeStub { | 1111 class FastNewStrictArgumentsStub final : public PlatformCodeStub { |
1096 public: | 1112 public: |
1097 explicit FastNewStrictArgumentsStub(Isolate* isolate) | 1113 explicit FastNewStrictArgumentsStub(Isolate* isolate, |
1098 : PlatformCodeStub(isolate) {} | 1114 bool skip_stub_frame = false) |
| 1115 : PlatformCodeStub(isolate) { |
| 1116 minor_key_ = SkipStubFrameBits::encode(skip_stub_frame); |
| 1117 } |
1099 | 1118 |
1100 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewStrictArguments); | 1119 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewStrictArguments); |
1101 DEFINE_PLATFORM_CODE_STUB(FastNewStrictArguments, PlatformCodeStub); | 1120 DEFINE_PLATFORM_CODE_STUB(FastNewStrictArguments, PlatformCodeStub); |
| 1121 |
| 1122 int skip_stub_frame() const { return SkipStubFrameBits::decode(minor_key_); } |
| 1123 |
| 1124 private: |
| 1125 class SkipStubFrameBits : public BitField<bool, 0, 1> {}; |
1102 }; | 1126 }; |
1103 | 1127 |
1104 | 1128 |
1105 class FastCloneRegExpStub final : public HydrogenCodeStub { | 1129 class FastCloneRegExpStub final : public HydrogenCodeStub { |
1106 public: | 1130 public: |
1107 explicit FastCloneRegExpStub(Isolate* isolate) : HydrogenCodeStub(isolate) {} | 1131 explicit FastCloneRegExpStub(Isolate* isolate) : HydrogenCodeStub(isolate) {} |
1108 | 1132 |
1109 private: | 1133 private: |
1110 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastCloneRegExp); | 1134 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastCloneRegExp); |
1111 DEFINE_HYDROGEN_CODE_STUB(FastCloneRegExp, HydrogenCodeStub); | 1135 DEFINE_HYDROGEN_CODE_STUB(FastCloneRegExp, HydrogenCodeStub); |
(...skipping 2123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3235 #undef DEFINE_HYDROGEN_CODE_STUB | 3259 #undef DEFINE_HYDROGEN_CODE_STUB |
3236 #undef DEFINE_CODE_STUB | 3260 #undef DEFINE_CODE_STUB |
3237 #undef DEFINE_CODE_STUB_BASE | 3261 #undef DEFINE_CODE_STUB_BASE |
3238 | 3262 |
3239 extern Representation RepresentationFromType(Type* type); | 3263 extern Representation RepresentationFromType(Type* type); |
3240 | 3264 |
3241 } // namespace internal | 3265 } // namespace internal |
3242 } // namespace v8 | 3266 } // namespace v8 |
3243 | 3267 |
3244 #endif // V8_CODE_STUBS_H_ | 3268 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |