Commit c30cc072 authored by mvstanton's avatar mvstanton Committed by Commit bot

[turbofan] put src/types.[h/cc] into src/compiler/types.[h/cc]

BUG=

Review-Url: https://codereview.chromium.org/2309823002
Cr-Commit-Position: refs/heads/master@{#39181}
parent e5ba156d
...@@ -1147,6 +1147,8 @@ v8_source_set("v8_base") { ...@@ -1147,6 +1147,8 @@ v8_source_set("v8_base") {
"src/compiler/typed-optimization.h", "src/compiler/typed-optimization.h",
"src/compiler/typer.cc", "src/compiler/typer.cc",
"src/compiler/typer.h", "src/compiler/typer.h",
"src/compiler/types.cc",
"src/compiler/types.h",
"src/compiler/unwinding-info-writer.h", "src/compiler/unwinding-info-writer.h",
"src/compiler/value-numbering-reducer.cc", "src/compiler/value-numbering-reducer.cc",
"src/compiler/value-numbering-reducer.h", "src/compiler/value-numbering-reducer.h",
...@@ -1617,8 +1619,6 @@ v8_source_set("v8_base") { ...@@ -1617,8 +1619,6 @@ v8_source_set("v8_base") {
"src/type-feedback-vector.h", "src/type-feedback-vector.h",
"src/type-info.cc", "src/type-info.cc",
"src/type-info.h", "src/type-info.h",
"src/types.cc",
"src/types.h",
"src/unicode-cache-inl.h", "src/unicode-cache-inl.h",
"src/unicode-cache.h", "src/unicode-cache.h",
"src/unicode-decoder.cc", "src/unicode-decoder.cc",
......
...@@ -22,6 +22,7 @@ class Factory; ...@@ -22,6 +22,7 @@ class Factory;
namespace compiler { namespace compiler {
// Forward declarations. // Forward declarations.
class Type;
class TypeCache; class TypeCache;
// Whether we are loading a property or storing to a property. // Whether we are loading a property or storing to a property.
......
...@@ -19,7 +19,7 @@ namespace compiler { ...@@ -19,7 +19,7 @@ namespace compiler {
class CallDescriptor; class CallDescriptor;
struct CommonOperatorGlobalCache; struct CommonOperatorGlobalCache;
class Operator; class Operator;
class Type;
// Prediction hint for branches. // Prediction hint for branches.
enum class BranchHint : uint8_t { kNone, kTrue, kFalse }; enum class BranchHint : uint8_t { kNone, kTrue, kFalse };
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
#include "src/compiler/node-properties.h" #include "src/compiler/node-properties.h"
#include "src/compiler/simplified-operator.h" #include "src/compiler/simplified-operator.h"
#include "src/compiler/type-cache.h" #include "src/compiler/type-cache.h"
#include "src/compiler/types.h"
#include "src/objects-inl.h" #include "src/objects-inl.h"
#include "src/types.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "src/compiler/node-properties.h" #include "src/compiler/node-properties.h"
#include "src/compiler/operator-properties.h" #include "src/compiler/operator-properties.h"
#include "src/compiler/type-cache.h" #include "src/compiler/type-cache.h"
#include "src/types.h" #include "src/compiler/types.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#define V8_COMPILER_NODE_PROPERTIES_H_ #define V8_COMPILER_NODE_PROPERTIES_H_
#include "src/compiler/node.h" #include "src/compiler/node.h"
#include "src/types.h" #include "src/compiler/types.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include "src/compiler/opcodes.h" #include "src/compiler/opcodes.h"
#include "src/compiler/operator.h" #include "src/compiler/operator.h"
#include "src/types.h" #include "src/compiler/types.h"
#include "src/zone-containers.h" #include "src/zone-containers.h"
namespace v8 { namespace v8 {
......
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
#include "src/compiler/common-operator.h" #include "src/compiler/common-operator.h"
#include "src/compiler/type-cache.h" #include "src/compiler/type-cache.h"
#include "src/compiler/types.h"
#include "src/factory.h" #include "src/factory.h"
#include "src/isolate.h" #include "src/isolate.h"
#include "src/types.h"
#include "src/objects-inl.h" #include "src/objects-inl.h"
......
...@@ -14,13 +14,13 @@ namespace internal { ...@@ -14,13 +14,13 @@ namespace internal {
// Forward declarations. // Forward declarations.
class Isolate; class Isolate;
class RangeType; class RangeType;
class Type;
class Zone; class Zone;
namespace compiler { namespace compiler {
// Forward declarations. // Forward declarations.
class Operator; class Operator;
class Type;
class TypeCache; class TypeCache;
class OperationTyper { class OperationTyper {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include "src/base/lazy-instance.h" #include "src/base/lazy-instance.h"
#include "src/compiler/opcodes.h" #include "src/compiler/opcodes.h"
#include "src/compiler/operator.h" #include "src/compiler/operator.h"
#include "src/types.h" #include "src/compiler/types.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <iosfwd> #include <iosfwd>
#include "src/compiler/operator.h" #include "src/compiler/operator.h"
#include "src/compiler/types.h"
#include "src/handles.h" #include "src/handles.h"
#include "src/machine-type.h" #include "src/machine-type.h"
#include "src/objects.h" #include "src/objects.h"
...@@ -16,10 +17,8 @@ namespace v8 { ...@@ -16,10 +17,8 @@ namespace v8 {
namespace internal { namespace internal {
// Forward declarations. // Forward declarations.
class Type;
class Zone; class Zone;
namespace compiler { namespace compiler {
// Forward declarations. // Forward declarations.
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
#ifndef V8_COMPILER_TYPE_CACHE_H_ #ifndef V8_COMPILER_TYPE_CACHE_H_
#define V8_COMPILER_TYPE_CACHE_H_ #define V8_COMPILER_TYPE_CACHE_H_
#include "src/compiler/types.h"
#include "src/date.h" #include "src/date.h"
#include "src/types.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
......
...@@ -4,14 +4,14 @@ ...@@ -4,14 +4,14 @@
#include <iomanip> #include <iomanip>
#include "src/types.h" #include "src/compiler/types.h"
#include "src/handles-inl.h" #include "src/handles-inl.h"
#include "src/ostreams.h" #include "src/ostreams.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
namespace compiler {
// NOTE: If code is marked as being a "shortcut", this means that removing // NOTE: If code is marked as being a "shortcut", this means that removing
// the code won't affect the semantics of the surrounding function definition. // the code won't affect the semantics of the surrounding function definition.
...@@ -58,18 +58,16 @@ bool Type::Contains(RangeType* lhs, RangeType* rhs) { ...@@ -58,18 +58,16 @@ bool Type::Contains(RangeType* lhs, RangeType* rhs) {
bool Type::Contains(RangeType* lhs, ConstantType* rhs) { bool Type::Contains(RangeType* lhs, ConstantType* rhs) {
DisallowHeapAllocation no_allocation; DisallowHeapAllocation no_allocation;
return IsInteger(*rhs->Value()) && return IsInteger(*rhs->Value()) && lhs->Min() <= rhs->Value()->Number() &&
lhs->Min() <= rhs->Value()->Number() &&
rhs->Value()->Number() <= lhs->Max(); rhs->Value()->Number() <= lhs->Max();
} }
bool Type::Contains(RangeType* range, i::Object* val) { bool Type::Contains(RangeType* range, i::Object* val) {
DisallowHeapAllocation no_allocation; DisallowHeapAllocation no_allocation;
return IsInteger(val) && return IsInteger(val) && range->Min() <= val->Number() &&
range->Min() <= val->Number() && val->Number() <= range->Max(); val->Number() <= range->Max();
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Min and Max computation. // Min and Max computation.
...@@ -105,11 +103,9 @@ double Type::Max() { ...@@ -105,11 +103,9 @@ double Type::Max() {
return 0; return 0;
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Glb and lub computation. // Glb and lub computation.
// The largest bitset subsumed by this type. // The largest bitset subsumed by this type.
Type::bitset BitsetType::Glb(Type* type) { Type::bitset BitsetType::Glb(Type* type) {
DisallowHeapAllocation no_allocation; DisallowHeapAllocation no_allocation;
...@@ -129,7 +125,6 @@ Type::bitset BitsetType::Glb(Type* type) { ...@@ -129,7 +125,6 @@ Type::bitset BitsetType::Glb(Type* type) {
} }
} }
// The smallest bitset subsuming this type, possibly not a proper one. // The smallest bitset subsuming this type, possibly not a proper one.
Type::bitset BitsetType::Lub(Type* type) { Type::bitset BitsetType::Lub(Type* type) {
DisallowHeapAllocation no_allocation; DisallowHeapAllocation no_allocation;
...@@ -286,7 +281,7 @@ Type::bitset BitsetType::Lub(i::Object* value) { ...@@ -286,7 +281,7 @@ Type::bitset BitsetType::Lub(i::Object* value) {
DisallowHeapAllocation no_allocation; DisallowHeapAllocation no_allocation;
if (value->IsNumber()) { if (value->IsNumber()) {
return Lub(value->Number()) & return Lub(value->Number()) &
(value->IsSmi() ? kTaggedSigned : kTaggedPointer); (value->IsSmi() ? kTaggedSigned : kTaggedPointer);
} }
return Lub(i::HeapObject::cast(value)->map()); return Lub(i::HeapObject::cast(value)->map());
} }
...@@ -299,7 +294,6 @@ Type::bitset BitsetType::Lub(double value) { ...@@ -299,7 +294,6 @@ Type::bitset BitsetType::Lub(double value) {
return kOtherNumber; return kOtherNumber;
} }
// Minimum values of plain numeric bitsets. // Minimum values of plain numeric bitsets.
const BitsetType::Boundary BitsetType::BoundariesArray[] = { const BitsetType::Boundary BitsetType::BoundariesArray[] = {
{kOtherNumber, kPlainNumber, -V8_INFINITY}, {kOtherNumber, kPlainNumber, -V8_INFINITY},
...@@ -337,7 +331,7 @@ Type::bitset BitsetType::Lub(double min, double max) { ...@@ -337,7 +331,7 @@ Type::bitset BitsetType::Lub(double min, double max) {
for (size_t i = 1; i < BoundariesSize(); ++i) { for (size_t i = 1; i < BoundariesSize(); ++i) {
if (min < mins[i].min) { if (min < mins[i].min) {
lub |= mins[i-1].internal; lub |= mins[i - 1].internal;
if (max < mins[i].min) return lub; if (max < mins[i].min) return lub;
} }
} }
...@@ -391,23 +385,21 @@ double BitsetType::Max(bitset bits) { ...@@ -391,23 +385,21 @@ double BitsetType::Max(bitset bits) {
} }
for (size_t i = BoundariesSize() - 1; i-- > 0;) { for (size_t i = BoundariesSize() - 1; i-- > 0;) {
if (Is(SEMANTIC(mins[i].internal), bits)) { if (Is(SEMANTIC(mins[i].internal), bits)) {
return mz ? return mz ? std::max(0.0, mins[i + 1].min - 1) : mins[i + 1].min - 1;
std::max(0.0, mins[i+1].min - 1) : mins[i+1].min - 1;
} }
} }
if (mz) return 0; if (mz) return 0;
return std::numeric_limits<double>::quiet_NaN(); return std::numeric_limits<double>::quiet_NaN();
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Predicates. // Predicates.
bool Type::SimplyEquals(Type* that) { bool Type::SimplyEquals(Type* that) {
DisallowHeapAllocation no_allocation; DisallowHeapAllocation no_allocation;
if (this->IsConstant()) { if (this->IsConstant()) {
return that->IsConstant() return that->IsConstant() &&
&& *this->AsConstant()->Value() == *that->AsConstant()->Value(); *this->AsConstant()->Value() == *that->AsConstant()->Value();
} }
if (this->IsTuple()) { if (this->IsTuple()) {
if (!that->IsTuple()) return false; if (!that->IsTuple()) return false;
...@@ -429,7 +421,6 @@ Type::bitset Type::Representation() { ...@@ -429,7 +421,6 @@ Type::bitset Type::Representation() {
return REPRESENTATION(this->BitsetLub()); return REPRESENTATION(this->BitsetLub());
} }
// Check if [this] <= [that]. // Check if [this] <= [that].
bool Type::SlowIs(Type* that) { bool Type::SlowIs(Type* that) {
DisallowHeapAllocation no_allocation; DisallowHeapAllocation no_allocation;
...@@ -452,7 +443,6 @@ bool Type::SlowIs(Type* that) { ...@@ -452,7 +443,6 @@ bool Type::SlowIs(Type* that) {
return SemanticIs(that); return SemanticIs(that);
} }
// Check if SEMANTIC([this]) <= SEMANTIC([that]). The result of the method // Check if SEMANTIC([this]) <= SEMANTIC([that]). The result of the method
// should be independent of the representation axis of the types. // should be independent of the representation axis of the types.
bool Type::SemanticIs(Type* that) { bool Type::SemanticIs(Type* that) {
...@@ -494,7 +484,6 @@ bool Type::SemanticIs(Type* that) { ...@@ -494,7 +484,6 @@ bool Type::SemanticIs(Type* that) {
return this->SimplyEquals(that); return this->SimplyEquals(that);
} }
// Check if [this] and [that] overlap. // Check if [this] and [that] overlap.
bool Type::Maybe(Type* that) { bool Type::Maybe(Type* that) {
DisallowHeapAllocation no_allocation; DisallowHeapAllocation no_allocation;
...@@ -557,7 +546,6 @@ bool Type::SemanticMaybe(Type* that) { ...@@ -557,7 +546,6 @@ bool Type::SemanticMaybe(Type* that) {
return this->SimplyEquals(that); return this->SimplyEquals(that);
} }
// Return the range in [this], or [NULL]. // Return the range in [this], or [NULL].
Type* Type::GetRange() { Type* Type::GetRange() {
DisallowHeapAllocation no_allocation; DisallowHeapAllocation no_allocation;
...@@ -590,7 +578,7 @@ bool UnionType::Wellformed() { ...@@ -590,7 +578,7 @@ bool UnionType::Wellformed() {
// 5. No element (except the bitset) is a subtype of any other. // 5. No element (except the bitset) is a subtype of any other.
// 6. If there is a range, then the bitset type does not contain // 6. If there is a range, then the bitset type does not contain
// plain number bits. // plain number bits.
DCHECK(this->Length() >= 2); // (1) DCHECK(this->Length() >= 2); // (1)
DCHECK(this->Get(0)->IsBitset()); // (2a) DCHECK(this->Get(0)->IsBitset()); // (2a)
for (int i = 0; i < this->Length(); ++i) { for (int i = 0; i < this->Length(); ++i) {
...@@ -608,15 +596,12 @@ bool UnionType::Wellformed() { ...@@ -608,15 +596,12 @@ bool UnionType::Wellformed() {
return true; return true;
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Union and intersection // Union and intersection
static bool AddIsSafe(int x, int y) { static bool AddIsSafe(int x, int y) {
return x >= 0 ? return x >= 0 ? y <= std::numeric_limits<int>::max() - x
y <= std::numeric_limits<int>::max() - x : : y >= std::numeric_limits<int>::min() - x;
y >= std::numeric_limits<int>::min() - x;
} }
Type* Type::Intersect(Type* type1, Type* type2, Zone* zone) { Type* Type::Intersect(Type* type1, Type* type2, Zone* zone) {
...@@ -694,7 +679,7 @@ int Type::UpdateRange(Type* range, UnionType* result, int size, Zone* zone) { ...@@ -694,7 +679,7 @@ int Type::UpdateRange(Type* range, UnionType* result, int size, Zone* zone) {
} }
// Remove any components that just got subsumed. // Remove any components that just got subsumed.
for (int i = 2; i < size; ) { for (int i = 2; i < size;) {
if (result->Get(i)->SemanticIs(range)) { if (result->Get(i)->SemanticIs(range)) {
result->Set(i, result->Get(--size)); result->Set(i, result->Get(--size));
} else { } else {
...@@ -777,7 +762,6 @@ int Type::IntersectAux(Type* lhs, Type* rhs, UnionType* result, int size, ...@@ -777,7 +762,6 @@ int Type::IntersectAux(Type* lhs, Type* rhs, UnionType* result, int size,
return size; return size;
} }
// Make sure that we produce a well-formed range and bitset: // Make sure that we produce a well-formed range and bitset:
// If the range is non-empty, the number bits in the bitset should be // If the range is non-empty, the number bits in the bitset should be
// clear. Moreover, if we have a canonical range (such as Signed32), // clear. Moreover, if we have a canonical range (such as Signed32),
...@@ -883,7 +867,6 @@ Type* Type::Union(Type* type1, Type* type2, Zone* zone) { ...@@ -883,7 +867,6 @@ Type* Type::Union(Type* type1, Type* type2, Zone* zone) {
return NormalizeUnion(result_type, size, zone); return NormalizeUnion(result_type, size, zone);
} }
// Add [type] to [result] unless [type] is bitset, range, or already subsumed. // Add [type] to [result] unless [type] is bitset, range, or already subsumed.
// Return new size of [result]. // Return new size of [result].
int Type::AddToUnion(Type* type, UnionType* result, int size, Zone* zone) { int Type::AddToUnion(Type* type, UnionType* result, int size, Zone* zone) {
...@@ -927,7 +910,6 @@ Type* Type::NormalizeUnion(Type* union_type, int size, Zone* zone) { ...@@ -927,7 +910,6 @@ Type* Type::NormalizeUnion(Type* union_type, int size, Zone* zone) {
return union_type; return union_type;
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Component extraction // Component extraction
...@@ -936,13 +918,11 @@ Type* Type::Representation(Type* t, Zone* zone) { ...@@ -936,13 +918,11 @@ Type* Type::Representation(Type* t, Zone* zone) {
return BitsetType::New(t->Representation()); return BitsetType::New(t->Representation());
} }
// static // static
Type* Type::Semantic(Type* t, Zone* zone) { Type* Type::Semantic(Type* t, Zone* zone) {
return Intersect(t, BitsetType::New(BitsetType::kSemantic), zone); return Intersect(t, BitsetType::New(BitsetType::kSemantic), zone);
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Iteration. // Iteration.
...@@ -967,7 +947,6 @@ Type* Type::Iterator<T>::get_type() { ...@@ -967,7 +947,6 @@ Type* Type::Iterator<T>::get_type() {
return type_->IsUnion() ? type_->AsUnion()->Get(index_) : type_; return type_->IsUnion() ? type_->AsUnion()->Get(index_) : type_;
} }
// C++ cannot specialise nested templates, so we have to go through this // C++ cannot specialise nested templates, so we have to go through this
// contortion with an auxiliary template to simulate it. // contortion with an auxiliary template to simulate it.
template <class T> template <class T>
...@@ -1008,23 +987,25 @@ void Type::Iterator<T>::Advance() { ...@@ -1008,23 +987,25 @@ void Type::Iterator<T>::Advance() {
index_ = -1; index_ = -1;
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Printing. // Printing.
const char* BitsetType::Name(bitset bits) { const char* BitsetType::Name(bitset bits) {
switch (bits) { switch (bits) {
case REPRESENTATION(kAny): return "Any"; case REPRESENTATION(kAny):
#define RETURN_NAMED_REPRESENTATION_TYPE(type, value) \ return "Any";
case REPRESENTATION(k##type): return #type; #define RETURN_NAMED_REPRESENTATION_TYPE(type, value) \
REPRESENTATION_BITSET_TYPE_LIST(RETURN_NAMED_REPRESENTATION_TYPE) case REPRESENTATION(k##type): \
#undef RETURN_NAMED_REPRESENTATION_TYPE return #type;
REPRESENTATION_BITSET_TYPE_LIST(RETURN_NAMED_REPRESENTATION_TYPE)
#define RETURN_NAMED_SEMANTIC_TYPE(type, value) \ #undef RETURN_NAMED_REPRESENTATION_TYPE
case SEMANTIC(k##type): return #type;
SEMANTIC_BITSET_TYPE_LIST(RETURN_NAMED_SEMANTIC_TYPE) #define RETURN_NAMED_SEMANTIC_TYPE(type, value) \
INTERNAL_BITSET_TYPE_LIST(RETURN_NAMED_SEMANTIC_TYPE) case SEMANTIC(k##type): \
#undef RETURN_NAMED_SEMANTIC_TYPE return #type;
SEMANTIC_BITSET_TYPE_LIST(RETURN_NAMED_SEMANTIC_TYPE)
INTERNAL_BITSET_TYPE_LIST(RETURN_NAMED_SEMANTIC_TYPE)
#undef RETURN_NAMED_SEMANTIC_TYPE
default: default:
return NULL; return NULL;
...@@ -1108,7 +1089,6 @@ void Type::PrintTo(std::ostream& os, PrintDimension dim) { ...@@ -1108,7 +1089,6 @@ void Type::PrintTo(std::ostream& os, PrintDimension dim) {
} }
} }
#ifdef DEBUG #ifdef DEBUG
void Type::Print() { void Type::Print() {
OFStream os(stdout); OFStream os(stdout);
...@@ -1135,5 +1115,6 @@ BitsetType::bitset BitsetType::UnsignedSmall() { ...@@ -1135,5 +1115,6 @@ BitsetType::bitset BitsetType::UnsignedSmall() {
template class Type::Iterator<i::Object>; template class Type::Iterator<i::Object>;
} // namespace compiler
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef V8_TYPES_H_ #ifndef V8_COMPILER_TYPES_H_
#define V8_TYPES_H_ #define V8_COMPILER_TYPES_H_
#include "src/conversions.h" #include "src/conversions.h"
#include "src/handles.h" #include "src/handles.h"
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
namespace v8 { namespace v8 {
namespace internal { namespace internal {
namespace compiler {
// SUMMARY // SUMMARY
// //
...@@ -242,7 +243,7 @@ namespace internal { ...@@ -242,7 +243,7 @@ namespace internal {
* occur as part of PlainNumber. * occur as part of PlainNumber.
*/ */
#define PROPER_BITSET_TYPE_LIST(V) \ #define PROPER_BITSET_TYPE_LIST(V) \
REPRESENTATION_BITSET_TYPE_LIST(V) \ REPRESENTATION_BITSET_TYPE_LIST(V) \
SEMANTIC_BITSET_TYPE_LIST(V) SEMANTIC_BITSET_TYPE_LIST(V)
...@@ -336,12 +337,7 @@ class TypeBase { ...@@ -336,12 +337,7 @@ class TypeBase {
protected: protected:
friend class Type; friend class Type;
enum Kind { enum Kind { kConstant, kTuple, kUnion, kRange };
kConstant,
kTuple,
kUnion,
kRange
};
Kind kind() const { return kind_; } Kind kind() const { return kind_; }
explicit TypeBase(Kind kind) : kind_(kind) {} explicit TypeBase(Kind kind) : kind_(kind) {}
...@@ -776,7 +772,8 @@ struct Bounds { ...@@ -776,7 +772,8 @@ struct Bounds {
return that.lower->Is(this->lower) && this->upper->Is(that.upper); return that.lower->Is(this->lower) && this->upper->Is(that.upper);
} }
}; };
} // namespace compiler
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
#endif // V8_TYPES_H_ #endif // V8_COMPILER_TYPES_H_
...@@ -62,7 +62,6 @@ STATIC_ASSERT(SKIP_SYMBOLS == ...@@ -62,7 +62,6 @@ STATIC_ASSERT(SKIP_SYMBOLS ==
static_cast<PropertyFilter>(v8::PropertyFilter::SKIP_SYMBOLS)); static_cast<PropertyFilter>(v8::PropertyFilter::SKIP_SYMBOLS));
class Smi; class Smi;
class Type;
class TypeInfo; class TypeInfo;
// Type of properties. // Type of properties.
......
...@@ -725,6 +725,8 @@ ...@@ -725,6 +725,8 @@
'compiler/store-store-elimination.h', 'compiler/store-store-elimination.h',
'compiler/tail-call-optimization.cc', 'compiler/tail-call-optimization.cc',
'compiler/tail-call-optimization.h', 'compiler/tail-call-optimization.h',
'compiler/types.cc',
'compiler/types.h',
'compiler/type-cache.cc', 'compiler/type-cache.cc',
'compiler/type-cache.h', 'compiler/type-cache.h',
'compiler/type-hint-analyzer.cc', 'compiler/type-hint-analyzer.cc',
...@@ -1215,8 +1217,6 @@ ...@@ -1215,8 +1217,6 @@
'type-feedback-vector.h', 'type-feedback-vector.h',
'type-info.cc', 'type-info.cc',
'type-info.h', 'type-info.h',
'types.cc',
'types.h',
'unicode-inl.h', 'unicode-inl.h',
'unicode.cc', 'unicode.cc',
'unicode.h', 'unicode.h',
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include "src/global-handles.h" #include "src/global-handles.h"
#include "src/ic/stub-cache.h" #include "src/ic/stub-cache.h"
#include "src/macro-assembler.h" #include "src/macro-assembler.h"
#include "src/types.h"
using namespace v8::internal; using namespace v8::internal;
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
#include "src/property-details.h" #include "src/property-details.h"
#include "src/types.h"
using namespace v8::internal; using namespace v8::internal;
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <vector> #include <vector>
#include "src/compiler/types.h"
#include "src/crankshaft/hydrogen-types.h" #include "src/crankshaft/hydrogen-types.h"
#include "src/factory.h" #include "src/factory.h"
#include "src/heap/heap.h" #include "src/heap/heap.h"
...@@ -11,7 +12,6 @@ ...@@ -11,7 +12,6 @@
// FIXME(mstarzinger, marja): This is weird, but required because of the missing // FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/factory.h -> src/objects-inl.h // (disallowed) include: src/factory.h -> src/objects-inl.h
#include "src/objects-inl.h" #include "src/objects-inl.h"
#include "src/types.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing // FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/type-feedback-vector.h -> // (disallowed) include: src/type-feedback-vector.h ->
// src/type-feedback-vector-inl.h // src/type-feedback-vector-inl.h
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "test/cctest/types-fuzz.h" #include "test/cctest/types-fuzz.h"
using namespace v8::internal; using namespace v8::internal;
using namespace v8::internal::compiler;
namespace { namespace {
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
namespace v8 { namespace v8 {
namespace internal { namespace internal {
namespace compiler {
class Types { class Types {
public: public:
...@@ -206,7 +207,7 @@ class Types { ...@@ -206,7 +207,7 @@ class Types {
v8::base::RandomNumberGenerator* rng_; v8::base::RandomNumberGenerator* rng_;
}; };
} // namespace compiler
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
......
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "src/bit-vector.h"
#include "src/compiler/escape-analysis.h" #include "src/compiler/escape-analysis.h"
#include "src/bit-vector.h"
#include "src/compiler/escape-analysis-reducer.h" #include "src/compiler/escape-analysis-reducer.h"
#include "src/compiler/graph-visualizer.h" #include "src/compiler/graph-visualizer.h"
#include "src/compiler/js-graph.h" #include "src/compiler/js-graph.h"
#include "src/compiler/node-properties.h" #include "src/compiler/node-properties.h"
#include "src/compiler/simplified-operator.h" #include "src/compiler/simplified-operator.h"
#include "src/types.h" #include "src/compiler/types.h"
#include "src/zone-containers.h" #include "src/zone-containers.h"
#include "test/unittests/compiler/graph-unittest.h" #include "test/unittests/compiler/graph-unittest.h"
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "src/compiler/simplified-operator.h"
#include "src/compiler/access-builder.h" #include "src/compiler/access-builder.h"
#include "src/compiler/js-graph.h" #include "src/compiler/js-graph.h"
#include "src/compiler/node-properties.h" #include "src/compiler/node-properties.h"
#include "src/compiler/simplified-operator.h"
#include "src/compiler/simplified-operator-reducer.h" #include "src/compiler/simplified-operator-reducer.h"
#include "src/compiler/types.h"
#include "src/conversions-inl.h" #include "src/conversions-inl.h"
#include "src/types.h"
#include "test/unittests/compiler/graph-unittest.h" #include "test/unittests/compiler/graph-unittest.h"
#include "test/unittests/compiler/node-test-utils.h" #include "test/unittests/compiler/node-test-utils.h"
#include "testing/gmock-support.h" #include "testing/gmock-support.h"
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "src/compiler/simplified-operator.h"
#include "src/compiler/opcodes.h" #include "src/compiler/opcodes.h"
#include "src/compiler/operator.h"
#include "src/compiler/operator-properties.h" #include "src/compiler/operator-properties.h"
#include "src/compiler/simplified-operator.h" #include "src/compiler/operator.h"
#include "src/types.h" #include "src/compiler/types.h"
#include "test/unittests/test-utils.h" #include "test/unittests/test-utils.h"
namespace v8 { namespace v8 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment