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 4066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4077 // ConsString. | 4077 // ConsString. |
4078 // Check whether the right hand side is the empty string (i.e. if | 4078 // Check whether the right hand side is the empty string (i.e. if |
4079 // this is really a flat string in a cons string). If that is not | 4079 // this is really a flat string in a cons string). If that is not |
4080 // the case we would rather go to the runtime system now to flatten | 4080 // the case we would rather go to the runtime system now to flatten |
4081 // the string. | 4081 // the string. |
4082 Label assure_seq_string; | 4082 Label assure_seq_string; |
4083 __ CompareRoot(FieldOperand(object_, ConsString::kSecondOffset), | 4083 __ CompareRoot(FieldOperand(object_, ConsString::kSecondOffset), |
4084 Heap::kEmptyStringRootIndex); | 4084 Heap::kEmptyStringRootIndex); |
4085 __ j(not_equal, &call_runtime_); | 4085 __ j(not_equal, &call_runtime_); |
4086 // Get the first of the two strings and load its instance type. | 4086 // Get the first of the two strings and load its instance type. |
4087 ASSERT(kScratchRegister != scratch_); | 4087 ASSERT(!kScratchRegister.is(scratch_)); |
4088 __ movq(kScratchRegister, FieldOperand(object_, ConsString::kFirstOffset)); | 4088 __ movq(kScratchRegister, FieldOperand(object_, ConsString::kFirstOffset)); |
4089 __ jmp(&assure_seq_string, Label::kNear); | 4089 __ jmp(&assure_seq_string, Label::kNear); |
4090 | 4090 |
4091 // SlicedString, unpack and add offset. | 4091 // SlicedString, unpack and add offset. |
4092 __ bind(&sliced_string); | 4092 __ bind(&sliced_string); |
4093 __ addq(scratch_, FieldOperand(object_, SlicedString::kOffsetOffset)); | 4093 __ addq(scratch_, FieldOperand(object_, SlicedString::kOffsetOffset)); |
4094 __ movq(kScratchRegister, FieldOperand(object_, SlicedString::kParentOffset)); | 4094 __ movq(kScratchRegister, FieldOperand(object_, SlicedString::kParentOffset)); |
4095 | 4095 |
4096 __ bind(&assure_seq_string); | 4096 __ bind(&assure_seq_string); |
4097 __ movq(result_, FieldOperand(kScratchRegister, HeapObject::kMapOffset)); | 4097 __ movq(result_, FieldOperand(kScratchRegister, HeapObject::kMapOffset)); |
(...skipping 1817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5915 | 5915 |
5916 // Fall through when we need to inform the incremental marker. | 5916 // Fall through when we need to inform the incremental marker. |
5917 } | 5917 } |
5918 | 5918 |
5919 | 5919 |
5920 #undef __ | 5920 #undef __ |
5921 | 5921 |
5922 } } // namespace v8::internal | 5922 } } // namespace v8::internal |
5923 | 5923 |
5924 #endif // V8_TARGET_ARCH_X64 | 5924 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |