Index: src/variables.h |
diff --git a/src/variables.h b/src/variables.h |
index 67e1a185427381fdf24fbf3f6fb53a6ba553afee..b1ff0db646dc4968b4908f691c0315f220ec0309 100644 |
--- a/src/variables.h |
+++ b/src/variables.h |
@@ -1,4 +1,4 @@ |
-// Copyright 2006-2008 the V8 project authors. All rights reserved. |
+// Copyright 2011 the V8 project authors. All rights reserved. |
// Redistribution and use in source and binary forms, with or without |
// modification, are permitted provided that the following conditions are |
// met: |
@@ -33,46 +33,6 @@ |
namespace v8 { |
namespace internal { |
-// Variables and AST expression nodes can track their "type" to enable |
-// optimizations and removal of redundant checks when generating code. |
- |
-class StaticType { |
- public: |
- enum Kind { |
- UNKNOWN, |
- LIKELY_SMI |
- }; |
- |
- StaticType() : kind_(UNKNOWN) {} |
- |
- bool Is(Kind kind) const { return kind_ == kind; } |
- |
- bool IsKnown() const { return !Is(UNKNOWN); } |
- bool IsUnknown() const { return Is(UNKNOWN); } |
- bool IsLikelySmi() const { return Is(LIKELY_SMI); } |
- |
- void CopyFrom(StaticType* other) { |
- kind_ = other->kind_; |
- } |
- |
- static const char* Type2String(StaticType* type); |
- |
- // LIKELY_SMI accessors |
- void SetAsLikelySmi() { |
- kind_ = LIKELY_SMI; |
- } |
- |
- void SetAsLikelySmiIfUnknown() { |
- if (IsUnknown()) { |
- SetAsLikelySmi(); |
- } |
- } |
- |
- private: |
- Kind kind_; |
-}; |
- |
- |
// The AST refers to variables via VariableProxies - placeholders for the actual |
// variables. Variables themselves are never directly referred to from the AST, |
// they are maintained by scopes, and referred to from VariableProxies and Slots |
@@ -181,8 +141,6 @@ class Variable: public ZoneObject { |
Expression* rewrite() const { return rewrite_; } |
void set_rewrite(Expression* expr) { rewrite_ = expr; } |
- StaticType* type() { return &type_; } |
- |
private: |
Scope* scope_; |
Handle<String> name_; |
@@ -191,9 +149,6 @@ class Variable: public ZoneObject { |
Variable* local_if_not_shadowed_; |
- // Static type information |
- StaticType type_; |
- |
// Code generation. |
// rewrite_ is usually a Slot or a Property, but may be any expression. |
Expression* rewrite_; |