| OLD | NEW |
| 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 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1024 stream->Add(" %s to %s", from().Mnemonic(), to().Mnemonic()); | 1024 stream->Add(" %s to %s", from().Mnemonic(), to().Mnemonic()); |
| 1025 | 1025 |
| 1026 if (CanTruncateToInt32()) stream->Add(" truncating-int32"); | 1026 if (CanTruncateToInt32()) stream->Add(" truncating-int32"); |
| 1027 if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?"); | 1027 if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?"); |
| 1028 if (CheckFlag(kDeoptimizeOnUndefined)) stream->Add(" deopt-on-undefined"); | 1028 if (CheckFlag(kDeoptimizeOnUndefined)) stream->Add(" deopt-on-undefined"); |
| 1029 } | 1029 } |
| 1030 | 1030 |
| 1031 | 1031 |
| 1032 void HJSArrayLength::PrintDataTo(StringStream* stream) { | 1032 void HJSArrayLength::PrintDataTo(StringStream* stream) { |
| 1033 value()->PrintNameTo(stream); | 1033 value()->PrintNameTo(stream); |
| 1034 stream->Add(" "); | 1034 if (HasTypeCheck()) { |
| 1035 typecheck()->PrintNameTo(stream); | 1035 stream->Add(" "); |
| 1036 typecheck()->PrintNameTo(stream); |
| 1037 } |
| 1036 } | 1038 } |
| 1037 | 1039 |
| 1038 | 1040 |
| 1039 HValue* HUnaryMathOperation::Canonicalize() { | 1041 HValue* HUnaryMathOperation::Canonicalize() { |
| 1040 if (op() == kMathFloor) { | 1042 if (op() == kMathFloor) { |
| 1041 // If the input is integer32 then we replace the floor instruction | 1043 // If the input is integer32 then we replace the floor instruction |
| 1042 // with its input. This happens before the representation changes are | 1044 // with its input. This happens before the representation changes are |
| 1043 // introduced. | 1045 // introduced. |
| 1044 if (value()->representation().IsInteger32()) return value(); | 1046 if (value()->representation().IsInteger32()) return value(); |
| 1045 | 1047 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1137 *tag = kSymbolTag; | 1139 *tag = kSymbolTag; |
| 1138 return; | 1140 return; |
| 1139 default: | 1141 default: |
| 1140 UNREACHABLE(); | 1142 UNREACHABLE(); |
| 1141 } | 1143 } |
| 1142 } | 1144 } |
| 1143 | 1145 |
| 1144 | 1146 |
| 1145 void HLoadElements::PrintDataTo(StringStream* stream) { | 1147 void HLoadElements::PrintDataTo(StringStream* stream) { |
| 1146 value()->PrintNameTo(stream); | 1148 value()->PrintNameTo(stream); |
| 1147 stream->Add(" "); | 1149 if (HasTypeCheck()) { |
| 1148 typecheck()->PrintNameTo(stream); | 1150 stream->Add(" "); |
| 1151 typecheck()->PrintNameTo(stream); |
| 1152 } |
| 1149 } | 1153 } |
| 1150 | 1154 |
| 1151 | 1155 |
| 1152 void HCheckMaps::PrintDataTo(StringStream* stream) { | 1156 void HCheckMaps::PrintDataTo(StringStream* stream) { |
| 1153 value()->PrintNameTo(stream); | 1157 value()->PrintNameTo(stream); |
| 1154 stream->Add(" [%p", *map_set()->first()); | 1158 stream->Add(" [%p", *map_set()->first()); |
| 1155 for (int i = 1; i < map_set()->length(); ++i) { | 1159 for (int i = 1; i < map_set()->length(); ++i) { |
| 1156 stream->Add(",%p", *map_set()->at(i)); | 1160 stream->Add(",%p", *map_set()->at(i)); |
| 1157 } | 1161 } |
| 1158 stream->Add("]"); | 1162 stream->Add("]"); |
| (...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2008 ASSERT(elements_kind() >= FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND && | 2012 ASSERT(elements_kind() >= FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND && |
| 2009 elements_kind() <= LAST_EXTERNAL_ARRAY_ELEMENTS_KIND); | 2013 elements_kind() <= LAST_EXTERNAL_ARRAY_ELEMENTS_KIND); |
| 2010 elements()->PrintNameTo(stream); | 2014 elements()->PrintNameTo(stream); |
| 2011 stream->Add("."); | 2015 stream->Add("."); |
| 2012 stream->Add(ElementsKindToString(elements_kind())); | 2016 stream->Add(ElementsKindToString(elements_kind())); |
| 2013 } | 2017 } |
| 2014 | 2018 |
| 2015 stream->Add("["); | 2019 stream->Add("["); |
| 2016 key()->PrintNameTo(stream); | 2020 key()->PrintNameTo(stream); |
| 2017 if (IsDehoisted()) { | 2021 if (IsDehoisted()) { |
| 2018 stream->Add(" + %d] ", index_offset()); | 2022 stream->Add(" + %d]", index_offset()); |
| 2019 } else { | 2023 } else { |
| 2020 stream->Add("] "); | 2024 stream->Add("]"); |
| 2021 } | 2025 } |
| 2022 | 2026 |
| 2023 dependency()->PrintNameTo(stream); | 2027 if (HasDependency()) { |
| 2028 stream->Add(" "); |
| 2029 dependency()->PrintNameTo(stream); |
| 2030 } |
| 2031 |
| 2024 if (RequiresHoleCheck()) { | 2032 if (RequiresHoleCheck()) { |
| 2025 stream->Add(" check_hole"); | 2033 stream->Add(" check_hole"); |
| 2026 } | 2034 } |
| 2027 } | 2035 } |
| 2028 | 2036 |
| 2029 | 2037 |
| 2030 bool HLoadKeyed::RequiresHoleCheck() const { | 2038 bool HLoadKeyed::RequiresHoleCheck() const { |
| 2031 if (IsFastPackedElementsKind(elements_kind())) { | 2039 if (IsFastPackedElementsKind(elements_kind())) { |
| 2032 return false; | 2040 return false; |
| 2033 } | 2041 } |
| (...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2765 | 2773 |
| 2766 | 2774 |
| 2767 void HCheckFunction::Verify() { | 2775 void HCheckFunction::Verify() { |
| 2768 HInstruction::Verify(); | 2776 HInstruction::Verify(); |
| 2769 ASSERT(HasNoUses()); | 2777 ASSERT(HasNoUses()); |
| 2770 } | 2778 } |
| 2771 | 2779 |
| 2772 #endif | 2780 #endif |
| 2773 | 2781 |
| 2774 } } // namespace v8::internal | 2782 } } // namespace v8::internal |
| OLD | NEW |