| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 4354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4365 DeferredStringCharFromCode* deferred = | 4365 DeferredStringCharFromCode* deferred = |
| 4366 new(zone()) DeferredStringCharFromCode(this, instr); | 4366 new(zone()) DeferredStringCharFromCode(this, instr); |
| 4367 | 4367 |
| 4368 ASSERT(instr->hydrogen()->value()->representation().IsInteger32()); | 4368 ASSERT(instr->hydrogen()->value()->representation().IsInteger32()); |
| 4369 Register char_code = ToRegister(instr->char_code()); | 4369 Register char_code = ToRegister(instr->char_code()); |
| 4370 Register result = ToRegister(instr->result()); | 4370 Register result = ToRegister(instr->result()); |
| 4371 ASSERT(!char_code.is(result)); | 4371 ASSERT(!char_code.is(result)); |
| 4372 | 4372 |
| 4373 __ cmpl(char_code, Immediate(String::kMaxOneByteCharCode)); | 4373 __ cmpl(char_code, Immediate(String::kMaxOneByteCharCode)); |
| 4374 __ j(above, deferred->entry()); | 4374 __ j(above, deferred->entry()); |
| 4375 __ movsxlq(char_code, char_code); |
| 4375 __ LoadRoot(result, Heap::kSingleCharacterStringCacheRootIndex); | 4376 __ LoadRoot(result, Heap::kSingleCharacterStringCacheRootIndex); |
| 4376 __ movq(result, FieldOperand(result, | 4377 __ movq(result, FieldOperand(result, |
| 4377 char_code, times_pointer_size, | 4378 char_code, times_pointer_size, |
| 4378 FixedArray::kHeaderSize)); | 4379 FixedArray::kHeaderSize)); |
| 4379 __ CompareRoot(result, Heap::kUndefinedValueRootIndex); | 4380 __ CompareRoot(result, Heap::kUndefinedValueRootIndex); |
| 4380 __ j(equal, deferred->entry()); | 4381 __ j(equal, deferred->entry()); |
| 4381 __ bind(deferred->exit()); | 4382 __ bind(deferred->exit()); |
| 4382 } | 4383 } |
| 4383 | 4384 |
| 4384 | 4385 |
| (...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5822 FixedArray::kHeaderSize - kPointerSize)); | 5823 FixedArray::kHeaderSize - kPointerSize)); |
| 5823 __ bind(&done); | 5824 __ bind(&done); |
| 5824 } | 5825 } |
| 5825 | 5826 |
| 5826 | 5827 |
| 5827 #undef __ | 5828 #undef __ |
| 5828 | 5829 |
| 5829 } } // namespace v8::internal | 5830 } } // namespace v8::internal |
| 5830 | 5831 |
| 5831 #endif // V8_TARGET_ARCH_X64 | 5832 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |