| 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 3455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3466 __ ldr(result, FieldMemOperand(string, HeapObject::kMapOffset)); | 3466 __ ldr(result, FieldMemOperand(string, HeapObject::kMapOffset)); |
| 3467 __ ldrb(result, FieldMemOperand(result, Map::kInstanceTypeOffset)); | 3467 __ ldrb(result, FieldMemOperand(result, Map::kInstanceTypeOffset)); |
| 3468 | 3468 |
| 3469 // We need special handling for indirect strings. | 3469 // We need special handling for indirect strings. |
| 3470 Label check_sequential; | 3470 Label check_sequential; |
| 3471 __ tst(result, Operand(kIsIndirectStringMask)); | 3471 __ tst(result, Operand(kIsIndirectStringMask)); |
| 3472 __ b(eq, &check_sequential); | 3472 __ b(eq, &check_sequential); |
| 3473 | 3473 |
| 3474 // Dispatch on the indirect string shape: slice or cons. | 3474 // Dispatch on the indirect string shape: slice or cons. |
| 3475 Label cons_string; | 3475 Label cons_string; |
| 3476 const uint32_t kSlicedNotConsMask = kSlicedStringTag & ~kConsStringTag; | |
| 3477 ASSERT(IsPowerOf2(kSlicedNotConsMask) && kSlicedNotConsMask != 0); | |
| 3478 __ tst(result, Operand(kSlicedNotConsMask)); | 3476 __ tst(result, Operand(kSlicedNotConsMask)); |
| 3479 __ b(eq, &cons_string); | 3477 __ b(eq, &cons_string); |
| 3480 | 3478 |
| 3481 // Handle slices. | 3479 // Handle slices. |
| 3482 Label indirect_string_loaded; | 3480 Label indirect_string_loaded; |
| 3483 __ ldr(result, FieldMemOperand(string, SlicedString::kOffsetOffset)); | 3481 __ ldr(result, FieldMemOperand(string, SlicedString::kOffsetOffset)); |
| 3484 __ add(index, index, Operand(result, ASR, kSmiTagSize)); | 3482 __ add(index, index, Operand(result, ASR, kSmiTagSize)); |
| 3485 __ ldr(string, FieldMemOperand(string, SlicedString::kParentOffset)); | 3483 __ ldr(string, FieldMemOperand(string, SlicedString::kParentOffset)); |
| 3486 __ jmp(&indirect_string_loaded); | 3484 __ jmp(&indirect_string_loaded); |
| 3487 | 3485 |
| (...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4510 ASSERT(osr_pc_offset_ == -1); | 4508 ASSERT(osr_pc_offset_ == -1); |
| 4511 osr_pc_offset_ = masm()->pc_offset(); | 4509 osr_pc_offset_ = masm()->pc_offset(); |
| 4512 } | 4510 } |
| 4513 | 4511 |
| 4514 | 4512 |
| 4515 | 4513 |
| 4516 | 4514 |
| 4517 #undef __ | 4515 #undef __ |
| 4518 | 4516 |
| 4519 } } // namespace v8::internal | 4517 } } // namespace v8::internal |
| OLD | NEW |