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

Side by Side Diff: src/hydrogen-instructions.cc

Issue 7112010: Plumbing changes to merge various element kind implementaions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review feedback Created 9 years, 6 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/hydrogen-instructions.h ('k') | src/ia32/lithium-codegen-ia32.h » ('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 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 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1344 stream->Add("["); 1344 stream->Add("[");
1345 key()->PrintNameTo(stream); 1345 key()->PrintNameTo(stream);
1346 stream->Add("]"); 1346 stream->Add("]");
1347 } 1347 }
1348 1348
1349 1349
1350 void HLoadKeyedSpecializedArrayElement::PrintDataTo( 1350 void HLoadKeyedSpecializedArrayElement::PrintDataTo(
1351 StringStream* stream) { 1351 StringStream* stream) {
1352 external_pointer()->PrintNameTo(stream); 1352 external_pointer()->PrintNameTo(stream);
1353 stream->Add("."); 1353 stream->Add(".");
1354 switch (array_type()) { 1354 switch (elements_kind()) {
1355 case kExternalByteArray: 1355 case JSObject::EXTERNAL_BYTE_ELEMENTS:
1356 stream->Add("byte"); 1356 stream->Add("byte");
1357 break; 1357 break;
1358 case kExternalUnsignedByteArray: 1358 case JSObject::EXTERNAL_UNSIGNED_BYTE_ELEMENTS:
1359 stream->Add("u_byte"); 1359 stream->Add("u_byte");
1360 break; 1360 break;
1361 case kExternalShortArray: 1361 case JSObject::EXTERNAL_SHORT_ELEMENTS:
1362 stream->Add("short"); 1362 stream->Add("short");
1363 break; 1363 break;
1364 case kExternalUnsignedShortArray: 1364 case JSObject::EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
1365 stream->Add("u_short"); 1365 stream->Add("u_short");
1366 break; 1366 break;
1367 case kExternalIntArray: 1367 case JSObject::EXTERNAL_INT_ELEMENTS:
1368 stream->Add("int"); 1368 stream->Add("int");
1369 break; 1369 break;
1370 case kExternalUnsignedIntArray: 1370 case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS:
1371 stream->Add("u_int"); 1371 stream->Add("u_int");
1372 break; 1372 break;
1373 case kExternalFloatArray: 1373 case JSObject::EXTERNAL_FLOAT_ELEMENTS:
1374 stream->Add("float"); 1374 stream->Add("float");
1375 break; 1375 break;
1376 case kExternalDoubleArray: 1376 case JSObject::EXTERNAL_DOUBLE_ELEMENTS:
1377 stream->Add("double"); 1377 stream->Add("double");
1378 break; 1378 break;
1379 case kExternalPixelArray: 1379 case JSObject::EXTERNAL_PIXEL_ELEMENTS:
1380 stream->Add("pixel"); 1380 stream->Add("pixel");
1381 break; 1381 break;
1382 case JSObject::FAST_ELEMENTS:
1383 case JSObject::FAST_DOUBLE_ELEMENTS:
1384 case JSObject::DICTIONARY_ELEMENTS:
1385 UNREACHABLE();
1386 break;
1382 } 1387 }
1383 stream->Add("["); 1388 stream->Add("[");
1384 key()->PrintNameTo(stream); 1389 key()->PrintNameTo(stream);
1385 stream->Add("]"); 1390 stream->Add("]");
1386 } 1391 }
1387 1392
1388 1393
1389 void HStoreNamedGeneric::PrintDataTo(StringStream* stream) { 1394 void HStoreNamedGeneric::PrintDataTo(StringStream* stream) {
1390 object()->PrintNameTo(stream); 1395 object()->PrintNameTo(stream);
1391 stream->Add("."); 1396 stream->Add(".");
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1424 key()->PrintNameTo(stream); 1429 key()->PrintNameTo(stream);
1425 stream->Add("] = "); 1430 stream->Add("] = ");
1426 value()->PrintNameTo(stream); 1431 value()->PrintNameTo(stream);
1427 } 1432 }
1428 1433
1429 1434
1430 void HStoreKeyedSpecializedArrayElement::PrintDataTo( 1435 void HStoreKeyedSpecializedArrayElement::PrintDataTo(
1431 StringStream* stream) { 1436 StringStream* stream) {
1432 external_pointer()->PrintNameTo(stream); 1437 external_pointer()->PrintNameTo(stream);
1433 stream->Add("."); 1438 stream->Add(".");
1434 switch (array_type()) { 1439 switch (elements_kind()) {
1435 case kExternalByteArray: 1440 case JSObject::EXTERNAL_BYTE_ELEMENTS:
1436 stream->Add("byte"); 1441 stream->Add("byte");
1437 break; 1442 break;
1438 case kExternalUnsignedByteArray: 1443 case JSObject::EXTERNAL_UNSIGNED_BYTE_ELEMENTS:
1439 stream->Add("u_byte"); 1444 stream->Add("u_byte");
1440 break; 1445 break;
1441 case kExternalShortArray: 1446 case JSObject::EXTERNAL_SHORT_ELEMENTS:
1442 stream->Add("short"); 1447 stream->Add("short");
1443 break; 1448 break;
1444 case kExternalUnsignedShortArray: 1449 case JSObject::EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
1445 stream->Add("u_short"); 1450 stream->Add("u_short");
1446 break; 1451 break;
1447 case kExternalIntArray: 1452 case JSObject::EXTERNAL_INT_ELEMENTS:
1448 stream->Add("int"); 1453 stream->Add("int");
1449 break; 1454 break;
1450 case kExternalUnsignedIntArray: 1455 case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS:
1451 stream->Add("u_int"); 1456 stream->Add("u_int");
1452 break; 1457 break;
1453 case kExternalFloatArray: 1458 case JSObject::EXTERNAL_FLOAT_ELEMENTS:
1454 stream->Add("float"); 1459 stream->Add("float");
1455 break; 1460 break;
1456 case kExternalDoubleArray: 1461 case JSObject::EXTERNAL_DOUBLE_ELEMENTS:
1457 stream->Add("double"); 1462 stream->Add("double");
1458 break; 1463 break;
1459 case kExternalPixelArray: 1464 case JSObject::EXTERNAL_PIXEL_ELEMENTS:
1460 stream->Add("pixel"); 1465 stream->Add("pixel");
1461 break; 1466 break;
1467 case JSObject::FAST_ELEMENTS:
1468 case JSObject::FAST_DOUBLE_ELEMENTS:
1469 case JSObject::DICTIONARY_ELEMENTS:
1470 UNREACHABLE();
1471 break;
1462 } 1472 }
1463 stream->Add("["); 1473 stream->Add("[");
1464 key()->PrintNameTo(stream); 1474 key()->PrintNameTo(stream);
1465 stream->Add("] = "); 1475 stream->Add("] = ");
1466 value()->PrintNameTo(stream); 1476 value()->PrintNameTo(stream);
1467 } 1477 }
1468 1478
1469 1479
1470 void HLoadGlobalCell::PrintDataTo(StringStream* stream) { 1480 void HLoadGlobalCell::PrintDataTo(StringStream* stream) {
1471 stream->Add("[%p]", *cell()); 1481 stream->Add("[%p]", *cell());
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
1769 1779
1770 1780
1771 void HCheckPrototypeMaps::Verify() { 1781 void HCheckPrototypeMaps::Verify() {
1772 HInstruction::Verify(); 1782 HInstruction::Verify();
1773 ASSERT(HasNoUses()); 1783 ASSERT(HasNoUses());
1774 } 1784 }
1775 1785
1776 #endif 1786 #endif
1777 1787
1778 } } // namespace v8::internal 1788 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/lithium-codegen-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698