Index: runtime/vm/kernel.h |
diff --git a/runtime/vm/kernel.h b/runtime/vm/kernel.h |
index e51abf314f653d7615272f3444883c4dc7affef0..49649aff87eb16569b83b8647a9a24ec1cc4a47f 100644 |
--- a/runtime/vm/kernel.h |
+++ b/runtime/vm/kernel.h |
@@ -15,7 +15,6 @@ |
#define KERNEL_NODES_DO(M) \ |
M(Name) \ |
- M(InferredValue) \ |
M(DartType) \ |
M(InvalidType) \ |
M(DynamicType) \ |
@@ -701,7 +700,6 @@ class Field : public Member { |
intptr_t source_uri_index() { return source_uri_index_; } |
DartType* type() { return type_; } |
- InferredValue* inferred_value() { return inferred_value_; } |
Expression* initializer() { return initializer_; } |
private: |
@@ -713,7 +711,6 @@ class Field : public Member { |
word flags_; |
intptr_t source_uri_index_; |
Child<DartType> type_; |
- Child<InferredValue> inferred_value_; |
Child<Expression> initializer_; |
DISALLOW_COPY_AND_ASSIGN(Field); |
@@ -969,7 +966,6 @@ class FunctionNode : public TreeNode { |
} |
List<VariableDeclaration>& named_parameters() { return named_parameters_; } |
DartType* return_type() { return return_type_; } |
- InferredValue* inferred_return_value() { return inferred_return_value_; } |
Statement* body() { return body_; } |
TokenPosition position() { return position_; } |
TokenPosition end_position() { return end_position_; } |
@@ -986,7 +982,6 @@ class FunctionNode : public TreeNode { |
List<VariableDeclaration> positional_parameters_; |
List<VariableDeclaration> named_parameters_; |
Child<DartType> return_type_; |
- Child<InferredValue> inferred_return_value_; |
Child<Statement> body_; |
TokenPosition position_; |
TokenPosition end_position_; |
@@ -2469,7 +2464,6 @@ class VariableDeclaration : public Statement { |
String* name() { return name_; } |
DartType* type() { return type_; } |
- InferredValue* inferred_value() { return inferred_value_; } |
Expression* initializer() { return initializer_; } |
TokenPosition equals_position() { return equals_position_; } |
TokenPosition end_position() { return end_position_; } |
@@ -2486,7 +2480,6 @@ class VariableDeclaration : public Statement { |
word flags_; |
Ref<String> name_; |
Child<DartType> type_; |
- Child<InferredValue> inferred_value_; |
Child<Expression> initializer_; |
TokenPosition equals_position_; |
TokenPosition end_position_; |
@@ -2548,59 +2541,6 @@ class Name : public Node { |
}; |
-class InferredValue : public Node { |
- public: |
- static const uint8_t kNull = 1 << 0; |
- static const uint8_t kInteger = 1 << 1; |
- static const uint8_t kDouble = 1 << 2; |
- static const uint8_t kString = 1 << 3; |
- static const uint8_t kOther = 1 << 4; |
- |
- enum BaseClassKind { |
- kNone, |
- kExact, |
- kSubclass, |
- kSubtype, |
- }; |
- |
- static InferredValue* ReadFrom(Reader* reader); |
- |
- virtual ~InferredValue(); |
- |
- DEFINE_CASTING_OPERATIONS(InferredValue); |
- |
- virtual void AcceptVisitor(Visitor* visitor); |
- virtual void VisitChildren(Visitor* visitor); |
- |
- bool IsInterfaceType() { return kind_ == kSubtype; } |
- bool IsExactClass() { return kind_ == kExact; } |
- bool IsSubclass() { return kind_ == kSubclass; } |
- |
- bool CanBeNull() { return (value_bits_ & kNull) != 0; } |
- bool CanBeInteger() { return (value_bits_ & kInteger) != 0; } |
- bool CanBeDouble() { return (value_bits_ & kDouble) != 0; } |
- bool CanBeString() { return (value_bits_ & kString) != 0; } |
- |
- bool IsAlwaysNull() { return value_bits_ == kNull; } |
- bool IsAlwaysInteger() { return value_bits_ == kInteger; } |
- bool IsAlwaysDouble() { return value_bits_ == kDouble; } |
- bool IsAlwaysString() { return value_bits_ == kString; } |
- |
- Class* klass() { return klass_reference_->AsClass(); } |
- BaseClassKind kind() { return kind_; } |
- uint8_t value_bits() { return value_bits_; } |
- |
- private: |
- InferredValue() {} |
- |
- Ref<CanonicalName> klass_reference_; |
- BaseClassKind kind_; |
- uint8_t value_bits_; |
- |
- DISALLOW_COPY_AND_ASSIGN(InferredValue); |
-}; |
- |
- |
class DartType : public Node { |
public: |
static DartType* ReadFrom(Reader* reader); |
@@ -3146,9 +3086,6 @@ class Visitor : public TreeVisitor, |
virtual ~Visitor() {} |
virtual void VisitDefaultNode(Node* node) = 0; |
- virtual void VisitInferredValue(InferredValue* node) { |
- VisitDefaultNode(node); |
- } |
virtual void VisitDefaultTreeNode(TreeNode* node) { VisitDefaultNode(node); } |
virtual void VisitDefaultDartType(DartType* node) { VisitDefaultNode(node); } |
virtual void VisitName(Name* node) { VisitDefaultNode(node); } |