Commit f5a37d13 authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Remove the unused asm.js types from TypeCache.

For asm.js we now have a dedicated AsmTyper, that uses it's own type
system (which is tailored towards asm.js), and so we don't need the
special asm.js types anymore in the TypeCache. This also moves the
TypeCache into the src/compiler directory, because it doesn't make
sense to use outside anyways.

TBR=ahaas@chromium.org
R=jarin@chromium.org
BUG=v8:5267

Review-Url: https://codereview.chromium.org/2289573002
Cr-Commit-Position: refs/heads/master@{#38964}
parent f676db46
...@@ -1131,6 +1131,8 @@ v8_source_set("v8_base") { ...@@ -1131,6 +1131,8 @@ v8_source_set("v8_base") {
"src/compiler/store-store-elimination.h", "src/compiler/store-store-elimination.h",
"src/compiler/tail-call-optimization.cc", "src/compiler/tail-call-optimization.cc",
"src/compiler/tail-call-optimization.h", "src/compiler/tail-call-optimization.h",
"src/compiler/type-cache.cc",
"src/compiler/type-cache.h",
"src/compiler/type-hint-analyzer.cc", "src/compiler/type-hint-analyzer.cc",
"src/compiler/type-hint-analyzer.h", "src/compiler/type-hint-analyzer.h",
"src/compiler/type-hints.cc", "src/compiler/type-hints.cc",
...@@ -1604,8 +1606,6 @@ v8_source_set("v8_base") { ...@@ -1604,8 +1606,6 @@ v8_source_set("v8_base") {
"src/transitions-inl.h", "src/transitions-inl.h",
"src/transitions.cc", "src/transitions.cc",
"src/transitions.h", "src/transitions.h",
"src/type-cache.cc",
"src/type-cache.h",
"src/type-feedback-vector-inl.h", "src/type-feedback-vector-inl.h",
"src/type-feedback-vector.cc", "src/type-feedback-vector.cc",
"src/type-feedback-vector.h", "src/type-feedback-vector.h",
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include "src/base/bits.h" #include "src/base/bits.h"
#include "src/codegen.h" #include "src/codegen.h"
#include "src/globals.h" #include "src/globals.h"
#include "src/type-cache.h"
#include "src/utils.h" #include "src/utils.h"
#define FAIL(node, msg) \ #define FAIL(node, msg) \
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
#include "src/compiler/access-builder.h" #include "src/compiler/access-builder.h"
#include "src/compiler/type-cache.h"
#include "src/contexts.h" #include "src/contexts.h"
#include "src/frames.h" #include "src/frames.h"
#include "src/handles-inl.h" #include "src/handles-inl.h"
#include "src/heap/heap.h" #include "src/heap/heap.h"
#include "src/type-cache.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
......
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
#include "src/accessors.h" #include "src/accessors.h"
#include "src/compilation-dependencies.h" #include "src/compilation-dependencies.h"
#include "src/compiler/access-info.h" #include "src/compiler/access-info.h"
#include "src/compiler/type-cache.h"
#include "src/field-index-inl.h" #include "src/field-index-inl.h"
#include "src/field-type.h" #include "src/field-type.h"
#include "src/objects-inl.h" #include "src/objects-inl.h"
#include "src/type-cache.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
......
...@@ -17,10 +17,12 @@ namespace internal { ...@@ -17,10 +17,12 @@ namespace internal {
// Forward declarations. // Forward declarations.
class CompilationDependencies; class CompilationDependencies;
class Factory; class Factory;
class TypeCache;
namespace compiler { namespace compiler {
// Forward declarations.
class TypeCache;
// Whether we are loading a property or storing to a property. // Whether we are loading a property or storing to a property.
enum class AccessMode { kLoad, kStore }; enum class AccessMode { kLoad, kStore };
......
...@@ -12,13 +12,13 @@ ...@@ -12,13 +12,13 @@
#include "src/compiler/common-operator.h" #include "src/compiler/common-operator.h"
#include "src/compiler/graph-reducer.h" #include "src/compiler/graph-reducer.h"
#include "src/compiler/js-operator.h" #include "src/compiler/js-operator.h"
#include "src/compiler/node.h"
#include "src/compiler/node-matchers.h" #include "src/compiler/node-matchers.h"
#include "src/compiler/node-properties.h" #include "src/compiler/node-properties.h"
#include "src/compiler/node.h"
#include "src/compiler/operator-properties.h" #include "src/compiler/operator-properties.h"
#include "src/compiler/simplified-operator.h" #include "src/compiler/simplified-operator.h"
#include "src/compiler/type-cache.h"
#include "src/objects-inl.h" #include "src/objects-inl.h"
#include "src/type-cache.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
#include "src/compiler/node-matchers.h" #include "src/compiler/node-matchers.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/compiler/type-cache.h"
#include "src/objects-inl.h" #include "src/objects-inl.h"
#include "src/type-cache.h"
#include "src/types.h" #include "src/types.h"
namespace v8 { namespace v8 {
......
...@@ -14,7 +14,6 @@ namespace internal { ...@@ -14,7 +14,6 @@ namespace internal {
// Forward declarations. // Forward declarations.
class CompilationDependencies; class CompilationDependencies;
class Factory; class Factory;
class TypeCache;
namespace compiler { namespace compiler {
...@@ -23,7 +22,7 @@ class CommonOperatorBuilder; ...@@ -23,7 +22,7 @@ class CommonOperatorBuilder;
struct FieldAccess; struct FieldAccess;
class JSGraph; class JSGraph;
class SimplifiedOperatorBuilder; class SimplifiedOperatorBuilder;
class TypeCache;
class JSBuiltinReducer final : public AdvancedReducer { class JSBuiltinReducer final : public AdvancedReducer {
public: public:
......
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
#include "src/compiler/js-operator.h" #include "src/compiler/js-operator.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/compiler/type-cache.h"
#include "src/lookup.h" #include "src/lookup.h"
#include "src/objects-inl.h" #include "src/objects-inl.h"
#include "src/type-cache.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
......
...@@ -12,8 +12,6 @@ namespace internal { ...@@ -12,8 +12,6 @@ namespace internal {
// Forward declarations. // Forward declarations.
class CompilationDependencies; class CompilationDependencies;
class TypeCache;
namespace compiler { namespace compiler {
...@@ -22,7 +20,7 @@ class CommonOperatorBuilder; ...@@ -22,7 +20,7 @@ class CommonOperatorBuilder;
class JSGraph; class JSGraph;
class JSOperatorBuilder; class JSOperatorBuilder;
class SimplifiedOperatorBuilder; class SimplifiedOperatorBuilder;
class TypeCache;
// Specializes a given JSGraph to a given global object, potentially constant // Specializes a given JSGraph to a given global object, potentially constant
// folding some {JSLoadGlobal} nodes or strength reducing some {JSStoreGlobal} // folding some {JSLoadGlobal} nodes or strength reducing some {JSStoreGlobal}
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
#include "src/compiler/js-operator.h" #include "src/compiler/js-operator.h"
#include "src/compiler/linkage.h" #include "src/compiler/linkage.h"
#include "src/compiler/node-matchers.h" #include "src/compiler/node-matchers.h"
#include "src/compiler/type-cache.h"
#include "src/field-index-inl.h" #include "src/field-index-inl.h"
#include "src/isolate-inl.h" #include "src/isolate-inl.h"
#include "src/type-cache.h"
#include "src/type-feedback-vector.h" #include "src/type-feedback-vector.h"
namespace v8 { namespace v8 {
......
...@@ -16,8 +16,6 @@ namespace internal { ...@@ -16,8 +16,6 @@ namespace internal {
class CompilationDependencies; class CompilationDependencies;
class Factory; class Factory;
class FeedbackNexus; class FeedbackNexus;
class TypeCache;
namespace compiler { namespace compiler {
...@@ -30,7 +28,7 @@ class JSOperatorBuilder; ...@@ -30,7 +28,7 @@ class JSOperatorBuilder;
class MachineOperatorBuilder; class MachineOperatorBuilder;
class PropertyAccessInfo; class PropertyAccessInfo;
class SimplifiedOperatorBuilder; class SimplifiedOperatorBuilder;
class TypeCache;
// Specializes a given JSGraph to a given native context, potentially constant // Specializes a given JSGraph to a given native context, potentially constant
// folding some {LoadGlobal} nodes or strength reducing some {StoreGlobal} // folding some {LoadGlobal} nodes or strength reducing some {StoreGlobal}
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "src/compiler/node-matchers.h" #include "src/compiler/node-matchers.h"
#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/type-cache.h" #include "src/compiler/type-cache.h"
#include "src/types.h" #include "src/types.h"
namespace v8 { namespace v8 {
......
...@@ -15,8 +15,6 @@ namespace internal { ...@@ -15,8 +15,6 @@ namespace internal {
// Forward declarations. // Forward declarations.
class CompilationDependencies; class CompilationDependencies;
class Factory; class Factory;
class TypeCache;
namespace compiler { namespace compiler {
...@@ -26,7 +24,7 @@ class JSGraph; ...@@ -26,7 +24,7 @@ class JSGraph;
class JSOperatorBuilder; class JSOperatorBuilder;
class MachineOperatorBuilder; class MachineOperatorBuilder;
class SimplifiedOperatorBuilder; class SimplifiedOperatorBuilder;
class TypeCache;
// Lowers JS-level operators to simplified operators based on types. // Lowers JS-level operators to simplified operators based on types.
class JSTypedLowering final : public AdvancedReducer { class JSTypedLowering final : public AdvancedReducer {
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
#include "src/compiler/operation-typer.h" #include "src/compiler/operation-typer.h"
#include "src/compiler/common-operator.h" #include "src/compiler/common-operator.h"
#include "src/compiler/type-cache.h"
#include "src/factory.h" #include "src/factory.h"
#include "src/isolate.h" #include "src/isolate.h"
#include "src/type-cache.h"
#include "src/types.h" #include "src/types.h"
#include "src/objects-inl.h" #include "src/objects-inl.h"
......
...@@ -11,15 +11,17 @@ ...@@ -11,15 +11,17 @@
namespace v8 { namespace v8 {
namespace internal { namespace internal {
// Forward declarations.
class Isolate; class Isolate;
class RangeType; class RangeType;
class Type; class Type;
class TypeCache;
class Zone; class Zone;
namespace compiler { namespace compiler {
// Forward declarations.
class Operator; class Operator;
class TypeCache;
class OperationTyper { class OperationTyper {
public: public:
......
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
#include "src/compiler/representation-change.h" #include "src/compiler/representation-change.h"
#include "src/compiler/simplified-operator.h" #include "src/compiler/simplified-operator.h"
#include "src/compiler/source-position.h" #include "src/compiler/source-position.h"
#include "src/compiler/type-cache.h"
#include "src/conversions-inl.h" #include "src/conversions-inl.h"
#include "src/objects.h" #include "src/objects.h"
#include "src/type-cache.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
......
...@@ -12,17 +12,13 @@ ...@@ -12,17 +12,13 @@
namespace v8 { namespace v8 {
namespace internal { namespace internal {
// Forward declarations.
class TypeCache;
namespace compiler { namespace compiler {
// Forward declarations. // Forward declarations.
class RepresentationChanger; class RepresentationChanger;
class RepresentationSelector; class RepresentationSelector;
class SourcePositionTable; class SourcePositionTable;
class TypeCache;
class SimplifiedLowering final { class SimplifiedLowering final {
public: public:
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
#include "src/compiler/node-matchers.h" #include "src/compiler/node-matchers.h"
#include "src/compiler/operator-properties.h" #include "src/compiler/operator-properties.h"
#include "src/compiler/simplified-operator.h" #include "src/compiler/simplified-operator.h"
#include "src/compiler/type-cache.h"
#include "src/conversions-inl.h" #include "src/conversions-inl.h"
#include "src/type-cache.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
......
...@@ -2,12 +2,13 @@ ...@@ -2,12 +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/type-cache.h" #include "src/compiler/type-cache.h"
#include "src/base/lazy-instance.h" #include "src/base/lazy-instance.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
namespace compiler {
namespace { namespace {
...@@ -15,9 +16,9 @@ base::LazyInstance<TypeCache>::type kCache = LAZY_INSTANCE_INITIALIZER; ...@@ -15,9 +16,9 @@ base::LazyInstance<TypeCache>::type kCache = LAZY_INSTANCE_INITIALIZER;
} // namespace } // namespace
// static // static
TypeCache const& TypeCache::Get() { return kCache.Get(); } TypeCache const& TypeCache::Get() { return kCache.Get(); }
} // namespace compiler
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
...@@ -2,13 +2,14 @@ ...@@ -2,13 +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.
#ifndef V8_TYPE_CACHE_H_ #ifndef V8_COMPILER_TYPE_CACHE_H_
#define V8_TYPE_CACHE_H_ #define V8_COMPILER_TYPE_CACHE_H_
#include "src/types.h" #include "src/types.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
namespace compiler {
class TypeCache final { class TypeCache final {
private: private:
...@@ -77,40 +78,6 @@ class TypeCache final { ...@@ -77,40 +78,6 @@ class TypeCache final {
Type::Union(kSafeInteger, Type::MinusZero(), zone()); Type::Union(kSafeInteger, Type::MinusZero(), zone());
Type* const kPositiveSafeInteger = CreateRange(0.0, kMaxSafeInteger); Type* const kPositiveSafeInteger = CreateRange(0.0, kMaxSafeInteger);
Type* const kUntaggedUndefined =
Type::Intersect(Type::Undefined(), Type::Untagged(), zone());
// Asm.js related types.
Type* const kAsmSigned = kInt32;
Type* const kAsmUnsigned = kUint32;
Type* const kAsmInt = Type::Union(kAsmSigned, kAsmUnsigned, zone());
Type* const kAsmFixnum = Type::Intersect(kAsmSigned, kAsmUnsigned, zone());
Type* const kAsmFloat = kFloat32;
Type* const kAsmDouble = kFloat64;
Type* const kAsmFloatQ = Type::Union(kAsmFloat, kUntaggedUndefined, zone());
Type* const kAsmDoubleQ = Type::Union(kAsmDouble, kUntaggedUndefined, zone());
// Not part of the Asm.js type hierarchy, but represents a part of what
// intish encompasses.
Type* const kAsmIntQ = Type::Union(kAsmInt, kUntaggedUndefined, zone());
Type* const kAsmFloatDoubleQ = Type::Union(kAsmFloatQ, kAsmDoubleQ, zone());
// Asm.js size unions.
Type* const kAsmSize8 = Type::Union(kInt8, kUint8, zone());
Type* const kAsmSize16 = Type::Union(kInt16, kUint16, zone());
Type* const kAsmSize32 =
Type::Union(Type::Union(kInt32, kUint32, zone()), kAsmFloat, zone());
Type* const kAsmSize64 = kFloat64;
// Asm.js other types.
Type* const kAsmComparable = Type::Union(
kAsmSigned,
Type::Union(kAsmUnsigned, Type::Union(kAsmDouble, kAsmFloat, zone()),
zone()),
zone());
Type* const kAsmIntArrayElement =
Type::Union(Type::Union(kInt8, kUint8, zone()),
Type::Union(Type::Union(kInt16, kUint16, zone()),
Type::Union(kInt32, kUint32, zone()), zone()),
zone());
// The FixedArray::length property always containts a smi in the range // The FixedArray::length property always containts a smi in the range
// [0, FixedArray::kMaxLength]. // [0, FixedArray::kMaxLength].
Type* const kFixedArrayLengthType = CreateNative( Type* const kFixedArrayLengthType = CreateNative(
...@@ -168,7 +135,8 @@ class TypeCache final { ...@@ -168,7 +135,8 @@ class TypeCache final {
Zone* zone() { return &zone_; } Zone* zone() { return &zone_; }
}; };
} // namespace compiler
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
#endif // V8_TYPE_CACHE_H_ #endif // V8_COMPILER_TYPE_CACHE_H_
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
#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/compiler/type-cache.h"
#include "src/isolate-inl.h" #include "src/isolate-inl.h"
#include "src/type-cache.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
......
...@@ -15,13 +15,13 @@ namespace internal { ...@@ -15,13 +15,13 @@ namespace internal {
class CompilationDependencies; class CompilationDependencies;
class Factory; class Factory;
class Isolate; class Isolate;
class TypeCache;
namespace compiler { namespace compiler {
// Forward declarations. // Forward declarations.
class JSGraph; class JSGraph;
class SimplifiedOperatorBuilder; class SimplifiedOperatorBuilder;
class TypeCache;
class TypedOptimization final : public AdvancedReducer { class TypedOptimization final : public AdvancedReducer {
public: public:
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
#include "src/compiler/node.h" #include "src/compiler/node.h"
#include "src/compiler/operation-typer.h" #include "src/compiler/operation-typer.h"
#include "src/compiler/simplified-operator.h" #include "src/compiler/simplified-operator.h"
#include "src/compiler/type-cache.h"
#include "src/objects-inl.h" #include "src/objects-inl.h"
#include "src/type-cache.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
......
...@@ -7,18 +7,13 @@ ...@@ -7,18 +7,13 @@
#include "src/compiler/graph.h" #include "src/compiler/graph.h"
#include "src/compiler/operation-typer.h" #include "src/compiler/operation-typer.h"
#include "src/types.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
// Forward declarations.
class TypeCache;
namespace compiler { namespace compiler {
// Forward declarations.
class LoopVariableOptimizer; class LoopVariableOptimizer;
class OperationTyper;
class Typer { class Typer {
public: public:
......
...@@ -719,6 +719,8 @@ ...@@ -719,6 +719,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/type-cache.cc',
'compiler/type-cache.h',
'compiler/type-hint-analyzer.cc', 'compiler/type-hint-analyzer.cc',
'compiler/type-hint-analyzer.h', 'compiler/type-hint-analyzer.h',
'compiler/type-hints.cc', 'compiler/type-hints.cc',
...@@ -1202,8 +1204,6 @@ ...@@ -1202,8 +1204,6 @@
'transitions-inl.h', 'transitions-inl.h',
'transitions.cc', 'transitions.cc',
'transitions.h', 'transitions.h',
'type-cache.cc',
'type-cache.h',
'type-feedback-vector-inl.h', 'type-feedback-vector-inl.h',
'type-feedback-vector.cc', 'type-feedback-vector.cc',
'type-feedback-vector.h', 'type-feedback-vector.h',
......
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