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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 stream->Add("#%d", argument_count()); | 662 stream->Add("#%d", argument_count()); |
663 } | 663 } |
664 | 664 |
665 | 665 |
666 void HCallRuntime::PrintDataTo(StringStream* stream) { | 666 void HCallRuntime::PrintDataTo(StringStream* stream) { |
667 stream->Add("%o ", *name()); | 667 stream->Add("%o ", *name()); |
668 stream->Add("#%d", argument_count()); | 668 stream->Add("#%d", argument_count()); |
669 } | 669 } |
670 | 670 |
671 | 671 |
672 void HClassOfTest::PrintDataTo(StringStream* stream) { | 672 void HClassOfTestAndBranch::PrintDataTo(StringStream* stream) { |
673 stream->Add("class_of_test("); | 673 stream->Add("class_of_test("); |
674 value()->PrintNameTo(stream); | 674 value()->PrintNameTo(stream); |
675 stream->Add(", \"%o\")", *class_name()); | 675 stream->Add(", \"%o\")", *class_name()); |
676 } | 676 } |
677 | 677 |
678 | 678 |
679 void HAccessArgumentsAt::PrintDataTo(StringStream* stream) { | 679 void HAccessArgumentsAt::PrintDataTo(StringStream* stream) { |
680 arguments()->PrintNameTo(stream); | 680 arguments()->PrintNameTo(stream); |
681 stream->Add("["); | 681 stream->Add("["); |
682 index()->PrintNameTo(stream); | 682 index()->PrintNameTo(stream); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
740 stream->Add("%s ", name); | 740 stream->Add("%s ", name); |
741 value()->PrintNameTo(stream); | 741 value()->PrintNameTo(stream); |
742 } | 742 } |
743 | 743 |
744 | 744 |
745 void HUnaryOperation::PrintDataTo(StringStream* stream) { | 745 void HUnaryOperation::PrintDataTo(StringStream* stream) { |
746 value()->PrintNameTo(stream); | 746 value()->PrintNameTo(stream); |
747 } | 747 } |
748 | 748 |
749 | 749 |
750 void HHasInstanceType::PrintDataTo(StringStream* stream) { | 750 void HHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) { |
751 value()->PrintNameTo(stream); | 751 value()->PrintNameTo(stream); |
752 switch (from_) { | 752 switch (from_) { |
753 case FIRST_JS_RECEIVER_TYPE: | 753 case FIRST_JS_RECEIVER_TYPE: |
754 if (to_ == LAST_TYPE) stream->Add(" spec_object"); | 754 if (to_ == LAST_TYPE) stream->Add(" spec_object"); |
755 break; | 755 break; |
756 case JS_REGEXP_TYPE: | 756 case JS_REGEXP_TYPE: |
757 if (to_ == JS_REGEXP_TYPE) stream->Add(" reg_exp"); | 757 if (to_ == JS_REGEXP_TYPE) stream->Add(" reg_exp"); |
758 break; | 758 break; |
759 case JS_ARRAY_TYPE: | 759 case JS_ARRAY_TYPE: |
760 if (to_ == JS_ARRAY_TYPE) stream->Add(" array"); | 760 if (to_ == JS_ARRAY_TYPE) stream->Add(" array"); |
761 break; | 761 break; |
762 case JS_FUNCTION_TYPE: | 762 case JS_FUNCTION_TYPE: |
763 if (to_ == JS_FUNCTION_TYPE) stream->Add(" function"); | 763 if (to_ == JS_FUNCTION_TYPE) stream->Add(" function"); |
764 break; | 764 break; |
765 default: | 765 default: |
766 break; | 766 break; |
767 } | 767 } |
768 } | 768 } |
769 | 769 |
770 | 770 |
771 void HTypeofIs::PrintDataTo(StringStream* stream) { | 771 void HTypeofIsAndBranch::PrintDataTo(StringStream* stream) { |
772 value()->PrintNameTo(stream); | 772 value()->PrintNameTo(stream); |
773 stream->Add(" == "); | 773 stream->Add(" == "); |
774 stream->Add(type_literal_->ToAsciiVector()); | 774 stream->Add(type_literal_->ToAsciiVector()); |
775 } | 775 } |
776 | 776 |
777 | 777 |
778 void HChange::PrintDataTo(StringStream* stream) { | 778 void HChange::PrintDataTo(StringStream* stream) { |
779 HUnaryOperation::PrintDataTo(stream); | 779 HUnaryOperation::PrintDataTo(stream); |
780 stream->Add(" %s to %s", from_.Mnemonic(), to().Mnemonic()); | 780 stream->Add(" %s to %s", from_.Mnemonic(), to().Mnemonic()); |
781 | 781 |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1224 : new Range(); | 1224 : new Range(); |
1225 result->Shl(c->Integer32Value()); | 1225 result->Shl(c->Integer32Value()); |
1226 return result; | 1226 return result; |
1227 } | 1227 } |
1228 } | 1228 } |
1229 return HValue::InferRange(); | 1229 return HValue::InferRange(); |
1230 } | 1230 } |
1231 | 1231 |
1232 | 1232 |
1233 | 1233 |
1234 void HCompare::PrintDataTo(StringStream* stream) { | 1234 void HCompareGeneric::PrintDataTo(StringStream* stream) { |
1235 stream->Add(Token::Name(token())); | 1235 stream->Add(Token::Name(token())); |
1236 stream->Add(" "); | 1236 stream->Add(" "); |
1237 HBinaryOperation::PrintDataTo(stream); | 1237 HBinaryOperation::PrintDataTo(stream); |
1238 } | 1238 } |
1239 | 1239 |
1240 | 1240 |
1241 void HCompare::SetInputRepresentation(Representation r) { | 1241 void HCompareIDAndBranch::PrintDataTo(StringStream* stream) { |
| 1242 stream->Add(Token::Name(token())); |
| 1243 stream->Add(" "); |
| 1244 left()->PrintNameTo(stream); |
| 1245 stream->Add(" "); |
| 1246 right()->PrintNameTo(stream); |
| 1247 } |
| 1248 |
| 1249 |
| 1250 void HCompareIDAndBranch::SetInputRepresentation(Representation r) { |
1242 input_representation_ = r; | 1251 input_representation_ = r; |
1243 if (r.IsTagged()) { | 1252 if (r.IsDouble()) { |
1244 SetAllSideEffects(); | |
1245 ClearFlag(kUseGVN); | |
1246 } else if (r.IsDouble()) { | |
1247 SetFlag(kDeoptimizeOnUndefined); | 1253 SetFlag(kDeoptimizeOnUndefined); |
1248 ClearAllSideEffects(); | |
1249 SetFlag(kUseGVN); | |
1250 } else { | 1254 } else { |
1251 ClearAllSideEffects(); | 1255 ASSERT(r.IsInteger32()); |
1252 SetFlag(kUseGVN); | |
1253 } | 1256 } |
1254 } | 1257 } |
1255 | 1258 |
1256 | 1259 |
1257 void HParameter::PrintDataTo(StringStream* stream) { | 1260 void HParameter::PrintDataTo(StringStream* stream) { |
1258 stream->Add("%u", index()); | 1261 stream->Add("%u", index()); |
1259 } | 1262 } |
1260 | 1263 |
1261 | 1264 |
1262 void HLoadNamedField::PrintDataTo(StringStream* stream) { | 1265 void HLoadNamedField::PrintDataTo(StringStream* stream) { |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1559 } | 1562 } |
1560 return result; | 1563 return result; |
1561 } | 1564 } |
1562 | 1565 |
1563 | 1566 |
1564 HType HConstant::CalculateInferredType() { | 1567 HType HConstant::CalculateInferredType() { |
1565 return HType::TypeFromValue(handle_); | 1568 return HType::TypeFromValue(handle_); |
1566 } | 1569 } |
1567 | 1570 |
1568 | 1571 |
1569 HType HCompare::CalculateInferredType() { | 1572 HType HCompareGeneric::CalculateInferredType() { |
1570 return HType::Boolean(); | |
1571 } | |
1572 | |
1573 | |
1574 HType HCompareObjectEq::CalculateInferredType() { | |
1575 return HType::Boolean(); | |
1576 } | |
1577 | |
1578 | |
1579 HType HUnaryPredicate::CalculateInferredType() { | |
1580 return HType::Boolean(); | 1573 return HType::Boolean(); |
1581 } | 1574 } |
1582 | 1575 |
1583 | 1576 |
1584 HType HInstanceOf::CalculateInferredType() { | 1577 HType HInstanceOf::CalculateInferredType() { |
1585 return HType::Boolean(); | 1578 return HType::Boolean(); |
1586 } | 1579 } |
1587 | 1580 |
1588 | 1581 |
1589 HType HDeleteProperty::CalculateInferredType() { | 1582 HType HDeleteProperty::CalculateInferredType() { |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1802 | 1795 |
1803 | 1796 |
1804 void HCheckPrototypeMaps::Verify() { | 1797 void HCheckPrototypeMaps::Verify() { |
1805 HInstruction::Verify(); | 1798 HInstruction::Verify(); |
1806 ASSERT(HasNoUses()); | 1799 ASSERT(HasNoUses()); |
1807 } | 1800 } |
1808 | 1801 |
1809 #endif | 1802 #endif |
1810 | 1803 |
1811 } } // namespace v8::internal | 1804 } } // namespace v8::internal |
OLD | NEW |