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

Side by Side Diff: src/types.cc

Issue 722943003: Revert "[turbofan] Weakening of types must weaken ranges inside unions." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « src/types.h ('k') | test/cctest/test-types.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <iomanip>
6
7 #include "src/types.h" 5 #include "src/types.h"
8 6
9 #include "src/ostreams.h" 7 #include "src/ostreams.h"
10 #include "src/types-inl.h" 8 #include "src/types-inl.h"
11 9
12 namespace v8 { 10 namespace v8 {
13 namespace internal { 11 namespace internal {
14 12
15 13
16 // NOTE: If code is marked as being a "shortcut", this means that removing 14 // NOTE: If code is marked as being a "shortcut", this means that removing
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 if (dim != REPRESENTATION_DIM) { 1010 if (dim != REPRESENTATION_DIM) {
1013 if (this->IsBitset()) { 1011 if (this->IsBitset()) {
1014 BitsetType::Print(os, SEMANTIC(this->AsBitset())); 1012 BitsetType::Print(os, SEMANTIC(this->AsBitset()));
1015 } else if (this->IsClass()) { 1013 } else if (this->IsClass()) {
1016 os << "Class(" << static_cast<void*>(*this->AsClass()->Map()) << " < "; 1014 os << "Class(" << static_cast<void*>(*this->AsClass()->Map()) << " < ";
1017 BitsetType::New(BitsetType::Lub(this))->PrintTo(os, dim); 1015 BitsetType::New(BitsetType::Lub(this))->PrintTo(os, dim);
1018 os << ")"; 1016 os << ")";
1019 } else if (this->IsConstant()) { 1017 } else if (this->IsConstant()) {
1020 os << "Constant(" << Brief(*this->AsConstant()->Value()) << ")"; 1018 os << "Constant(" << Brief(*this->AsConstant()->Value()) << ")";
1021 } else if (this->IsRange()) { 1019 } else if (this->IsRange()) {
1022 std::ostream::fmtflags saved_flags = os.setf(std::ios::fixed);
1023 std::streamsize saved_precision = os.precision(0);
1024 os << "Range(" << this->AsRange()->Min()->Number() << ", " 1020 os << "Range(" << this->AsRange()->Min()->Number() << ", "
1025 << this->AsRange()->Max()->Number() << ")"; 1021 << this->AsRange()->Max()->Number() << ")";
1026 os.flags(saved_flags);
1027 os.precision(saved_precision);
1028 } else if (this->IsContext()) { 1022 } else if (this->IsContext()) {
1029 os << "Context("; 1023 os << "Context(";
1030 this->AsContext()->Outer()->PrintTo(os, dim); 1024 this->AsContext()->Outer()->PrintTo(os, dim);
1031 os << ")"; 1025 os << ")";
1032 } else if (this->IsUnion()) { 1026 } else if (this->IsUnion()) {
1033 os << "("; 1027 os << "(";
1034 for (int i = 0, n = this->AsUnion()->Length(); i < n; ++i) { 1028 for (int i = 0, n = this->AsUnion()->Length(); i < n; ++i) {
1035 TypeHandle type_i = this->AsUnion()->Get(i); 1029 TypeHandle type_i = this->AsUnion()->Get(i);
1036 if (i > 0) os << " | "; 1030 if (i > 0) os << " | ";
1037 type_i->PrintTo(os, dim); 1031 type_i->PrintTo(os, dim);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
1092 template class TypeImpl<HeapTypeConfig>::Iterator<i::Object>; 1086 template class TypeImpl<HeapTypeConfig>::Iterator<i::Object>;
1093 1087
1094 template TypeImpl<ZoneTypeConfig>::TypeHandle 1088 template TypeImpl<ZoneTypeConfig>::TypeHandle
1095 TypeImpl<ZoneTypeConfig>::Convert<HeapType>( 1089 TypeImpl<ZoneTypeConfig>::Convert<HeapType>(
1096 TypeImpl<HeapTypeConfig>::TypeHandle, TypeImpl<ZoneTypeConfig>::Region*); 1090 TypeImpl<HeapTypeConfig>::TypeHandle, TypeImpl<ZoneTypeConfig>::Region*);
1097 template TypeImpl<HeapTypeConfig>::TypeHandle 1091 template TypeImpl<HeapTypeConfig>::TypeHandle
1098 TypeImpl<HeapTypeConfig>::Convert<Type>( 1092 TypeImpl<HeapTypeConfig>::Convert<Type>(
1099 TypeImpl<ZoneTypeConfig>::TypeHandle, TypeImpl<HeapTypeConfig>::Region*); 1093 TypeImpl<ZoneTypeConfig>::TypeHandle, TypeImpl<HeapTypeConfig>::Region*);
1100 1094
1101 } } // namespace v8::internal 1095 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/types.h ('k') | test/cctest/test-types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698