OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 Register hash, | 200 Register hash, |
201 Register scratch); | 201 Register scratch); |
202 | 202 |
203 private: | 203 private: |
204 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper); | 204 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper); |
205 }; | 205 }; |
206 | 206 |
207 | 207 |
208 // Flag that indicates how to generate code for the stub StringAddStub. | 208 // Flag that indicates how to generate code for the stub StringAddStub. |
209 enum StringAddFlags { | 209 enum StringAddFlags { |
210 NO_STRING_ADD_FLAGS = 0, | 210 NO_STRING_ADD_FLAGS = 1 << 0, |
211 // Omit left string check in stub (left is definitely a string). | 211 // Omit left string check in stub (left is definitely a string). |
212 NO_STRING_CHECK_LEFT_IN_STUB = 1 << 0, | 212 NO_STRING_CHECK_LEFT_IN_STUB = 1 << 1, |
213 // Omit right string check in stub (right is definitely a string). | 213 // Omit right string check in stub (right is definitely a string). |
214 NO_STRING_CHECK_RIGHT_IN_STUB = 1 << 1, | 214 NO_STRING_CHECK_RIGHT_IN_STUB = 1 << 2, |
| 215 // Stub needs a frame before calling the runtime |
| 216 ERECT_FRAME = 1 << 3, |
215 // Omit both string checks in stub. | 217 // Omit both string checks in stub. |
216 NO_STRING_CHECK_IN_STUB = | 218 NO_STRING_CHECK_IN_STUB = |
217 NO_STRING_CHECK_LEFT_IN_STUB | NO_STRING_CHECK_RIGHT_IN_STUB | 219 NO_STRING_CHECK_LEFT_IN_STUB | NO_STRING_CHECK_RIGHT_IN_STUB |
218 }; | 220 }; |
219 | 221 |
220 | 222 |
221 class StringAddStub: public PlatformCodeStub { | 223 class StringAddStub: public PlatformCodeStub { |
222 public: | 224 public: |
223 explicit StringAddStub(StringAddFlags flags) : flags_(flags) {} | 225 explicit StringAddStub(StringAddFlags flags) : flags_(flags) {} |
224 | 226 |
225 private: | 227 private: |
226 Major MajorKey() { return StringAdd; } | 228 Major MajorKey() { return StringAdd; } |
227 int MinorKey() { return flags_; } | 229 int MinorKey() { return flags_; } |
228 | 230 |
229 void Generate(MacroAssembler* masm); | 231 void Generate(MacroAssembler* masm); |
230 | 232 |
231 void GenerateConvertArgument(MacroAssembler* masm, | 233 void GenerateConvertArgument(MacroAssembler* masm, |
232 int stack_offset, | 234 int stack_offset, |
233 Register arg, | 235 Register arg, |
234 Register scratch1, | 236 Register scratch1, |
235 Register scratch2, | 237 Register scratch2, |
236 Register scratch3, | 238 Register scratch3, |
237 Label* slow); | 239 Label* slow); |
238 | 240 |
| 241 void GenerateRegisterArgsPush(MacroAssembler* masm); |
| 242 void GenerateRegisterArgsPop(MacroAssembler* masm, Register temp); |
| 243 |
239 const StringAddFlags flags_; | 244 const StringAddFlags flags_; |
240 }; | 245 }; |
241 | 246 |
242 | 247 |
243 class SubStringStub: public PlatformCodeStub { | 248 class SubStringStub: public PlatformCodeStub { |
244 public: | 249 public: |
245 SubStringStub() {} | 250 SubStringStub() {} |
246 | 251 |
247 private: | 252 private: |
248 Major MajorKey() { return SubString; } | 253 Major MajorKey() { return SubString; } |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 RememberedSetAction remembered_set_action_; | 621 RememberedSetAction remembered_set_action_; |
617 SaveFPRegsMode save_fp_regs_mode_; | 622 SaveFPRegsMode save_fp_regs_mode_; |
618 Label slow_; | 623 Label slow_; |
619 RegisterAllocation regs_; | 624 RegisterAllocation regs_; |
620 }; | 625 }; |
621 | 626 |
622 | 627 |
623 } } // namespace v8::internal | 628 } } // namespace v8::internal |
624 | 629 |
625 #endif // V8_X64_CODE_STUBS_X64_H_ | 630 #endif // V8_X64_CODE_STUBS_X64_H_ |
OLD | NEW |