| 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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 __ movq(string, FieldOperand(string, SlicedString::kParentOffset)); | 546 __ movq(string, FieldOperand(string, SlicedString::kParentOffset)); |
| 547 __ jmp(&indirect_string_loaded, Label::kNear); | 547 __ jmp(&indirect_string_loaded, Label::kNear); |
| 548 | 548 |
| 549 // Handle cons strings. | 549 // Handle cons strings. |
| 550 // Check whether the right hand side is the empty string (i.e. if | 550 // Check whether the right hand side is the empty string (i.e. if |
| 551 // this is really a flat string in a cons string). If that is not | 551 // this is really a flat string in a cons string). If that is not |
| 552 // the case we would rather go to the runtime system now to flatten | 552 // the case we would rather go to the runtime system now to flatten |
| 553 // the string. | 553 // the string. |
| 554 __ bind(&cons_string); | 554 __ bind(&cons_string); |
| 555 __ CompareRoot(FieldOperand(string, ConsString::kSecondOffset), | 555 __ CompareRoot(FieldOperand(string, ConsString::kSecondOffset), |
| 556 Heap::kEmptyStringRootIndex); | 556 Heap::kempty_stringRootIndex); |
| 557 __ j(not_equal, call_runtime); | 557 __ j(not_equal, call_runtime); |
| 558 __ movq(string, FieldOperand(string, ConsString::kFirstOffset)); | 558 __ movq(string, FieldOperand(string, ConsString::kFirstOffset)); |
| 559 | 559 |
| 560 __ bind(&indirect_string_loaded); | 560 __ bind(&indirect_string_loaded); |
| 561 __ movq(result, FieldOperand(string, HeapObject::kMapOffset)); | 561 __ movq(result, FieldOperand(string, HeapObject::kMapOffset)); |
| 562 __ movzxbl(result, FieldOperand(result, Map::kInstanceTypeOffset)); | 562 __ movzxbl(result, FieldOperand(result, Map::kInstanceTypeOffset)); |
| 563 | 563 |
| 564 // Distinguish sequential and external strings. Only these two string | 564 // Distinguish sequential and external strings. Only these two string |
| 565 // representations can reach here (slices and flat cons strings have been | 565 // representations can reach here (slices and flat cons strings have been |
| 566 // reduced to the underlying sequential or external string). | 566 // reduced to the underlying sequential or external string). |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 CodePatcher patcher(sequence, young_length); | 775 CodePatcher patcher(sequence, young_length); |
| 776 patcher.masm()->call(stub->instruction_start()); | 776 patcher.masm()->call(stub->instruction_start()); |
| 777 patcher.masm()->nop(); | 777 patcher.masm()->nop(); |
| 778 } | 778 } |
| 779 } | 779 } |
| 780 | 780 |
| 781 | 781 |
| 782 } } // namespace v8::internal | 782 } } // namespace v8::internal |
| 783 | 783 |
| 784 #endif // V8_TARGET_ARCH_X64 | 784 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |