Commit 3c9ee8f3 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[ast] Remove AstType type system.

R=marja@chromium.org
BUG=v8:6408

Change-Id: Ied0c4d1aba18ec84d5feb02c3522b77759be216e
Reviewed-on: https://chromium-review.googlesource.com/548636Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46226}
parent 71eb30bc
......@@ -1160,9 +1160,6 @@ v8_source_set("v8_base") {
"src/ast/ast-numbering.cc",
"src/ast/ast-numbering.h",
"src/ast/ast-traversal-visitor.h",
"src/ast/ast-type-bounds.h",
"src/ast/ast-types.cc",
"src/ast/ast-types.h",
"src/ast/ast-value-factory.cc",
"src/ast/ast-value-factory.h",
"src/ast/ast.cc",
......
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// A container to associate type bounds with AST Expression nodes.
#ifndef V8_AST_AST_TYPE_BOUNDS_H_
#define V8_AST_AST_TYPE_BOUNDS_H_
#include "src/ast/ast-types.h"
#include "src/zone/zone-containers.h"
namespace v8 {
namespace internal {
class Expression;
class AstTypeBounds {
public:
explicit AstTypeBounds(Zone* zone) : bounds_map_(zone) {}
~AstTypeBounds() {}
AstBounds get(Expression* expression) const {
ZoneMap<Expression*, AstBounds>::const_iterator i =
bounds_map_.find(expression);
return (i != bounds_map_.end()) ? i->second : AstBounds::Unbounded();
}
void set(Expression* expression, AstBounds bounds) {
bounds_map_[expression] = bounds;
}
private:
ZoneMap<Expression*, AstBounds> bounds_map_;
};
} // namespace internal
} // namespace v8
#endif // V8_AST_AST_TYPE_BOUNDS_H_
This diff is collapsed.
This diff is collapsed.
......@@ -5,7 +5,6 @@
#ifndef V8_AST_AST_H_
#define V8_AST_AST_H_
#include "src/ast/ast-types.h"
#include "src/ast/ast-value-factory.h"
#include "src/ast/modules.h"
#include "src/ast/variables.h"
......
......@@ -4,7 +4,6 @@
#include "src/field-type.h"
#include "src/ast/ast-types.h"
#include "src/handles-inl.h"
#include "src/objects-inl.h"
#include "src/ostreams.h"
......@@ -72,13 +71,6 @@ bool FieldType::NowIs(FieldType* other) {
bool FieldType::NowIs(Handle<FieldType> other) { return NowIs(*other); }
AstType* FieldType::Convert(Zone* zone) {
if (IsAny()) return AstType::NonInternal();
if (IsNone()) return AstType::None();
DCHECK(IsClass());
return AstType::Class(AsClass(), zone);
}
void FieldType::PrintTo(std::ostream& os) {
if (IsAny()) {
os << "Any";
......
......@@ -5,7 +5,6 @@
#ifndef V8_FIELD_TYPE_H_
#define V8_FIELD_TYPE_H_
#include "src/ast/ast-types.h"
#include "src/objects.h"
#include "src/objects/map.h"
#include "src/ostreams.h"
......@@ -42,7 +41,6 @@ class FieldType : public Object {
bool NowStable();
bool NowIs(FieldType* other);
bool NowIs(Handle<FieldType> other);
AstType* Convert(Zone* zone);
void PrintTo(std::ostream& os);
};
......
......@@ -4,7 +4,6 @@
#include "src/ic/ic-state.h"
#include "src/ast/ast-types.h"
#include "src/feedback-vector.h"
#include "src/ic/ic.h"
#include "src/objects-inl.h"
......@@ -45,32 +44,6 @@ const char* CompareICState::GetStateName(State state) {
UNREACHABLE();
}
AstType* CompareICState::StateToType(Zone* zone, State state, Handle<Map> map) {
switch (state) {
case UNINITIALIZED:
return AstType::None();
case BOOLEAN:
return AstType::Boolean();
case SMI:
return AstType::SignedSmall();
case NUMBER:
return AstType::Number();
case STRING:
return AstType::String();
case INTERNALIZED_STRING:
return AstType::InternalizedString();
case UNIQUE_NAME:
return AstType::UniqueName();
case RECEIVER:
return AstType::Receiver();
case KNOWN_RECEIVER:
return map.is_null() ? AstType::Receiver() : AstType::Class(map, zone);
case GENERIC:
return AstType::Any();
}
UNREACHABLE();
}
CompareICState::State CompareICState::NewInputState(State old_state,
Handle<Object> value) {
......
......@@ -11,8 +11,6 @@
namespace v8 {
namespace internal {
class AstType;
const int kMaxKeyedPolymorphism = 4;
......@@ -45,9 +43,6 @@ class CompareICState {
GENERIC
};
static AstType* StateToType(Zone* zone, State state,
Handle<Map> map = Handle<Map>());
static State NewInputState(State old_state, Handle<Object> value);
static const char* GetStateName(CompareICState::State state);
......
......@@ -5,7 +5,7 @@
#ifndef V8_PARSING_PARAMETER_EXPRESSION_REWRITER_H_
#define V8_PARSING_PARAMETER_EXPRESSION_REWRITER_H_
#include "src/ast/ast-types.h"
#include <stdint.h>
namespace v8 {
namespace internal {
......
......@@ -593,9 +593,6 @@
'ast/ast-numbering.cc',
'ast/ast-numbering.h',
'ast/ast-traversal-visitor.h',
'ast/ast-type-bounds.h',
'ast/ast-types.cc',
'ast/ast-types.h',
'ast/ast-value-factory.cc',
'ast/ast-value-factory.h',
'ast/ast.cc',
......
......@@ -14,7 +14,6 @@ v8_executable("cctest") {
"../../test/common/wasm/flag-utils.h",
"../../test/common/wasm/test-signatures.h",
"../../test/common/wasm/wasm-macro-gen.h",
"ast-types-fuzz.h",
"cctest.cc",
"cctest.h",
"compiler/c-signature.h",
......@@ -113,7 +112,6 @@ v8_executable("cctest") {
"test-api.cc",
"test-api.h",
"test-array-list.cc",
"test-ast-types.cc",
"test-ast.cc",
"test-atomicops.cc",
"test-bignum-dtoa.cc",
......
This diff is collapsed.
......@@ -32,7 +32,6 @@
'v8_code': 1,
'generated_file': '<(SHARED_INTERMEDIATE_DIR)/resources.cc',
'cctest_sources': [ ### gcmole(all) ###
'ast-types-fuzz.h',
'compiler/c-signature.h',
'compiler/call-tester.h',
'compiler/codegen-tester.cc',
......@@ -193,7 +192,6 @@
'test-traced-value.cc',
'test-transitions.cc',
'test-typedarrays.cc',
'test-ast-types.cc',
'test-types.cc',
'test-unbound-queue.cc',
'test-unboxed-doubles.cc',
......
......@@ -64,9 +64,7 @@
'test-parsing/ParserSync': [PASS, NO_VARIANTS],
# This tests only the type system, no point in running several variants.
'test-hydrogen-types/*': [PASS, NO_VARIANTS],
'test-types/*': [PASS, NO_VARIANTS],
'test-ast-types/*': [PASS, NO_VARIANTS],
# This tests API threading, no point in running several variants.
'test-api/Threading*': [PASS, SLOW, NO_VARIANTS],
......
This diff is collapsed.
......@@ -2698,17 +2698,6 @@ TEST(TransitionAccessorConstantToSameAccessorConstant) {
TestTransitionTo(transition_op, transition_op, checker);
}
TEST(FieldTypeConvertSimple) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
Zone zone(isolate->allocator(), ZONE_NAME);
CHECK_EQ(FieldType::Any()->Convert(&zone), AstType::NonInternal());
CHECK_EQ(FieldType::None()->Convert(&zone), AstType::None());
}
// TODO(ishell): add this test once IS_ACCESSOR_FIELD_SUPPORTED is supported.
// TEST(TransitionAccessorConstantToAnotherAccessorConstant)
......
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