Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/ia32/macro-assembler-ia32.cc

Issue 12314155: Allow direct allocation in old pointer space. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 // Get the value at the masked, scaled index. 1207 // Get the value at the masked, scaled index.
1208 const int kValueOffset = 1208 const int kValueOffset =
1209 SeededNumberDictionary::kElementsStartOffset + kPointerSize; 1209 SeededNumberDictionary::kElementsStartOffset + kPointerSize;
1210 mov(result, FieldOperand(elements, r2, times_pointer_size, kValueOffset)); 1210 mov(result, FieldOperand(elements, r2, times_pointer_size, kValueOffset));
1211 } 1211 }
1212 1212
1213 1213
1214 void MacroAssembler::LoadAllocationTopHelper(Register result, 1214 void MacroAssembler::LoadAllocationTopHelper(Register result,
1215 Register scratch, 1215 Register scratch,
1216 AllocationFlags flags) { 1216 AllocationFlags flags) {
1217 ExternalReference new_space_allocation_top = 1217 ExternalReference allocation_top = ((flags & PRETENURE) != 0) ?
danno 2013/03/12 11:28:20 Does it make sense to create two utility functions
Hannes Payer (out of office) 2013/03/12 12:37:27 Done.
1218 ExternalReference::old_pointer_space_allocation_top_address(isolate()) :
1218 ExternalReference::new_space_allocation_top_address(isolate()); 1219 ExternalReference::new_space_allocation_top_address(isolate());
1219 1220
1220 // Just return if allocation top is already known. 1221 // Just return if allocation top is already known.
1221 if ((flags & RESULT_CONTAINS_TOP) != 0) { 1222 if ((flags & RESULT_CONTAINS_TOP) != 0) {
1222 // No use of scratch if allocation top is provided. 1223 // No use of scratch if allocation top is provided.
1223 ASSERT(scratch.is(no_reg)); 1224 ASSERT(scratch.is(no_reg));
1224 #ifdef DEBUG 1225 #ifdef DEBUG
1225 // Assert that result actually contains top on entry. 1226 // Assert that result actually contains top on entry.
1226 cmp(result, Operand::StaticVariable(new_space_allocation_top)); 1227 cmp(result, Operand::StaticVariable(allocation_top));
1227 Check(equal, "Unexpected allocation top"); 1228 Check(equal, "Unexpected allocation top");
1228 #endif 1229 #endif
1229 return; 1230 return;
1230 } 1231 }
1231 1232
1232 // Move address of new object to result. Use scratch register if available. 1233 // Move address of new object to result. Use scratch register if available.
1233 if (scratch.is(no_reg)) { 1234 if (scratch.is(no_reg)) {
1234 mov(result, Operand::StaticVariable(new_space_allocation_top)); 1235 mov(result, Operand::StaticVariable(allocation_top));
1235 } else { 1236 } else {
1236 mov(scratch, Immediate(new_space_allocation_top)); 1237 mov(scratch, Immediate(allocation_top));
1237 mov(result, Operand(scratch, 0)); 1238 mov(result, Operand(scratch, 0));
1238 } 1239 }
1239 } 1240 }
1240 1241
1241 1242
1242 void MacroAssembler::UpdateAllocationTopHelper(Register result_end, 1243 void MacroAssembler::UpdateAllocationTopHelper(Register result_end,
1243 Register scratch) { 1244 Register scratch,
1245 AllocationFlags flags) {
1244 if (emit_debug_code()) { 1246 if (emit_debug_code()) {
1245 test(result_end, Immediate(kObjectAlignmentMask)); 1247 test(result_end, Immediate(kObjectAlignmentMask));
1246 Check(zero, "Unaligned allocation in new space"); 1248 Check(zero, "Unaligned allocation in new space");
1247 } 1249 }
1248 1250
1249 ExternalReference new_space_allocation_top = 1251 ExternalReference allocation_top = ((flags & PRETENURE) != 0) ?
1252 ExternalReference::old_pointer_space_allocation_top_address(isolate()) :
1250 ExternalReference::new_space_allocation_top_address(isolate()); 1253 ExternalReference::new_space_allocation_top_address(isolate());
1251 1254
1252 // Update new top. Use scratch if available. 1255 // Update new top. Use scratch if available.
1253 if (scratch.is(no_reg)) { 1256 if (scratch.is(no_reg)) {
1254 mov(Operand::StaticVariable(new_space_allocation_top), result_end); 1257 mov(Operand::StaticVariable(allocation_top), result_end);
1255 } else { 1258 } else {
1256 mov(Operand(scratch, 0), result_end); 1259 mov(Operand(scratch, 0), result_end);
1257 } 1260 }
1258 } 1261 }
1259 1262
1260 1263
1261 void MacroAssembler::AllocateInNewSpace(int object_size, 1264 void MacroAssembler::Allocate(int object_size,
1262 Register result, 1265 Register result,
1263 Register result_end, 1266 Register result_end,
1264 Register scratch, 1267 Register scratch,
1265 Label* gc_required, 1268 Label* gc_required,
1266 AllocationFlags flags) { 1269 AllocationFlags flags) {
1267 ASSERT((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0); 1270 ASSERT((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0);
1268 if (!FLAG_inline_new) { 1271 if (!FLAG_inline_new) {
1269 if (emit_debug_code()) { 1272 if (emit_debug_code()) {
1270 // Trash the registers to simulate an allocation failure. 1273 // Trash the registers to simulate an allocation failure.
1271 mov(result, Immediate(0x7091)); 1274 mov(result, Immediate(0x7091));
1272 if (result_end.is_valid()) { 1275 if (result_end.is_valid()) {
1273 mov(result_end, Immediate(0x7191)); 1276 mov(result_end, Immediate(0x7191));
1274 } 1277 }
1275 if (scratch.is_valid()) { 1278 if (scratch.is_valid()) {
1276 mov(scratch, Immediate(0x7291)); 1279 mov(scratch, Immediate(0x7291));
1277 } 1280 }
1278 } 1281 }
1279 jmp(gc_required); 1282 jmp(gc_required);
1280 return; 1283 return;
1281 } 1284 }
1282 ASSERT(!result.is(result_end)); 1285 ASSERT(!result.is(result_end));
1283 1286
1284 // Load address of new object into result. 1287 // Load address of new object into result.
1285 LoadAllocationTopHelper(result, scratch, flags); 1288 LoadAllocationTopHelper(result, scratch, flags);
1286 1289
1287 // Align the next allocation. Storing the filler map without checking top is 1290 // Align the next allocation. Storing the filler map without checking top is
1288 // always safe because the limit of the heap is always aligned. 1291 // always safe because the limit of the heap is always aligned.
1289 if ((flags & DOUBLE_ALIGNMENT) != 0) { 1292 if (((flags & PRETENURE) == 0) && ((flags & DOUBLE_ALIGNMENT) != 0)) {
1290 ASSERT(kPointerAlignment * 2 == kDoubleAlignment); 1293 ASSERT(kPointerAlignment * 2 == kDoubleAlignment);
1291 Label aligned; 1294 Label aligned;
1292 test(result, Immediate(kDoubleAlignmentMask)); 1295 test(result, Immediate(kDoubleAlignmentMask));
1293 j(zero, &aligned, Label::kNear); 1296 j(zero, &aligned, Label::kNear);
1294 mov(Operand(result, 0), 1297 mov(Operand(result, 0),
1295 Immediate(isolate()->factory()->one_pointer_filler_map())); 1298 Immediate(isolate()->factory()->one_pointer_filler_map()));
1296 add(result, Immediate(kDoubleSize / 2)); 1299 add(result, Immediate(kDoubleSize / 2));
1297 bind(&aligned); 1300 bind(&aligned);
1298 } 1301 }
1299 1302
1300 Register top_reg = result_end.is_valid() ? result_end : result; 1303 Register top_reg = result_end.is_valid() ? result_end : result;
1301 1304
1302 // Calculate new top and bail out if new space is exhausted. 1305 // Calculate new top and bail out if space is exhausted.
1303 ExternalReference new_space_allocation_limit = 1306 ExternalReference allocation_limit = ((flags & PRETENURE) != 0) ?
1307 ExternalReference::old_pointer_space_allocation_limit_address(
1308 isolate()) :
1304 ExternalReference::new_space_allocation_limit_address(isolate()); 1309 ExternalReference::new_space_allocation_limit_address(isolate());
1305 1310
1306 if (!top_reg.is(result)) { 1311 if (!top_reg.is(result)) {
1307 mov(top_reg, result); 1312 mov(top_reg, result);
1308 } 1313 }
1309 add(top_reg, Immediate(object_size)); 1314 add(top_reg, Immediate(object_size));
1310 j(carry, gc_required); 1315 j(carry, gc_required);
1311 cmp(top_reg, Operand::StaticVariable(new_space_allocation_limit)); 1316 cmp(top_reg, Operand::StaticVariable(allocation_limit));
1312 j(above, gc_required); 1317 j(above, gc_required);
1313 1318
1314 // Update allocation top. 1319 // Update allocation top.
1315 UpdateAllocationTopHelper(top_reg, scratch); 1320 UpdateAllocationTopHelper(top_reg, scratch, flags);
1316 1321
1317 // Tag result if requested. 1322 // Tag result if requested.
1318 bool tag_result = (flags & TAG_OBJECT) != 0; 1323 bool tag_result = (flags & TAG_OBJECT) != 0;
1319 if (top_reg.is(result)) { 1324 if (top_reg.is(result)) {
1320 if (tag_result) { 1325 if (tag_result) {
1321 sub(result, Immediate(object_size - kHeapObjectTag)); 1326 sub(result, Immediate(object_size - kHeapObjectTag));
1322 } else { 1327 } else {
1323 sub(result, Immediate(object_size)); 1328 sub(result, Immediate(object_size));
1324 } 1329 }
1325 } else if (tag_result) { 1330 } else if (tag_result) {
1326 ASSERT(kHeapObjectTag == 1); 1331 ASSERT(kHeapObjectTag == 1);
1327 inc(result); 1332 inc(result);
1328 } 1333 }
1329 } 1334 }
1330 1335
1331 1336
1332 void MacroAssembler::AllocateInNewSpace( 1337 void MacroAssembler::AllocateInNewSpace(
1333 int header_size, 1338 int header_size,
1334 ScaleFactor element_size, 1339 ScaleFactor element_size,
1335 Register element_count, 1340 Register element_count,
1336 RegisterValueType element_count_type, 1341 RegisterValueType element_count_type,
1337 Register result, 1342 Register result,
1338 Register result_end, 1343 Register result_end,
1339 Register scratch, 1344 Register scratch,
1340 Label* gc_required, 1345 Label* gc_required,
1341 AllocationFlags flags) { 1346 AllocationFlags flags) {
1342 ASSERT((flags & SIZE_IN_WORDS) == 0); 1347 ASSERT((flags & SIZE_IN_WORDS) == 0);
1348 ASSERT((flags & PRETENURE) == 0);
1343 if (!FLAG_inline_new) { 1349 if (!FLAG_inline_new) {
1344 if (emit_debug_code()) { 1350 if (emit_debug_code()) {
1345 // Trash the registers to simulate an allocation failure. 1351 // Trash the registers to simulate an allocation failure.
1346 mov(result, Immediate(0x7091)); 1352 mov(result, Immediate(0x7091));
1347 mov(result_end, Immediate(0x7191)); 1353 mov(result_end, Immediate(0x7191));
1348 if (scratch.is_valid()) { 1354 if (scratch.is_valid()) {
1349 mov(scratch, Immediate(0x7291)); 1355 mov(scratch, Immediate(0x7291));
1350 } 1356 }
1351 // Register element_count is not modified by the function. 1357 // Register element_count is not modified by the function.
1352 } 1358 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 j(carry, gc_required); 1398 j(carry, gc_required);
1393 cmp(result_end, Operand::StaticVariable(new_space_allocation_limit)); 1399 cmp(result_end, Operand::StaticVariable(new_space_allocation_limit));
1394 j(above, gc_required); 1400 j(above, gc_required);
1395 1401
1396 if ((flags & TAG_OBJECT) != 0) { 1402 if ((flags & TAG_OBJECT) != 0) {
1397 ASSERT(kHeapObjectTag == 1); 1403 ASSERT(kHeapObjectTag == 1);
1398 inc(result); 1404 inc(result);
1399 } 1405 }
1400 1406
1401 // Update allocation top. 1407 // Update allocation top.
1402 UpdateAllocationTopHelper(result_end, scratch); 1408 UpdateAllocationTopHelper(result_end, scratch, flags);
1403 } 1409 }
1404 1410
1405 1411
1406 void MacroAssembler::AllocateInNewSpace(Register object_size, 1412 void MacroAssembler::AllocateInNewSpace(Register object_size,
1407 Register result, 1413 Register result,
1408 Register result_end, 1414 Register result_end,
1409 Register scratch, 1415 Register scratch,
1410 Label* gc_required, 1416 Label* gc_required,
1411 AllocationFlags flags) { 1417 AllocationFlags flags) {
1412 ASSERT((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0); 1418 ASSERT((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0);
1419 ASSERT((flags & PRETENURE) == 0);
1413 if (!FLAG_inline_new) { 1420 if (!FLAG_inline_new) {
1414 if (emit_debug_code()) { 1421 if (emit_debug_code()) {
1415 // Trash the registers to simulate an allocation failure. 1422 // Trash the registers to simulate an allocation failure.
1416 mov(result, Immediate(0x7091)); 1423 mov(result, Immediate(0x7091));
1417 mov(result_end, Immediate(0x7191)); 1424 mov(result_end, Immediate(0x7191));
1418 if (scratch.is_valid()) { 1425 if (scratch.is_valid()) {
1419 mov(scratch, Immediate(0x7291)); 1426 mov(scratch, Immediate(0x7291));
1420 } 1427 }
1421 // object_size is left unchanged by this function. 1428 // object_size is left unchanged by this function.
1422 } 1429 }
(...skipping 29 matching lines...) Expand all
1452 cmp(result_end, Operand::StaticVariable(new_space_allocation_limit)); 1459 cmp(result_end, Operand::StaticVariable(new_space_allocation_limit));
1453 j(above, gc_required); 1460 j(above, gc_required);
1454 1461
1455 // Tag result if requested. 1462 // Tag result if requested.
1456 if ((flags & TAG_OBJECT) != 0) { 1463 if ((flags & TAG_OBJECT) != 0) {
1457 ASSERT(kHeapObjectTag == 1); 1464 ASSERT(kHeapObjectTag == 1);
1458 inc(result); 1465 inc(result);
1459 } 1466 }
1460 1467
1461 // Update allocation top. 1468 // Update allocation top.
1462 UpdateAllocationTopHelper(result_end, scratch); 1469 UpdateAllocationTopHelper(result_end, scratch, flags);
1463 } 1470 }
1464 1471
1465 1472
1466 void MacroAssembler::UndoAllocationInNewSpace(Register object) { 1473 void MacroAssembler::UndoAllocationInNewSpace(Register object) {
1467 ExternalReference new_space_allocation_top = 1474 ExternalReference new_space_allocation_top =
1468 ExternalReference::new_space_allocation_top_address(isolate()); 1475 ExternalReference::new_space_allocation_top_address(isolate());
1469 1476
1470 // Make sure the object has no tag before resetting top. 1477 // Make sure the object has no tag before resetting top.
1471 and_(object, Immediate(~kHeapObjectTagMask)); 1478 and_(object, Immediate(~kHeapObjectTagMask));
1472 #ifdef DEBUG 1479 #ifdef DEBUG
1473 cmp(object, Operand::StaticVariable(new_space_allocation_top)); 1480 cmp(object, Operand::StaticVariable(new_space_allocation_top));
1474 Check(below, "Undo allocation of non allocated memory"); 1481 Check(below, "Undo allocation of non allocated memory");
1475 #endif 1482 #endif
1476 mov(Operand::StaticVariable(new_space_allocation_top), object); 1483 mov(Operand::StaticVariable(new_space_allocation_top), object);
1477 } 1484 }
1478 1485
1479 1486
1480 void MacroAssembler::AllocateHeapNumber(Register result, 1487 void MacroAssembler::AllocateHeapNumber(Register result,
1481 Register scratch1, 1488 Register scratch1,
1482 Register scratch2, 1489 Register scratch2,
1483 Label* gc_required) { 1490 Label* gc_required) {
1484 // Allocate heap number in new space. 1491 // Allocate heap number in new space.
1485 AllocateInNewSpace(HeapNumber::kSize, 1492 Allocate(HeapNumber::kSize, result, scratch1, scratch2, gc_required,
1486 result, 1493 TAG_OBJECT);
1487 scratch1,
1488 scratch2,
1489 gc_required,
1490 TAG_OBJECT);
1491 1494
1492 // Set the map. 1495 // Set the map.
1493 mov(FieldOperand(result, HeapObject::kMapOffset), 1496 mov(FieldOperand(result, HeapObject::kMapOffset),
1494 Immediate(isolate()->factory()->heap_number_map())); 1497 Immediate(isolate()->factory()->heap_number_map()));
1495 } 1498 }
1496 1499
1497 1500
1498 void MacroAssembler::AllocateTwoByteString(Register result, 1501 void MacroAssembler::AllocateTwoByteString(Register result,
1499 Register length, 1502 Register length,
1500 Register scratch1, 1503 Register scratch1,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
1568 1571
1569 1572
1570 void MacroAssembler::AllocateAsciiString(Register result, 1573 void MacroAssembler::AllocateAsciiString(Register result,
1571 int length, 1574 int length,
1572 Register scratch1, 1575 Register scratch1,
1573 Register scratch2, 1576 Register scratch2,
1574 Label* gc_required) { 1577 Label* gc_required) {
1575 ASSERT(length > 0); 1578 ASSERT(length > 0);
1576 1579
1577 // Allocate ASCII string in new space. 1580 // Allocate ASCII string in new space.
1578 AllocateInNewSpace(SeqOneByteString::SizeFor(length), 1581 Allocate(SeqOneByteString::SizeFor(length), result, scratch1, scratch2,
1579 result, 1582 gc_required, TAG_OBJECT);
1580 scratch1,
1581 scratch2,
1582 gc_required,
1583 TAG_OBJECT);
1584 1583
1585 // Set the map, length and hash field. 1584 // Set the map, length and hash field.
1586 mov(FieldOperand(result, HeapObject::kMapOffset), 1585 mov(FieldOperand(result, HeapObject::kMapOffset),
1587 Immediate(isolate()->factory()->ascii_string_map())); 1586 Immediate(isolate()->factory()->ascii_string_map()));
1588 mov(FieldOperand(result, String::kLengthOffset), 1587 mov(FieldOperand(result, String::kLengthOffset),
1589 Immediate(Smi::FromInt(length))); 1588 Immediate(Smi::FromInt(length)));
1590 mov(FieldOperand(result, String::kHashFieldOffset), 1589 mov(FieldOperand(result, String::kHashFieldOffset),
1591 Immediate(String::kEmptyHashField)); 1590 Immediate(String::kEmptyHashField));
1592 } 1591 }
1593 1592
1594 1593
1595 void MacroAssembler::AllocateTwoByteConsString(Register result, 1594 void MacroAssembler::AllocateTwoByteConsString(Register result,
1596 Register scratch1, 1595 Register scratch1,
1597 Register scratch2, 1596 Register scratch2,
1598 Label* gc_required) { 1597 Label* gc_required) {
1599 // Allocate heap number in new space. 1598 // Allocate heap number in new space.
1600 AllocateInNewSpace(ConsString::kSize, 1599 Allocate(ConsString::kSize, result, scratch1, scratch2, gc_required,
1601 result, 1600 TAG_OBJECT);
1602 scratch1,
1603 scratch2,
1604 gc_required,
1605 TAG_OBJECT);
1606 1601
1607 // Set the map. The other fields are left uninitialized. 1602 // Set the map. The other fields are left uninitialized.
1608 mov(FieldOperand(result, HeapObject::kMapOffset), 1603 mov(FieldOperand(result, HeapObject::kMapOffset),
1609 Immediate(isolate()->factory()->cons_string_map())); 1604 Immediate(isolate()->factory()->cons_string_map()));
1610 } 1605 }
1611 1606
1612 1607
1613 void MacroAssembler::AllocateAsciiConsString(Register result, 1608 void MacroAssembler::AllocateAsciiConsString(Register result,
1614 Register scratch1, 1609 Register scratch1,
1615 Register scratch2, 1610 Register scratch2,
1616 Label* gc_required) { 1611 Label* gc_required) {
1617 // Allocate heap number in new space. 1612 // Allocate heap number in new space.
1618 AllocateInNewSpace(ConsString::kSize, 1613 Allocate(ConsString::kSize, result, scratch1, scratch2, gc_required,
1619 result, 1614 TAG_OBJECT);
1620 scratch1,
1621 scratch2,
1622 gc_required,
1623 TAG_OBJECT);
1624 1615
1625 // Set the map. The other fields are left uninitialized. 1616 // Set the map. The other fields are left uninitialized.
1626 mov(FieldOperand(result, HeapObject::kMapOffset), 1617 mov(FieldOperand(result, HeapObject::kMapOffset),
1627 Immediate(isolate()->factory()->cons_ascii_string_map())); 1618 Immediate(isolate()->factory()->cons_ascii_string_map()));
1628 } 1619 }
1629 1620
1630 1621
1631 void MacroAssembler::AllocateTwoByteSlicedString(Register result, 1622 void MacroAssembler::AllocateTwoByteSlicedString(Register result,
1632 Register scratch1, 1623 Register scratch1,
1633 Register scratch2, 1624 Register scratch2,
1634 Label* gc_required) { 1625 Label* gc_required) {
1635 // Allocate heap number in new space. 1626 // Allocate heap number in new space.
1636 AllocateInNewSpace(SlicedString::kSize, 1627 Allocate(SlicedString::kSize, result, scratch1, scratch2, gc_required,
1637 result, 1628 TAG_OBJECT);
1638 scratch1,
1639 scratch2,
1640 gc_required,
1641 TAG_OBJECT);
1642 1629
1643 // Set the map. The other fields are left uninitialized. 1630 // Set the map. The other fields are left uninitialized.
1644 mov(FieldOperand(result, HeapObject::kMapOffset), 1631 mov(FieldOperand(result, HeapObject::kMapOffset),
1645 Immediate(isolate()->factory()->sliced_string_map())); 1632 Immediate(isolate()->factory()->sliced_string_map()));
1646 } 1633 }
1647 1634
1648 1635
1649 void MacroAssembler::AllocateAsciiSlicedString(Register result, 1636 void MacroAssembler::AllocateAsciiSlicedString(Register result,
1650 Register scratch1, 1637 Register scratch1,
1651 Register scratch2, 1638 Register scratch2,
1652 Label* gc_required) { 1639 Label* gc_required) {
1653 // Allocate heap number in new space. 1640 // Allocate heap number in new space.
1654 AllocateInNewSpace(SlicedString::kSize, 1641 Allocate(SlicedString::kSize, result, scratch1, scratch2, gc_required,
1655 result, 1642 TAG_OBJECT);
1656 scratch1,
1657 scratch2,
1658 gc_required,
1659 TAG_OBJECT);
1660 1643
1661 // Set the map. The other fields are left uninitialized. 1644 // Set the map. The other fields are left uninitialized.
1662 mov(FieldOperand(result, HeapObject::kMapOffset), 1645 mov(FieldOperand(result, HeapObject::kMapOffset),
1663 Immediate(isolate()->factory()->sliced_ascii_string_map())); 1646 Immediate(isolate()->factory()->sliced_ascii_string_map()));
1664 } 1647 }
1665 1648
1666 1649
1667 // Copy memory, byte-by-byte, from source to destination. Not optimized for 1650 // Copy memory, byte-by-byte, from source to destination. Not optimized for
1668 // long or aligned copies. The contents of scratch and length are destroyed. 1651 // long or aligned copies. The contents of scratch and length are destroyed.
1669 // Source and destination are incremented by length. 1652 // Source and destination are incremented by length.
(...skipping 1445 matching lines...) Expand 10 before | Expand all | Expand 10 after
3115 j(greater, &no_info_available); 3098 j(greater, &no_info_available);
3116 cmp(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), 3099 cmp(MemOperand(scratch_reg, -AllocationSiteInfo::kSize),
3117 Immediate(Handle<Map>(isolate()->heap()->allocation_site_info_map()))); 3100 Immediate(Handle<Map>(isolate()->heap()->allocation_site_info_map())));
3118 bind(&no_info_available); 3101 bind(&no_info_available);
3119 } 3102 }
3120 3103
3121 3104
3122 } } // namespace v8::internal 3105 } } // namespace v8::internal
3123 3106
3124 #endif // V8_TARGET_ARCH_IA32 3107 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698