| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 Register scratch); | 137 Register scratch); |
| 138 static void GenerateHashGetHash(MacroAssembler* masm, | 138 static void GenerateHashGetHash(MacroAssembler* masm, |
| 139 Register hash, | 139 Register hash, |
| 140 Register scratch); | 140 Register scratch); |
| 141 | 141 |
| 142 private: | 142 private: |
| 143 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper); | 143 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper); |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 | 146 |
| 147 enum StringAddFlags { | |
| 148 NO_STRING_ADD_FLAGS = 1 << 0, | |
| 149 // Omit left string check in stub (left is definitely a string). | |
| 150 NO_STRING_CHECK_LEFT_IN_STUB = 1 << 1, | |
| 151 // Omit right string check in stub (right is definitely a string). | |
| 152 NO_STRING_CHECK_RIGHT_IN_STUB = 1 << 2, | |
| 153 // Stub needs a frame before calling the runtime | |
| 154 ERECT_FRAME = 1 << 3, | |
| 155 // Omit both string checks in stub. | |
| 156 NO_STRING_CHECK_IN_STUB = | |
| 157 NO_STRING_CHECK_LEFT_IN_STUB | NO_STRING_CHECK_RIGHT_IN_STUB | |
| 158 }; | |
| 159 | |
| 160 | |
| 161 class StringAddStub: public PlatformCodeStub { | 147 class StringAddStub: public PlatformCodeStub { |
| 162 public: | 148 public: |
| 163 explicit StringAddStub(StringAddFlags flags) : flags_(flags) {} | 149 explicit StringAddStub(StringAddFlags flags) : flags_(flags) {} |
| 164 | 150 |
| 165 private: | 151 private: |
| 166 Major MajorKey() { return StringAdd; } | 152 Major MajorKey() { return StringAdd; } |
| 167 int MinorKey() { return flags_; } | 153 int MinorKey() { return flags_; } |
| 168 | 154 |
| 169 void Generate(MacroAssembler* masm); | 155 void Generate(MacroAssembler* masm); |
| 170 | 156 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 // Generate code to do a lookup in the number string cache. If the number in | 224 // Generate code to do a lookup in the number string cache. If the number in |
| 239 // the register object is found in the cache the generated code falls through | 225 // the register object is found in the cache the generated code falls through |
| 240 // with the result in the result register. The object and the result register | 226 // with the result in the result register. The object and the result register |
| 241 // can be the same. If the number is not found in the cache the code jumps to | 227 // can be the same. If the number is not found in the cache the code jumps to |
| 242 // the label not_found with only the content of register object unchanged. | 228 // the label not_found with only the content of register object unchanged. |
| 243 static void GenerateLookupNumberStringCache(MacroAssembler* masm, | 229 static void GenerateLookupNumberStringCache(MacroAssembler* masm, |
| 244 Register object, | 230 Register object, |
| 245 Register result, | 231 Register result, |
| 246 Register scratch1, | 232 Register scratch1, |
| 247 Register scratch2, | 233 Register scratch2, |
| 248 bool object_is_smi, | |
| 249 Label* not_found); | 234 Label* not_found); |
| 250 | 235 |
| 251 private: | 236 private: |
| 252 Major MajorKey() { return NumberToString; } | 237 Major MajorKey() { return NumberToString; } |
| 253 int MinorKey() { return 0; } | 238 int MinorKey() { return 0; } |
| 254 | 239 |
| 255 void Generate(MacroAssembler* masm); | 240 void Generate(MacroAssembler* masm); |
| 256 }; | 241 }; |
| 257 | 242 |
| 258 | 243 |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 Register address_; | 559 Register address_; |
| 575 RememberedSetAction remembered_set_action_; | 560 RememberedSetAction remembered_set_action_; |
| 576 SaveFPRegsMode save_fp_regs_mode_; | 561 SaveFPRegsMode save_fp_regs_mode_; |
| 577 RegisterAllocation regs_; | 562 RegisterAllocation regs_; |
| 578 }; | 563 }; |
| 579 | 564 |
| 580 | 565 |
| 581 } } // namespace v8::internal | 566 } } // namespace v8::internal |
| 582 | 567 |
| 583 #endif // V8_IA32_CODE_STUBS_IA32_H_ | 568 #endif // V8_IA32_CODE_STUBS_IA32_H_ |
| OLD | NEW |