| 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 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1165 // Set the map, length and hash field. | 1165 // Set the map, length and hash field. |
| 1166 mov(FieldOperand(result, HeapObject::kMapOffset), | 1166 mov(FieldOperand(result, HeapObject::kMapOffset), |
| 1167 Immediate(isolate()->factory()->ascii_string_map())); | 1167 Immediate(isolate()->factory()->ascii_string_map())); |
| 1168 mov(FieldOperand(result, String::kLengthOffset), | 1168 mov(FieldOperand(result, String::kLengthOffset), |
| 1169 Immediate(Smi::FromInt(length))); | 1169 Immediate(Smi::FromInt(length))); |
| 1170 mov(FieldOperand(result, String::kHashFieldOffset), | 1170 mov(FieldOperand(result, String::kHashFieldOffset), |
| 1171 Immediate(String::kEmptyHashField)); | 1171 Immediate(String::kEmptyHashField)); |
| 1172 } | 1172 } |
| 1173 | 1173 |
| 1174 | 1174 |
| 1175 void MacroAssembler::AllocateConsString(Register result, | 1175 void MacroAssembler::AllocateTwoByteConsString(Register result, |
| 1176 Register scratch1, | 1176 Register scratch1, |
| 1177 Register scratch2, | 1177 Register scratch2, |
| 1178 Label* gc_required) { | 1178 Label* gc_required) { |
| 1179 // Allocate heap number in new space. | 1179 // Allocate heap number in new space. |
| 1180 AllocateInNewSpace(ConsString::kSize, | 1180 AllocateInNewSpace(ConsString::kSize, |
| 1181 result, | 1181 result, |
| 1182 scratch1, | 1182 scratch1, |
| 1183 scratch2, | 1183 scratch2, |
| 1184 gc_required, | 1184 gc_required, |
| 1185 TAG_OBJECT); | 1185 TAG_OBJECT); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1201 scratch2, | 1201 scratch2, |
| 1202 gc_required, | 1202 gc_required, |
| 1203 TAG_OBJECT); | 1203 TAG_OBJECT); |
| 1204 | 1204 |
| 1205 // Set the map. The other fields are left uninitialized. | 1205 // Set the map. The other fields are left uninitialized. |
| 1206 mov(FieldOperand(result, HeapObject::kMapOffset), | 1206 mov(FieldOperand(result, HeapObject::kMapOffset), |
| 1207 Immediate(isolate()->factory()->cons_ascii_string_map())); | 1207 Immediate(isolate()->factory()->cons_ascii_string_map())); |
| 1208 } | 1208 } |
| 1209 | 1209 |
| 1210 | 1210 |
| 1211 void MacroAssembler::AllocateSlicedString(Register result, | 1211 void MacroAssembler::AllocateTwoByteSlicedString(Register result, |
| 1212 Register scratch1, | 1212 Register scratch1, |
| 1213 Register scratch2, | 1213 Register scratch2, |
| 1214 Label* gc_required) { | 1214 Label* gc_required) { |
| 1215 // Allocate heap number in new space. | 1215 // Allocate heap number in new space. |
| 1216 AllocateInNewSpace(SlicedString::kSize, | 1216 AllocateInNewSpace(SlicedString::kSize, |
| 1217 result, | 1217 result, |
| 1218 scratch1, | 1218 scratch1, |
| 1219 scratch2, | 1219 scratch2, |
| 1220 gc_required, | 1220 gc_required, |
| 1221 TAG_OBJECT); | 1221 TAG_OBJECT); |
| (...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2284 | 2284 |
| 2285 // Check that the code was patched as expected. | 2285 // Check that the code was patched as expected. |
| 2286 ASSERT(masm_.pc_ == address_ + size_); | 2286 ASSERT(masm_.pc_ == address_ + size_); |
| 2287 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2287 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 2288 } | 2288 } |
| 2289 | 2289 |
| 2290 | 2290 |
| 2291 } } // namespace v8::internal | 2291 } } // namespace v8::internal |
| 2292 | 2292 |
| 2293 #endif // V8_TARGET_ARCH_IA32 | 2293 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |