| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 Register character); | 138 Register character); |
| 139 | 139 |
| 140 static void GenerateHashGetHash(MacroAssembler* masm, | 140 static void GenerateHashGetHash(MacroAssembler* masm, |
| 141 Register hash); | 141 Register hash); |
| 142 | 142 |
| 143 private: | 143 private: |
| 144 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper); | 144 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper); |
| 145 }; | 145 }; |
| 146 | 146 |
| 147 | 147 |
| 148 // Flag that indicates how to generate code for the stub StringAddStub. | |
| 149 enum StringAddFlags { | |
| 150 NO_STRING_ADD_FLAGS = 1 << 0, | |
| 151 // Omit left string check in stub (left is definitely a string). | |
| 152 NO_STRING_CHECK_LEFT_IN_STUB = 1 << 1, | |
| 153 // Omit right string check in stub (right is definitely a string). | |
| 154 NO_STRING_CHECK_RIGHT_IN_STUB = 1 << 2, | |
| 155 // Stub needs a frame before calling the runtime | |
| 156 ERECT_FRAME = 1 << 3, | |
| 157 // Omit both string checks in stub. | |
| 158 NO_STRING_CHECK_IN_STUB = | |
| 159 NO_STRING_CHECK_LEFT_IN_STUB | NO_STRING_CHECK_RIGHT_IN_STUB | |
| 160 }; | |
| 161 | |
| 162 | |
| 163 class StringAddStub: public PlatformCodeStub { | 148 class StringAddStub: public PlatformCodeStub { |
| 164 public: | 149 public: |
| 165 explicit StringAddStub(StringAddFlags flags) : flags_(flags) {} | 150 explicit StringAddStub(StringAddFlags flags) : flags_(flags) {} |
| 166 | 151 |
| 167 private: | 152 private: |
| 168 Major MajorKey() { return StringAdd; } | 153 Major MajorKey() { return StringAdd; } |
| 169 int MinorKey() { return flags_; } | 154 int MinorKey() { return flags_; } |
| 170 | 155 |
| 171 void Generate(MacroAssembler* masm); | 156 void Generate(MacroAssembler* masm); |
| 172 | 157 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 // the register object is found in the cache the generated code falls through | 276 // the register object is found in the cache the generated code falls through |
| 292 // with the result in the result register. The object and the result register | 277 // with the result in the result register. The object and the result register |
| 293 // can be the same. If the number is not found in the cache the code jumps to | 278 // can be the same. If the number is not found in the cache the code jumps to |
| 294 // the label not_found with only the content of register object unchanged. | 279 // the label not_found with only the content of register object unchanged. |
| 295 static void GenerateLookupNumberStringCache(MacroAssembler* masm, | 280 static void GenerateLookupNumberStringCache(MacroAssembler* masm, |
| 296 Register object, | 281 Register object, |
| 297 Register result, | 282 Register result, |
| 298 Register scratch1, | 283 Register scratch1, |
| 299 Register scratch2, | 284 Register scratch2, |
| 300 Register scratch3, | 285 Register scratch3, |
| 301 bool object_is_smi, | |
| 302 Label* not_found); | 286 Label* not_found); |
| 303 | 287 |
| 304 private: | 288 private: |
| 305 Major MajorKey() { return NumberToString; } | 289 Major MajorKey() { return NumberToString; } |
| 306 int MinorKey() { return 0; } | 290 int MinorKey() { return 0; } |
| 307 | 291 |
| 308 void Generate(MacroAssembler* masm); | 292 void Generate(MacroAssembler* masm); |
| 309 }; | 293 }; |
| 310 | 294 |
| 311 | 295 |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 703 | 687 |
| 704 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; | 688 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; |
| 705 | 689 |
| 706 LookupMode mode_; | 690 LookupMode mode_; |
| 707 }; | 691 }; |
| 708 | 692 |
| 709 | 693 |
| 710 } } // namespace v8::internal | 694 } } // namespace v8::internal |
| 711 | 695 |
| 712 #endif // V8_MIPS_CODE_STUBS_ARM_H_ | 696 #endif // V8_MIPS_CODE_STUBS_ARM_H_ |
| OLD | NEW |