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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 __ j(zero, &check_sequential, Label::kNear); | 489 __ j(zero, &check_sequential, Label::kNear); |
490 | 490 |
491 // Dispatch on the indirect string shape: slice or cons. | 491 // Dispatch on the indirect string shape: slice or cons. |
492 Label cons_string; | 492 Label cons_string; |
493 __ testb(result, Immediate(kSlicedNotConsMask)); | 493 __ testb(result, Immediate(kSlicedNotConsMask)); |
494 __ j(zero, &cons_string, Label::kNear); | 494 __ j(zero, &cons_string, Label::kNear); |
495 | 495 |
496 // Handle slices. | 496 // Handle slices. |
497 Label indirect_string_loaded; | 497 Label indirect_string_loaded; |
498 __ SmiToInteger32(result, FieldOperand(string, SlicedString::kOffsetOffset)); | 498 __ SmiToInteger32(result, FieldOperand(string, SlicedString::kOffsetOffset)); |
499 __ addq(index, result); | 499 __ addp(index, result); |
500 __ movp(string, FieldOperand(string, SlicedString::kParentOffset)); | 500 __ movp(string, FieldOperand(string, SlicedString::kParentOffset)); |
501 __ jmp(&indirect_string_loaded, Label::kNear); | 501 __ jmp(&indirect_string_loaded, Label::kNear); |
502 | 502 |
503 // Handle cons strings. | 503 // Handle cons strings. |
504 // Check whether the right hand side is the empty string (i.e. if | 504 // Check whether the right hand side is the empty string (i.e. if |
505 // this is really a flat string in a cons string). If that is not | 505 // this is really a flat string in a cons string). If that is not |
506 // the case we would rather go to the runtime system now to flatten | 506 // the case we would rather go to the runtime system now to flatten |
507 // the string. | 507 // the string. |
508 __ bind(&cons_string); | 508 __ bind(&cons_string); |
509 __ CompareRoot(FieldOperand(string, ConsString::kSecondOffset), | 509 __ CompareRoot(FieldOperand(string, ConsString::kSecondOffset), |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 // argument_count_reg_ * times_pointer_size + (receiver - 1) * kPointerSize. | 710 // argument_count_reg_ * times_pointer_size + (receiver - 1) * kPointerSize. |
711 return Operand(base_reg_, argument_count_reg_, times_pointer_size, | 711 return Operand(base_reg_, argument_count_reg_, times_pointer_size, |
712 displacement_to_last_argument + (receiver - 1 - index) * kPointerSize); | 712 displacement_to_last_argument + (receiver - 1 - index) * kPointerSize); |
713 } | 713 } |
714 } | 714 } |
715 | 715 |
716 | 716 |
717 } } // namespace v8::internal | 717 } } // namespace v8::internal |
718 | 718 |
719 #endif // V8_TARGET_ARCH_X64 | 719 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |