Revision: 9118
Author:   [email protected]
Date:     Fri Sep  2 05:59:05 2011
Log:      Remove unused code for AstSentinels and related stuff.

TEST=compiles
Review URL: http://codereview.chromium.org/7792097
http://code.google.com/p/v8/source/detail?r=9118

Modified:
 /branches/bleeding_edge/src/ast.cc
 /branches/bleeding_edge/src/ast.h
 /branches/bleeding_edge/src/isolate.cc
 /branches/bleeding_edge/src/isolate.h

=======================================
--- /branches/bleeding_edge/src/ast.cc  Mon Aug 22 07:23:37 2011
+++ /branches/bleeding_edge/src/ast.cc  Fri Sep  2 05:59:05 2011
@@ -36,15 +36,6 @@
 namespace v8 {
 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.

@@ -99,15 +90,6 @@
   // Names must be canonicalized for fast equality checks.
   ASSERT(name->IsSymbol());
 }
-
-
-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) {
@@ -485,12 +467,6 @@
 bool SharedFunctionInfoLiteral::IsInlineable() const {
   return false;
 }
-
-
-bool ValidLeftHandSideSentinel::IsInlineable() const {
-  UNREACHABLE();
-  return false;
-}


 bool ForStatement::IsInlineable() const {
=======================================
--- /branches/bleeding_edge/src/ast.h   Thu Sep  1 05:31:18 2011
+++ /branches/bleeding_edge/src/ast.h   Fri Sep  2 05:59:05 2011
@@ -320,20 +320,6 @@
 };


-/**
- * 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 {
  public:
   enum Type {
@@ -1174,24 +1160,11 @@
                 bool is_this,
                 bool inside_with,
                 int position = RelocInfo::kNoPosition);
-  VariableProxy(Isolate* isolate, bool is_this);

   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 {
  public:
   enum Type {
@@ -1349,36 +1322,6 @@
 };


-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 {
  public:
   CallNew(Isolate* isolate,
=======================================
--- /branches/bleeding_edge/src/isolate.cc      Thu Aug 18 05:33:40 2011
+++ /branches/bleeding_edge/src/isolate.cc      Fri Sep  2 05:59:05 2011
@@ -1409,7 +1409,6 @@
       global_handles_(NULL),
       context_switcher_(NULL),
       thread_manager_(NULL),
-      ast_sentinels_(NULL),
       string_tracker_(NULL),
       regexp_stack_(NULL),
       embedder_data_(NULL) {
@@ -1546,9 +1545,6 @@
   delete regexp_stack_;
   regexp_stack_ = NULL;

-  delete ast_sentinels_;
-  ast_sentinels_ = NULL;
-
   delete descriptor_lookup_cache_;
   descriptor_lookup_cache_ = NULL;
   delete context_slot_cache_;
@@ -1710,7 +1706,6 @@
   bootstrapper_ = new Bootstrapper();
   handle_scope_implementer_ = new HandleScopeImplementer(this);
   stub_cache_ = new StubCache(this);
-  ast_sentinels_ = new AstSentinels();
   regexp_stack_ = new RegExpStack();
   regexp_stack_->isolate_ = this;

=======================================
--- /branches/bleeding_edge/src/isolate.h       Thu Aug  4 08:18:18 2011
+++ /branches/bleeding_edge/src/isolate.h       Fri Sep  2 05:59:05 2011
@@ -47,7 +47,6 @@
 namespace v8 {
 namespace internal {

-class AstSentinels;
 class Bootstrapper;
 class CodeGenerator;
 class CodeRange;
@@ -877,8 +876,6 @@
   StaticResource<StringInputBuffer>* objects_string_input_buffer() {
     return &objects_string_input_buffer_;
   }
-
-  AstSentinels* ast_sentinels() { return ast_sentinels_; }

   RuntimeState* runtime_state() { return &runtime_state_; }

@@ -1138,7 +1135,6 @@
   GlobalHandles* global_handles_;
   ContextSwitcher* context_switcher_;
   ThreadManager* thread_manager_;
-  AstSentinels* ast_sentinels_;
   RuntimeState runtime_state_;
   StaticResource<SafeStringInputBuffer> compiler_safe_string_input_buffer_;
   Builtins builtins_;

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to