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

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

Powered by Google App Engine
This is Rietveld 408576698