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

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

Issue 11464027: Fix crashes in debug output of generated stubs (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix whitespace problems Created 8 years 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') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 857 matching lines...) Expand 10 before | Expand all | Expand 10 after
2016 ASSERT(elements_kind() >= FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND && 2020 ASSERT(elements_kind() >= FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND &&
2017 elements_kind() <= LAST_EXTERNAL_ARRAY_ELEMENTS_KIND); 2021 elements_kind() <= LAST_EXTERNAL_ARRAY_ELEMENTS_KIND);
2018 elements()->PrintNameTo(stream); 2022 elements()->PrintNameTo(stream);
2019 stream->Add("."); 2023 stream->Add(".");
2020 stream->Add(ElementsKindToString(elements_kind())); 2024 stream->Add(ElementsKindToString(elements_kind()));
2021 } 2025 }
2022 2026
2023 stream->Add("["); 2027 stream->Add("[");
2024 key()->PrintNameTo(stream); 2028 key()->PrintNameTo(stream);
2025 if (IsDehoisted()) { 2029 if (IsDehoisted()) {
2026 stream->Add(" + %d] ", index_offset()); 2030 stream->Add(" + %d]", index_offset());
2027 } else { 2031 } else {
2028 stream->Add("] "); 2032 stream->Add("]");
2029 } 2033 }
2030 2034
2031 dependency()->PrintNameTo(stream); 2035 if (HasDependency()) {
2036 stream->Add(" ");
2037 dependency()->PrintNameTo(stream);
2038 }
2039
2032 if (RequiresHoleCheck()) { 2040 if (RequiresHoleCheck()) {
2033 stream->Add(" check_hole"); 2041 stream->Add(" check_hole");
2034 } 2042 }
2035 } 2043 }
2036 2044
2037 2045
2038 bool HLoadKeyed::RequiresHoleCheck() const { 2046 bool HLoadKeyed::RequiresHoleCheck() const {
2039 if (IsFastPackedElementsKind(elements_kind())) { 2047 if (IsFastPackedElementsKind(elements_kind())) {
2040 return false; 2048 return false;
2041 } 2049 }
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
2773 2781
2774 2782
2775 void HCheckFunction::Verify() { 2783 void HCheckFunction::Verify() {
2776 HInstruction::Verify(); 2784 HInstruction::Verify();
2777 ASSERT(HasNoUses()); 2785 ASSERT(HasNoUses());
2778 } 2786 }
2779 2787
2780 #endif 2788 #endif
2781 2789
2782 } } // namespace v8::internal 2790 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698