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 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 | 628 |
629 void HBinaryCall::PrintDataTo(StringStream* stream) { | 629 void HBinaryCall::PrintDataTo(StringStream* stream) { |
630 first()->PrintNameTo(stream); | 630 first()->PrintNameTo(stream); |
631 stream->Add(" "); | 631 stream->Add(" "); |
632 second()->PrintNameTo(stream); | 632 second()->PrintNameTo(stream); |
633 stream->Add(" "); | 633 stream->Add(" "); |
634 stream->Add("#%d", argument_count()); | 634 stream->Add("#%d", argument_count()); |
635 } | 635 } |
636 | 636 |
637 | 637 |
| 638 void HBoundsCheck::PrintDataTo(StringStream* stream) { |
| 639 index()->PrintNameTo(stream); |
| 640 stream->Add(" "); |
| 641 length()->PrintNameTo(stream); |
| 642 } |
| 643 |
638 void HCallConstantFunction::PrintDataTo(StringStream* stream) { | 644 void HCallConstantFunction::PrintDataTo(StringStream* stream) { |
639 if (IsApplyFunction()) { | 645 if (IsApplyFunction()) { |
640 stream->Add("optimized apply "); | 646 stream->Add("optimized apply "); |
641 } else { | 647 } else { |
642 stream->Add("%o ", function()->shared()->DebugName()); | 648 stream->Add("%o ", function()->shared()->DebugName()); |
643 } | 649 } |
644 stream->Add("#%d", argument_count()); | 650 stream->Add("#%d", argument_count()); |
645 } | 651 } |
646 | 652 |
647 | 653 |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 void HInstanceOf::PrintDataTo(StringStream* stream) { | 861 void HInstanceOf::PrintDataTo(StringStream* stream) { |
856 left()->PrintNameTo(stream); | 862 left()->PrintNameTo(stream); |
857 stream->Add(" "); | 863 stream->Add(" "); |
858 right()->PrintNameTo(stream); | 864 right()->PrintNameTo(stream); |
859 stream->Add(" "); | 865 stream->Add(" "); |
860 context()->PrintNameTo(stream); | 866 context()->PrintNameTo(stream); |
861 } | 867 } |
862 | 868 |
863 | 869 |
864 Range* HValue::InferRange() { | 870 Range* HValue::InferRange() { |
865 if (representation().IsTagged()) { | 871 // Untagged integer32 cannot be -0, all other representations can. |
866 // Tagged values are always in int32 range when converted to integer, | 872 Range* result = new Range(); |
867 // but they can contain -0. | 873 result->set_can_be_minus_zero(!representation().IsInteger32()); |
868 Range* result = new Range(); | 874 return result; |
869 result->set_can_be_minus_zero(true); | |
870 return result; | |
871 } else if (representation().IsNone()) { | |
872 return NULL; | |
873 } else { | |
874 // Untagged integer32 cannot be -0 and we don't compute ranges for | |
875 // untagged doubles. | |
876 return new Range(); | |
877 } | |
878 } | 875 } |
879 | 876 |
880 | 877 |
881 Range* HConstant::InferRange() { | 878 Range* HConstant::InferRange() { |
882 if (has_int32_value_) { | 879 if (has_int32_value_) { |
883 Range* result = new Range(int32_value_, int32_value_); | 880 Range* result = new Range(int32_value_, int32_value_); |
884 result->set_can_be_minus_zero(false); | 881 result->set_can_be_minus_zero(false); |
885 return result; | 882 return result; |
886 } | 883 } |
887 return HValue::InferRange(); | 884 return HValue::InferRange(); |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1366 found = true; | 1363 found = true; |
1367 break; | 1364 break; |
1368 } | 1365 } |
1369 } | 1366 } |
1370 if (!found) return false; | 1367 if (!found) return false; |
1371 } | 1368 } |
1372 return true; | 1369 return true; |
1373 } | 1370 } |
1374 | 1371 |
1375 | 1372 |
| 1373 void HLoadNamedFieldPolymorphic::PrintDataTo(StringStream* stream) { |
| 1374 object()->PrintNameTo(stream); |
| 1375 stream->Add(" ."); |
| 1376 stream->Add(*String::cast(*name())->ToCString()); |
| 1377 } |
| 1378 |
| 1379 |
| 1380 void HLoadNamedGeneric::PrintDataTo(StringStream* stream) { |
| 1381 object()->PrintNameTo(stream); |
| 1382 stream->Add(" ."); |
| 1383 stream->Add(*String::cast(*name())->ToCString()); |
| 1384 } |
| 1385 |
| 1386 |
1376 void HLoadKeyedFastElement::PrintDataTo(StringStream* stream) { | 1387 void HLoadKeyedFastElement::PrintDataTo(StringStream* stream) { |
1377 object()->PrintNameTo(stream); | 1388 object()->PrintNameTo(stream); |
1378 stream->Add("["); | 1389 stream->Add("["); |
1379 key()->PrintNameTo(stream); | 1390 key()->PrintNameTo(stream); |
1380 stream->Add("]"); | 1391 stream->Add("]"); |
1381 } | 1392 } |
1382 | 1393 |
1383 | 1394 |
1384 bool HLoadKeyedFastElement::RequiresHoleCheck() const { | 1395 bool HLoadKeyedFastElement::RequiresHoleCheck() const { |
1385 for (HUseIterator it(uses()); !it.Done(); it.Advance()) { | 1396 for (HUseIterator it(uses()); !it.Done(); it.Advance()) { |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1841 | 1852 |
1842 | 1853 |
1843 void HCheckPrototypeMaps::Verify() { | 1854 void HCheckPrototypeMaps::Verify() { |
1844 HInstruction::Verify(); | 1855 HInstruction::Verify(); |
1845 ASSERT(HasNoUses()); | 1856 ASSERT(HasNoUses()); |
1846 } | 1857 } |
1847 | 1858 |
1848 #endif | 1859 #endif |
1849 | 1860 |
1850 } } // namespace v8::internal | 1861 } } // namespace v8::internal |
OLD | NEW |