| 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 4152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4163 jmp(&is_data_object, Label::kNear); | 4163 jmp(&is_data_object, Label::kNear); |
| 4164 | 4164 |
| 4165 bind(¬_external); | 4165 bind(¬_external); |
| 4166 // Sequential string, either ASCII or UC16. | 4166 // Sequential string, either ASCII or UC16. |
| 4167 ASSERT(kAsciiStringTag == 0x04); | 4167 ASSERT(kAsciiStringTag == 0x04); |
| 4168 and_(length, Immediate(kStringEncodingMask)); | 4168 and_(length, Immediate(kStringEncodingMask)); |
| 4169 xor_(length, Immediate(kStringEncodingMask)); | 4169 xor_(length, Immediate(kStringEncodingMask)); |
| 4170 addq(length, Immediate(0x04)); | 4170 addq(length, Immediate(0x04)); |
| 4171 // Value now either 4 (if ASCII) or 8 (if UC16), i.e. char-size shifted by 2. | 4171 // Value now either 4 (if ASCII) or 8 (if UC16), i.e. char-size shifted by 2. |
| 4172 imul(length, FieldOperand(value, String::kLengthOffset)); | 4172 imul(length, FieldOperand(value, String::kLengthOffset)); |
| 4173 shr(length, Immediate(2 + kSmiTagSize)); | 4173 shr(length, Immediate(2 + kSmiTagSize + kSmiShiftSize)); |
| 4174 addq(length, Immediate(SeqString::kHeaderSize + kObjectAlignmentMask)); | 4174 addq(length, Immediate(SeqString::kHeaderSize + kObjectAlignmentMask)); |
| 4175 and_(length, Immediate(~kObjectAlignmentMask)); | 4175 and_(length, Immediate(~kObjectAlignmentMask)); |
| 4176 | 4176 |
| 4177 bind(&is_data_object); | 4177 bind(&is_data_object); |
| 4178 // Value is a data object, and it is white. Mark it black. Since we know | 4178 // Value is a data object, and it is white. Mark it black. Since we know |
| 4179 // that the object is white we can make it black by flipping one bit. | 4179 // that the object is white we can make it black by flipping one bit. |
| 4180 or_(Operand(bitmap_scratch, MemoryChunk::kHeaderSize), mask_scratch); | 4180 or_(Operand(bitmap_scratch, MemoryChunk::kHeaderSize), mask_scratch); |
| 4181 | 4181 |
| 4182 and_(bitmap_scratch, Immediate(~Page::kPageAlignmentMask)); | 4182 and_(bitmap_scratch, Immediate(~Page::kPageAlignmentMask)); |
| 4183 addl(Operand(bitmap_scratch, MemoryChunk::kLiveBytesOffset), length); | 4183 addl(Operand(bitmap_scratch, MemoryChunk::kLiveBytesOffset), length); |
| 4184 | 4184 |
| 4185 bind(&done); | 4185 bind(&done); |
| 4186 } | 4186 } |
| 4187 | 4187 |
| 4188 } } // namespace v8::internal | 4188 } } // namespace v8::internal |
| 4189 | 4189 |
| 4190 #endif // V8_TARGET_ARCH_X64 | 4190 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |