Remove unused code for AstSentinels and related stuff.

TEST=compiles
Review URL: http://codereview.chromium.org/7792097

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9118 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent ccd2cd8f
...@@ -36,15 +36,6 @@ ...@@ -36,15 +36,6 @@
namespace v8 { namespace v8 {
namespace internal { namespace internal {
AstSentinels::AstSentinels()
: this_proxy_(Isolate::Current(), true),
identifier_proxy_(Isolate::Current(), false),
valid_left_hand_side_sentinel_(Isolate::Current()),
this_property_(Isolate::Current(), &this_proxy_, NULL, 0),
call_sentinel_(Isolate::Current(), NULL, NULL, 0) {
}
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// All the Accept member functions for each syntax tree node type. // All the Accept member functions for each syntax tree node type.
...@@ -101,15 +92,6 @@ VariableProxy::VariableProxy(Isolate* isolate, ...@@ -101,15 +92,6 @@ VariableProxy::VariableProxy(Isolate* isolate,
} }
VariableProxy::VariableProxy(Isolate* isolate, bool is_this)
: Expression(isolate),
var_(NULL),
is_this_(is_this),
inside_with_(false),
is_trivial_(false) {
}
void VariableProxy::BindTo(Variable* var) { void VariableProxy::BindTo(Variable* var) {
ASSERT(var_ == NULL); // must be bound only once ASSERT(var_ == NULL); // must be bound only once
ASSERT(var != NULL); // must bind ASSERT(var != NULL); // must bind
...@@ -487,12 +469,6 @@ bool SharedFunctionInfoLiteral::IsInlineable() const { ...@@ -487,12 +469,6 @@ bool SharedFunctionInfoLiteral::IsInlineable() const {
} }
bool ValidLeftHandSideSentinel::IsInlineable() const {
UNREACHABLE();
return false;
}
bool ForStatement::IsInlineable() const { bool ForStatement::IsInlineable() const {
return (init() == NULL || init()->IsInlineable()) return (init() == NULL || init()->IsInlineable())
&& (cond() == NULL || cond()->IsInlineable()) && (cond() == NULL || cond()->IsInlineable())
......
...@@ -320,20 +320,6 @@ class Expression: public AstNode { ...@@ -320,20 +320,6 @@ class Expression: public AstNode {
}; };
/**
* A sentinel used during pre parsing that represents some expression
* that is a valid left hand side without having to actually build
* the expression.
*/
class ValidLeftHandSideSentinel: public Expression {
public:
explicit ValidLeftHandSideSentinel(Isolate* isolate) : Expression(isolate) {}
virtual bool IsValidLeftHandSide() { return true; }
virtual void Accept(AstVisitor* v) { UNREACHABLE(); }
virtual bool IsInlineable() const;
};
class BreakableStatement: public Statement { class BreakableStatement: public Statement {
public: public:
enum Type { enum Type {
...@@ -1174,24 +1160,11 @@ class VariableProxy: public Expression { ...@@ -1174,24 +1160,11 @@ class VariableProxy: public Expression {
bool is_this, bool is_this,
bool inside_with, bool inside_with,
int position = RelocInfo::kNoPosition); int position = RelocInfo::kNoPosition);
VariableProxy(Isolate* isolate, bool is_this);
friend class Scope; friend class Scope;
}; };
class VariableProxySentinel: public VariableProxy {
public:
virtual bool IsValidLeftHandSide() { return !is_this(); }
private:
VariableProxySentinel(Isolate* isolate, bool is_this)
: VariableProxy(isolate, is_this) { }
friend class AstSentinels;
};
class Slot: public Expression { class Slot: public Expression {
public: public:
enum Type { enum Type {
...@@ -1349,36 +1322,6 @@ class Call: public Expression { ...@@ -1349,36 +1322,6 @@ class Call: public Expression {
}; };
class AstSentinels {
public:
~AstSentinels() { }
// Returns a property singleton property access on 'this'. Used
// during preparsing.
Property* this_property() { return &this_property_; }
VariableProxySentinel* this_proxy() { return &this_proxy_; }
VariableProxySentinel* identifier_proxy() { return &identifier_proxy_; }
ValidLeftHandSideSentinel* valid_left_hand_side_sentinel() {
return &valid_left_hand_side_sentinel_;
}
Call* call_sentinel() { return &call_sentinel_; }
EmptyStatement* empty_statement() { return &empty_statement_; }
private:
AstSentinels();
VariableProxySentinel this_proxy_;
VariableProxySentinel identifier_proxy_;
ValidLeftHandSideSentinel valid_left_hand_side_sentinel_;
Property this_property_;
Call call_sentinel_;
EmptyStatement empty_statement_;
friend class Isolate;
DISALLOW_COPY_AND_ASSIGN(AstSentinels);
};
class CallNew: public Expression { class CallNew: public Expression {
public: public:
CallNew(Isolate* isolate, CallNew(Isolate* isolate,
......
...@@ -1409,7 +1409,6 @@ Isolate::Isolate() ...@@ -1409,7 +1409,6 @@ Isolate::Isolate()
global_handles_(NULL), global_handles_(NULL),
context_switcher_(NULL), context_switcher_(NULL),
thread_manager_(NULL), thread_manager_(NULL),
ast_sentinels_(NULL),
string_tracker_(NULL), string_tracker_(NULL),
regexp_stack_(NULL), regexp_stack_(NULL),
embedder_data_(NULL) { embedder_data_(NULL) {
...@@ -1546,9 +1545,6 @@ Isolate::~Isolate() { ...@@ -1546,9 +1545,6 @@ Isolate::~Isolate() {
delete regexp_stack_; delete regexp_stack_;
regexp_stack_ = NULL; regexp_stack_ = NULL;
delete ast_sentinels_;
ast_sentinels_ = NULL;
delete descriptor_lookup_cache_; delete descriptor_lookup_cache_;
descriptor_lookup_cache_ = NULL; descriptor_lookup_cache_ = NULL;
delete context_slot_cache_; delete context_slot_cache_;
...@@ -1710,7 +1706,6 @@ bool Isolate::Init(Deserializer* des) { ...@@ -1710,7 +1706,6 @@ bool Isolate::Init(Deserializer* des) {
bootstrapper_ = new Bootstrapper(); bootstrapper_ = new Bootstrapper();
handle_scope_implementer_ = new HandleScopeImplementer(this); handle_scope_implementer_ = new HandleScopeImplementer(this);
stub_cache_ = new StubCache(this); stub_cache_ = new StubCache(this);
ast_sentinels_ = new AstSentinels();
regexp_stack_ = new RegExpStack(); regexp_stack_ = new RegExpStack();
regexp_stack_->isolate_ = this; regexp_stack_->isolate_ = this;
......
...@@ -47,7 +47,6 @@ ...@@ -47,7 +47,6 @@
namespace v8 { namespace v8 {
namespace internal { namespace internal {
class AstSentinels;
class Bootstrapper; class Bootstrapper;
class CodeGenerator; class CodeGenerator;
class CodeRange; class CodeRange;
...@@ -878,8 +877,6 @@ class Isolate { ...@@ -878,8 +877,6 @@ class Isolate {
return &objects_string_input_buffer_; return &objects_string_input_buffer_;
} }
AstSentinels* ast_sentinels() { return ast_sentinels_; }
RuntimeState* runtime_state() { return &runtime_state_; } RuntimeState* runtime_state() { return &runtime_state_; }
StaticResource<SafeStringInputBuffer>* compiler_safe_string_input_buffer() { StaticResource<SafeStringInputBuffer>* compiler_safe_string_input_buffer() {
...@@ -1138,7 +1135,6 @@ class Isolate { ...@@ -1138,7 +1135,6 @@ class Isolate {
GlobalHandles* global_handles_; GlobalHandles* global_handles_;
ContextSwitcher* context_switcher_; ContextSwitcher* context_switcher_;
ThreadManager* thread_manager_; ThreadManager* thread_manager_;
AstSentinels* ast_sentinels_;
RuntimeState runtime_state_; RuntimeState runtime_state_;
StaticResource<SafeStringInputBuffer> compiler_safe_string_input_buffer_; StaticResource<SafeStringInputBuffer> compiler_safe_string_input_buffer_;
Builtins builtins_; Builtins builtins_;
......
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