| 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 3199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3210 __ movq(result, FieldOperand(string, HeapObject::kMapOffset)); | 3210 __ movq(result, FieldOperand(string, HeapObject::kMapOffset)); |
| 3211 __ movzxbl(result, FieldOperand(result, Map::kInstanceTypeOffset)); | 3211 __ movzxbl(result, FieldOperand(result, Map::kInstanceTypeOffset)); |
| 3212 | 3212 |
| 3213 // We need special handling for indirect strings. | 3213 // We need special handling for indirect strings. |
| 3214 Label check_sequential; | 3214 Label check_sequential; |
| 3215 __ testb(result, Immediate(kIsIndirectStringMask)); | 3215 __ testb(result, Immediate(kIsIndirectStringMask)); |
| 3216 __ j(zero, &check_sequential, Label::kNear); | 3216 __ j(zero, &check_sequential, Label::kNear); |
| 3217 | 3217 |
| 3218 // Dispatch on the indirect string shape: slice or cons. | 3218 // Dispatch on the indirect string shape: slice or cons. |
| 3219 Label cons_string; | 3219 Label cons_string; |
| 3220 const uint32_t kSlicedNotConsMask = kSlicedStringTag & ~kConsStringTag; | |
| 3221 ASSERT(IsPowerOf2(kSlicedNotConsMask) && kSlicedNotConsMask != 0); | |
| 3222 __ testb(result, Immediate(kSlicedNotConsMask)); | 3220 __ testb(result, Immediate(kSlicedNotConsMask)); |
| 3223 __ j(zero, &cons_string, Label::kNear); | 3221 __ j(zero, &cons_string, Label::kNear); |
| 3224 | 3222 |
| 3225 // Handle slices. | 3223 // Handle slices. |
| 3226 Label indirect_string_loaded; | 3224 Label indirect_string_loaded; |
| 3227 __ SmiToInteger32(result, FieldOperand(string, SlicedString::kOffsetOffset)); | 3225 __ SmiToInteger32(result, FieldOperand(string, SlicedString::kOffsetOffset)); |
| 3228 __ addq(index, result); | 3226 __ addq(index, result); |
| 3229 __ movq(string, FieldOperand(string, SlicedString::kParentOffset)); | 3227 __ movq(string, FieldOperand(string, SlicedString::kParentOffset)); |
| 3230 __ jmp(&indirect_string_loaded, Label::kNear); | 3228 __ jmp(&indirect_string_loaded, Label::kNear); |
| 3231 | 3229 |
| (...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4148 RegisterEnvironmentForDeoptimization(environment); | 4146 RegisterEnvironmentForDeoptimization(environment); |
| 4149 ASSERT(osr_pc_offset_ == -1); | 4147 ASSERT(osr_pc_offset_ == -1); |
| 4150 osr_pc_offset_ = masm()->pc_offset(); | 4148 osr_pc_offset_ = masm()->pc_offset(); |
| 4151 } | 4149 } |
| 4152 | 4150 |
| 4153 #undef __ | 4151 #undef __ |
| 4154 | 4152 |
| 4155 } } // namespace v8::internal | 4153 } } // namespace v8::internal |
| 4156 | 4154 |
| 4157 #endif // V8_TARGET_ARCH_X64 | 4155 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |