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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 __ Addu(index, index, at); | 468 __ Addu(index, index, at); |
469 __ jmp(&indirect_string_loaded); | 469 __ jmp(&indirect_string_loaded); |
470 | 470 |
471 // Handle cons strings. | 471 // Handle cons strings. |
472 // Check whether the right hand side is the empty string (i.e. if | 472 // Check whether the right hand side is the empty string (i.e. if |
473 // this is really a flat string in a cons string). If that is not | 473 // this is really a flat string in a cons string). If that is not |
474 // the case we would rather go to the runtime system now to flatten | 474 // the case we would rather go to the runtime system now to flatten |
475 // the string. | 475 // the string. |
476 __ bind(&cons_string); | 476 __ bind(&cons_string); |
477 __ lw(result, FieldMemOperand(string, ConsString::kSecondOffset)); | 477 __ lw(result, FieldMemOperand(string, ConsString::kSecondOffset)); |
478 __ LoadRoot(at, Heap::kEmptyStringRootIndex); | 478 __ LoadRoot(at, Heap::kempty_stringRootIndex); |
479 __ Branch(call_runtime, ne, result, Operand(at)); | 479 __ Branch(call_runtime, ne, result, Operand(at)); |
480 // Get the first of the two strings and load its instance type. | 480 // Get the first of the two strings and load its instance type. |
481 __ lw(string, FieldMemOperand(string, ConsString::kFirstOffset)); | 481 __ lw(string, FieldMemOperand(string, ConsString::kFirstOffset)); |
482 | 482 |
483 __ bind(&indirect_string_loaded); | 483 __ bind(&indirect_string_loaded); |
484 __ lw(result, FieldMemOperand(string, HeapObject::kMapOffset)); | 484 __ lw(result, FieldMemOperand(string, HeapObject::kMapOffset)); |
485 __ lbu(result, FieldMemOperand(result, Map::kInstanceTypeOffset)); | 485 __ lbu(result, FieldMemOperand(result, Map::kInstanceTypeOffset)); |
486 | 486 |
487 // Distinguish sequential and external strings. Only these two string | 487 // Distinguish sequential and external strings. Only these two string |
488 // representations can reach here (slices and flat cons strings have been | 488 // representations can reach here (slices and flat cons strings have been |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 patcher.masm()->dd(reinterpret_cast<uint32_t>(stub->instruction_start())); | 720 patcher.masm()->dd(reinterpret_cast<uint32_t>(stub->instruction_start())); |
721 } | 721 } |
722 } | 722 } |
723 | 723 |
724 | 724 |
725 #undef __ | 725 #undef __ |
726 | 726 |
727 } } // namespace v8::internal | 727 } } // namespace v8::internal |
728 | 728 |
729 #endif // V8_TARGET_ARCH_MIPS | 729 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |