Chromium Code Reviews

Unified Diff: src/types.cc

Issue 409543004: Add constructor for range types. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: src/types.cc
diff --git a/src/types.cc b/src/types.cc
index 3cd349b89b9cfa00693df070c19d623ea2f324d5..bdd46446e1d4fe8f33b6db2e766b65e9fbc5fe62 100644
--- a/src/types.cc
+++ b/src/types.cc
@@ -911,6 +911,11 @@ void TypeImpl<Config>::PrintTo(OStream& os, PrintDimension dim) { // NOLINT
<< " : ";
BitsetType::New(BitsetType::Lub(this))->PrintTo(os, dim);
os << ")";
+ } else if (this->IsRange()) {
+ os << "Range([" << this->AsRange()->Min()
rossberg 2014/07/21 15:58:32 Let's print this as Range(0.5..1.7 : bound) to
+ << ", " << this->AsRange()->Max() << "] : ";
+ BitsetType::New(BitsetType::Lub(this))->PrintTo(os, dim);
+ os << ")";
} 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