| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 static void GenerateHashGetHash(MacroAssembler* masm, | 204 static void GenerateHashGetHash(MacroAssembler* masm, |
| 205 Register hash); | 205 Register hash); |
| 206 | 206 |
| 207 private: | 207 private: |
| 208 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper); | 208 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper); |
| 209 }; | 209 }; |
| 210 | 210 |
| 211 | 211 |
| 212 // Flag that indicates how to generate code for the stub StringAddStub. | 212 // Flag that indicates how to generate code for the stub StringAddStub. |
| 213 enum StringAddFlags { | 213 enum StringAddFlags { |
| 214 NO_STRING_ADD_FLAGS = 0, | 214 NO_STRING_ADD_FLAGS = 1 << 0, |
| 215 // Omit left string check in stub (left is definitely a string). | 215 // Omit left string check in stub (left is definitely a string). |
| 216 NO_STRING_CHECK_LEFT_IN_STUB = 1 << 0, | 216 NO_STRING_CHECK_LEFT_IN_STUB = 1 << 1, |
| 217 // Omit right string check in stub (right is definitely a string). | 217 // Omit right string check in stub (right is definitely a string). |
| 218 NO_STRING_CHECK_RIGHT_IN_STUB = 1 << 1, | 218 NO_STRING_CHECK_RIGHT_IN_STUB = 1 << 2, |
| 219 // Stub needs a frame before calling the runtime |
| 220 ERECT_FRAME = 1 << 3, |
| 219 // Omit both string checks in stub. | 221 // Omit both string checks in stub. |
| 220 NO_STRING_CHECK_IN_STUB = | 222 NO_STRING_CHECK_IN_STUB = |
| 221 NO_STRING_CHECK_LEFT_IN_STUB | NO_STRING_CHECK_RIGHT_IN_STUB | 223 NO_STRING_CHECK_LEFT_IN_STUB | NO_STRING_CHECK_RIGHT_IN_STUB |
| 222 }; | 224 }; |
| 223 | 225 |
| 224 | 226 |
| 225 class StringAddStub: public PlatformCodeStub { | 227 class StringAddStub: public PlatformCodeStub { |
| 226 public: | 228 public: |
| 227 explicit StringAddStub(StringAddFlags flags) : flags_(flags) {} | 229 explicit StringAddStub(StringAddFlags flags) : flags_(flags) {} |
| 228 | 230 |
| 229 private: | 231 private: |
| 230 Major MajorKey() { return StringAdd; } | 232 Major MajorKey() { return StringAdd; } |
| 231 int MinorKey() { return flags_; } | 233 int MinorKey() { return flags_; } |
| 232 | 234 |
| 233 void Generate(MacroAssembler* masm); | 235 void Generate(MacroAssembler* masm); |
| 234 | 236 |
| 235 void GenerateConvertArgument(MacroAssembler* masm, | 237 void GenerateConvertArgument(MacroAssembler* masm, |
| 236 int stack_offset, | 238 int stack_offset, |
| 237 Register arg, | 239 Register arg, |
| 238 Register scratch1, | 240 Register scratch1, |
| 239 Register scratch2, | 241 Register scratch2, |
| 240 Register scratch3, | 242 Register scratch3, |
| 241 Register scratch4, | 243 Register scratch4, |
| 242 Label* slow); | 244 Label* slow); |
| 243 | 245 |
| 246 void GenerateRegisterArgsPush(MacroAssembler* masm); |
| 247 void GenerateRegisterArgsPop(MacroAssembler* masm); |
| 248 |
| 244 const StringAddFlags flags_; | 249 const StringAddFlags flags_; |
| 245 }; | 250 }; |
| 246 | 251 |
| 247 | 252 |
| 248 class SubStringStub: public PlatformCodeStub { | 253 class SubStringStub: public PlatformCodeStub { |
| 249 public: | 254 public: |
| 250 SubStringStub() {} | 255 SubStringStub() {} |
| 251 | 256 |
| 252 private: | 257 private: |
| 253 Major MajorKey() { return SubString; } | 258 Major MajorKey() { return SubString; } |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 | 642 |
| 638 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; | 643 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; |
| 639 | 644 |
| 640 LookupMode mode_; | 645 LookupMode mode_; |
| 641 }; | 646 }; |
| 642 | 647 |
| 643 | 648 |
| 644 } } // namespace v8::internal | 649 } } // namespace v8::internal |
| 645 | 650 |
| 646 #endif // V8_ARM_CODE_STUBS_ARM_H_ | 651 #endif // V8_ARM_CODE_STUBS_ARM_H_ |
| OLD | NEW |