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

Unified Diff: src/types.cc

Issue 712623002: [turbofan] Weakening of types must handle ranges inside unions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added test Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: src/types.cc
diff --git a/src/types.cc b/src/types.cc
index 162c35ac8353fea7a5a4de07b436450178cb98bb..b423beea0833e4be55865ff0e7d9fa463226afc4 100644
--- a/src/types.cc
+++ b/src/types.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <iomanip>
+
#include "src/types.h"
#include "src/ostreams.h"
@@ -1017,8 +1019,12 @@ void TypeImpl<Config>::PrintTo(std::ostream& os, PrintDimension dim) {
} else if (this->IsConstant()) {
os << "Constant(" << Brief(*this->AsConstant()->Value()) << ")";
} else if (this->IsRange()) {
- os << "Range(" << this->AsRange()->Min()->Number()
- << ", " << this->AsRange()->Max()->Number() << ")";
+ std::ostream::fmtflags saved_flags = os.setf(std::ios::fixed);
+ std::streamsize saved_precision = os.precision(0);
+ os << "Range(" << this->AsRange()->Min()->Number() << ", "
+ << this->AsRange()->Max()->Number() << ")";
+ os.flags(saved_flags);
+ os.precision(saved_precision);
} else if (this->IsContext()) {
os << "Context(";
this->AsContext()->Outer()->PrintTo(os, dim);
« no previous file with comments | « src/types.h ('k') | test/cctest/test-types.cc » ('j') | test/cctest/test-types.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698