| 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 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 782 if (CanTruncateToInt32()) stream->Add(" truncating-int32"); | 782 if (CanTruncateToInt32()) stream->Add(" truncating-int32"); |
| 783 if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?"); | 783 if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?"); |
| 784 } | 784 } |
| 785 | 785 |
| 786 | 786 |
| 787 HValue* HCheckInstanceType::Canonicalize() { |
| 788 if (check_ == IS_STRING && |
| 789 !value()->type().IsUninitialized() && |
| 790 value()->type().IsString()) { |
| 791 return NULL; |
| 792 } |
| 793 if (check_ == IS_SYMBOL && |
| 794 value()->IsConstant() && |
| 795 HConstant::cast(value())->handle()->IsSymbol()) { |
| 796 return NULL; |
| 797 } |
| 798 return this; |
| 799 } |
| 800 |
| 801 |
| 787 void HCheckInstanceType::GetCheckInterval(InstanceType* first, | 802 void HCheckInstanceType::GetCheckInterval(InstanceType* first, |
| 788 InstanceType* last) { | 803 InstanceType* last) { |
| 789 ASSERT(is_interval_check()); | 804 ASSERT(is_interval_check()); |
| 790 switch (check_) { | 805 switch (check_) { |
| 791 case IS_SPEC_OBJECT: | 806 case IS_SPEC_OBJECT: |
| 792 *first = FIRST_SPEC_OBJECT_TYPE; | 807 *first = FIRST_SPEC_OBJECT_TYPE; |
| 793 *last = LAST_SPEC_OBJECT_TYPE; | 808 *last = LAST_SPEC_OBJECT_TYPE; |
| 794 return; | 809 return; |
| 795 case IS_JS_ARRAY: | 810 case IS_JS_ARRAY: |
| 796 *first = *last = JS_ARRAY_TYPE; | 811 *first = *last = JS_ARRAY_TYPE; |
| (...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1797 | 1812 |
| 1798 | 1813 |
| 1799 void HCheckPrototypeMaps::Verify() { | 1814 void HCheckPrototypeMaps::Verify() { |
| 1800 HInstruction::Verify(); | 1815 HInstruction::Verify(); |
| 1801 ASSERT(HasNoUses()); | 1816 ASSERT(HasNoUses()); |
| 1802 } | 1817 } |
| 1803 | 1818 |
| 1804 #endif | 1819 #endif |
| 1805 | 1820 |
| 1806 } } // namespace v8::internal | 1821 } } // namespace v8::internal |
| OLD | NEW |