Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / v8 / src / ast.h
index e18fdc7..03f43ad 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "src/assembler.h"
 #include "src/ast-value-factory.h"
+#include "src/bailout-reason.h"
 #include "src/factory.h"
 #include "src/feedback-slots.h"
 #include "src/interface.h"
@@ -40,12 +41,12 @@ namespace internal {
 // Nodes of the abstract syntax tree. Only concrete classes are
 // enumerated here.
 
-#define DECLARATION_NODE_LIST(V)                \
-  V(VariableDeclaration)                        \
-  V(FunctionDeclaration)                        \
-  V(ModuleDeclaration)                          \
-  V(ImportDeclaration)                          \
-  V(ExportDeclaration)                          \
+#define DECLARATION_NODE_LIST(V) \
+  V(VariableDeclaration)         \
+  V(FunctionDeclaration)         \
+  V(ModuleDeclaration)           \
+  V(ImportDeclaration)           \
+  V(ExportDeclaration)
 
 #define MODULE_NODE_LIST(V)                     \
   V(ModuleLiteral)                              \
@@ -73,27 +74,29 @@ namespace internal {
   V(TryFinallyStatement)                        \
   V(DebuggerStatement)
 
-#define EXPRESSION_NODE_LIST(V)                 \
-  V(FunctionLiteral)                            \
-  V(NativeFunctionLiteral)                      \
-  V(Conditional)                                \
-  V(VariableProxy)                              \
-  V(Literal)                                    \
-  V(RegExpLiteral)                              \
-  V(ObjectLiteral)                              \
-  V(ArrayLiteral)                               \
-  V(Assignment)                                 \
-  V(Yield)                                      \
-  V(Throw)                                      \
-  V(Property)                                   \
-  V(Call)                                       \
-  V(CallNew)                                    \
-  V(CallRuntime)                                \
-  V(UnaryOperation)                             \
-  V(CountOperation)                             \
-  V(BinaryOperation)                            \
-  V(CompareOperation)                           \
-  V(ThisFunction)                               \
+#define EXPRESSION_NODE_LIST(V) \
+  V(FunctionLiteral)            \
+  V(ClassLiteral)               \
+  V(NativeFunctionLiteral)      \
+  V(Conditional)                \
+  V(VariableProxy)              \
+  V(Literal)                    \
+  V(RegExpLiteral)              \
+  V(ObjectLiteral)              \
+  V(ArrayLiteral)               \
+  V(Assignment)                 \
+  V(Yield)                      \
+  V(Throw)                      \
+  V(Property)                   \
+  V(Call)                       \
+  V(CallNew)                    \
+  V(CallRuntime)                \
+  V(UnaryOperation)             \
+  V(CountOperation)             \
+  V(BinaryOperation)            \
+  V(CompareOperation)           \
+  V(ThisFunction)               \
+  V(SuperReference)             \
   V(CaseClause)
 
 #define AST_NODE_LIST(V)                        \
@@ -142,8 +145,8 @@ typedef ZoneList<Handle<Object> > ZoneObjectList;
 
 
 #define DECLARE_NODE_TYPE(type)                                 \
-  virtual void Accept(AstVisitor* v) V8_OVERRIDE;                  \
-  virtual AstNode::NodeType node_type() const V8_FINAL V8_OVERRIDE {  \
+  virtual void Accept(AstVisitor* v) OVERRIDE;                  \
+  virtual AstNode::NodeType node_type() const FINAL OVERRIDE {  \
     return AstNode::k##type;                                    \
   }                                                             \
   template<class> friend class AstNodeFactory;
@@ -156,7 +159,7 @@ enum AstPropertiesFlag {
 };
 
 
-class AstProperties V8_FINAL BASE_EMBEDDED {
+class AstProperties FINAL BASE_EMBEDDED {
  public:
   class Flags : public EnumSet<AstPropertiesFlag, int> {};
 
@@ -180,6 +183,22 @@ AstProperties() : node_count_(0), feedback_slots_(0) {}
 
 class AstNode: public ZoneObject {
  public:
+  // For generating IDs for AstNodes.
+  class IdGen {
+   public:
+    explicit IdGen(int id = 0) : id_(id) {}
+
+    int GetNextId() { return ReserveIdRange(1); }
+    int ReserveIdRange(int n) {
+      int tmp = id_;
+      id_ += n;
+      return tmp;
+    }
+
+   private:
+    int id_;
+  };
+
 #define DECLARE_TYPE_ENUM(type) k##type,
   enum NodeType {
     AST_NODE_LIST(DECLARE_TYPE_ENUM)
@@ -216,16 +235,6 @@ class AstNode: public ZoneObject {
   virtual MaterializedLiteral* AsMaterializedLiteral() { return NULL; }
 
  protected:
-  static int GetNextId(Zone* zone) {
-    return ReserveIdRange(zone, 1);
-  }
-
-  static int ReserveIdRange(Zone* zone, int n) {
-    int tmp = zone->isolate()->ast_node_id();
-    zone->isolate()->set_ast_node_id(tmp + n);
-    return tmp;
-  }
-
   // Some nodes re-use bailout IDs for type feedback.
   static TypeFeedbackId reuse(BailoutId id) {
     return TypeFeedbackId(id.ToInt());
@@ -252,7 +261,7 @@ class Statement : public AstNode {
 };
 
 
-class SmallMapList V8_FINAL {
+class SmallMapList FINAL {
  public:
   SmallMapList() {}
   SmallMapList(int capacity, Zone* zone) : list_(capacity, zone) {}
@@ -371,17 +380,14 @@ class Expression : public AstNode {
   TypeFeedbackId test_id() const { return test_id_; }
 
  protected:
-  Expression(Zone* zone, int pos)
+  Expression(Zone* zone, int pos, IdGen* id_gen)
       : AstNode(pos),
-        zone_(zone),
         bounds_(Bounds::Unbounded(zone)),
         parenthesization_level_(0),
-        id_(GetNextId(zone)),
-        test_id_(GetNextId(zone)) {}
+        id_(id_gen->GetNextId()),
+        test_id_(id_gen->GetNextId()) {}
   void set_to_boolean_types(byte types) { to_boolean_types_ = types; }
 
-  Zone* zone_;
-
  private:
   Bounds bounds_;
   byte to_boolean_types_;
@@ -404,7 +410,7 @@ class BreakableStatement : public Statement {
   ZoneList<const AstRawString*>* labels() const { return labels_; }
 
   // Type testing & conversion.
-  virtual BreakableStatement* AsBreakableStatement() V8_FINAL V8_OVERRIDE {
+  virtual BreakableStatement* AsBreakableStatement() FINAL OVERRIDE {
     return this;
   }
 
@@ -420,14 +426,13 @@ class BreakableStatement : public Statement {
   BailoutId ExitId() const { return exit_id_; }
 
  protected:
-  BreakableStatement(
-      Zone* zone, ZoneList<const AstRawString*>* labels,
-      BreakableType breakable_type, int position)
+  BreakableStatement(Zone* zone, ZoneList<const AstRawString*>* labels,
+                     BreakableType breakable_type, int position, IdGen* id_gen)
       : Statement(zone, position),
         labels_(labels),
         breakable_type_(breakable_type),
-        entry_id_(GetNextId(zone)),
-        exit_id_(GetNextId(zone)) {
+        entry_id_(id_gen->GetNextId()),
+        exit_id_(id_gen->GetNextId()) {
     DCHECK(labels == NULL || labels->length() > 0);
   }
 
@@ -441,7 +446,7 @@ class BreakableStatement : public Statement {
 };
 
 
-class Block V8_FINAL : public BreakableStatement {
+class Block FINAL : public BreakableStatement {
  public:
   DECLARE_NODE_TYPE(Block)
 
@@ -454,7 +459,7 @@ class Block V8_FINAL : public BreakableStatement {
 
   BailoutId DeclsId() const { return decls_id_; }
 
-  virtual bool IsJump() const V8_OVERRIDE {
+  virtual bool IsJump() const OVERRIDE {
     return !statements_.is_empty() && statements_.last()->IsJump()
         && labels() == NULL;  // Good enough as an approximation...
   }
@@ -463,17 +468,13 @@ class Block V8_FINAL : public BreakableStatement {
   void set_scope(Scope* scope) { scope_ = scope; }
 
  protected:
-  Block(Zone* zone,
-        ZoneList<const AstRawString*>* labels,
-        int capacity,
-        bool is_initializer_block,
-        int pos)
-      : BreakableStatement(zone, labels, TARGET_FOR_NAMED_ONLY, pos),
+  Block(Zone* zone, ZoneList<const AstRawString*>* labels, int capacity,
+        bool is_initializer_block, int pos, IdGen* id_gen)
+      : BreakableStatement(zone, labels, TARGET_FOR_NAMED_ONLY, pos, id_gen),
         statements_(capacity, zone),
         is_initializer_block_(is_initializer_block),
-        decls_id_(GetNextId(zone)),
-        scope_(NULL) {
-  }
+        decls_id_(id_gen->GetNextId()),
+        scope_(NULL) {}
 
  private:
   ZoneList<Statement*> statements_;
@@ -513,11 +514,11 @@ class Declaration : public AstNode {
 };
 
 
-class VariableDeclaration V8_FINAL : public Declaration {
+class VariableDeclaration FINAL : public Declaration {
  public:
   DECLARE_NODE_TYPE(VariableDeclaration)
 
-  virtual InitializationFlag initialization() const V8_OVERRIDE {
+  virtual InitializationFlag initialization() const OVERRIDE {
     return mode() == VAR ? kCreatedInitialized : kNeedsInitialization;
   }
 
@@ -532,15 +533,15 @@ class VariableDeclaration V8_FINAL : public Declaration {
 };
 
 
-class FunctionDeclaration V8_FINAL : public Declaration {
+class FunctionDeclaration FINAL : public Declaration {
  public:
   DECLARE_NODE_TYPE(FunctionDeclaration)
 
   FunctionLiteral* fun() const { return fun_; }
-  virtual InitializationFlag initialization() const V8_OVERRIDE {
+  virtual InitializationFlag initialization() const OVERRIDE {
     return kCreatedInitialized;
   }
-  virtual bool IsInlineable() const V8_OVERRIDE;
+  virtual bool IsInlineable() const OVERRIDE;
 
  protected:
   FunctionDeclaration(Zone* zone,
@@ -561,12 +562,12 @@ class FunctionDeclaration V8_FINAL : public Declaration {
 };
 
 
-class ModuleDeclaration V8_FINAL : public Declaration {
+class ModuleDeclaration FINAL : public Declaration {
  public:
   DECLARE_NODE_TYPE(ModuleDeclaration)
 
   Module* module() const { return module_; }
-  virtual InitializationFlag initialization() const V8_OVERRIDE {
+  virtual InitializationFlag initialization() const OVERRIDE {
     return kCreatedInitialized;
   }
 
@@ -585,12 +586,12 @@ class ModuleDeclaration V8_FINAL : public Declaration {
 };
 
 
-class ImportDeclaration V8_FINAL : public Declaration {
+class ImportDeclaration FINAL : public Declaration {
  public:
   DECLARE_NODE_TYPE(ImportDeclaration)
 
   Module* module() const { return module_; }
-  virtual InitializationFlag initialization() const V8_OVERRIDE {
+  virtual InitializationFlag initialization() const OVERRIDE {
     return kCreatedInitialized;
   }
 
@@ -609,11 +610,11 @@ class ImportDeclaration V8_FINAL : public Declaration {
 };
 
 
-class ExportDeclaration V8_FINAL : public Declaration {
+class ExportDeclaration FINAL : public Declaration {
  public:
   DECLARE_NODE_TYPE(ExportDeclaration)
 
-  virtual InitializationFlag initialization() const V8_OVERRIDE {
+  virtual InitializationFlag initialization() const OVERRIDE {
     return kCreatedInitialized;
   }
 
@@ -644,7 +645,7 @@ class Module : public AstNode {
 };
 
 
-class ModuleLiteral V8_FINAL : public Module {
+class ModuleLiteral FINAL : public Module {
  public:
   DECLARE_NODE_TYPE(ModuleLiteral)
 
@@ -654,7 +655,7 @@ class ModuleLiteral V8_FINAL : public Module {
 };
 
 
-class ModuleVariable V8_FINAL : public Module {
+class ModuleVariable FINAL : public Module {
  public:
   DECLARE_NODE_TYPE(ModuleVariable)
 
@@ -668,7 +669,7 @@ class ModuleVariable V8_FINAL : public Module {
 };
 
 
-class ModulePath V8_FINAL : public Module {
+class ModulePath FINAL : public Module {
  public:
   DECLARE_NODE_TYPE(ModulePath)
 
@@ -685,7 +686,7 @@ class ModulePath V8_FINAL : public Module {
 };
 
 
-class ModuleUrl V8_FINAL : public Module {
+class ModuleUrl FINAL : public Module {
  public:
   DECLARE_NODE_TYPE(ModuleUrl)
 
@@ -701,7 +702,7 @@ class ModuleUrl V8_FINAL : public Module {
 };
 
 
-class ModuleStatement V8_FINAL : public Statement {
+class ModuleStatement FINAL : public Statement {
  public:
   DECLARE_NODE_TYPE(ModuleStatement)
 
@@ -724,7 +725,7 @@ class ModuleStatement V8_FINAL : public Statement {
 class IterationStatement : public BreakableStatement {
  public:
   // Type testing & conversion.
-  virtual IterationStatement* AsIterationStatement() V8_FINAL V8_OVERRIDE {
+  virtual IterationStatement* AsIterationStatement() FINAL OVERRIDE {
     return this;
   }
 
@@ -738,11 +739,11 @@ class IterationStatement : public BreakableStatement {
   Label* continue_target()  { return &continue_target_; }
 
  protected:
-  IterationStatement(Zone* zone, ZoneList<const AstRawString*>* labels, int pos)
-      : BreakableStatement(zone, labels, TARGET_FOR_ANONYMOUS, pos),
+  IterationStatement(Zone* zone, ZoneList<const AstRawString*>* labels, int pos,
+                     IdGen* id_gen)
+      : BreakableStatement(zone, labels, TARGET_FOR_ANONYMOUS, pos, id_gen),
         body_(NULL),
-        osr_entry_id_(GetNextId(zone)) {
-  }
+        osr_entry_id_(id_gen->GetNextId()) {}
 
   void Initialize(Statement* body) {
     body_ = body;
@@ -756,7 +757,7 @@ class IterationStatement : public BreakableStatement {
 };
 
 
-class DoWhileStatement V8_FINAL : public IterationStatement {
+class DoWhileStatement FINAL : public IterationStatement {
  public:
   DECLARE_NODE_TYPE(DoWhileStatement)
 
@@ -767,17 +768,17 @@ class DoWhileStatement V8_FINAL : public IterationStatement {
 
   Expression* cond() const { return cond_; }
 
-  virtual BailoutId ContinueId() const V8_OVERRIDE { return continue_id_; }
-  virtual BailoutId StackCheckId() const V8_OVERRIDE { return back_edge_id_; }
+  virtual BailoutId ContinueId() const OVERRIDE { return continue_id_; }
+  virtual BailoutId StackCheckId() const OVERRIDE { return back_edge_id_; }
   BailoutId BackEdgeId() const { return back_edge_id_; }
 
  protected:
-  DoWhileStatement(Zone* zone, ZoneList<const AstRawString*>* labels, int pos)
-      : IterationStatement(zone, labels, pos),
+  DoWhileStatement(Zone* zone, ZoneList<const AstRawString*>* labels, int pos,
+                   IdGen* id_gen)
+      : IterationStatement(zone, labels, pos, id_gen),
         cond_(NULL),
-        continue_id_(GetNextId(zone)),
-        back_edge_id_(GetNextId(zone)) {
-  }
+        continue_id_(id_gen->GetNextId()),
+        back_edge_id_(id_gen->GetNextId()) {}
 
  private:
   Expression* cond_;
@@ -787,7 +788,7 @@ class DoWhileStatement V8_FINAL : public IterationStatement {
 };
 
 
-class WhileStatement V8_FINAL : public IterationStatement {
+class WhileStatement FINAL : public IterationStatement {
  public:
   DECLARE_NODE_TYPE(WhileStatement)
 
@@ -804,17 +805,17 @@ class WhileStatement V8_FINAL : public IterationStatement {
     may_have_function_literal_ = value;
   }
 
-  virtual BailoutId ContinueId() const V8_OVERRIDE { return EntryId(); }
-  virtual BailoutId StackCheckId() const V8_OVERRIDE { return body_id_; }
+  virtual BailoutId ContinueId() const OVERRIDE { return EntryId(); }
+  virtual BailoutId StackCheckId() const OVERRIDE { return body_id_; }
   BailoutId BodyId() const { return body_id_; }
 
  protected:
-  WhileStatement(Zone* zone, ZoneList<const AstRawString*>* labels, int pos)
-      : IterationStatement(zone, labels, pos),
+  WhileStatement(Zone* zone, ZoneList<const AstRawString*>* labels, int pos,
+                 IdGen* id_gen)
+      : IterationStatement(zone, labels, pos, id_gen),
         cond_(NULL),
         may_have_function_literal_(true),
-        body_id_(GetNextId(zone)) {
-  }
+        body_id_(id_gen->GetNextId()) {}
 
  private:
   Expression* cond_;
@@ -826,7 +827,7 @@ class WhileStatement V8_FINAL : public IterationStatement {
 };
 
 
-class ForStatement V8_FINAL : public IterationStatement {
+class ForStatement FINAL : public IterationStatement {
  public:
   DECLARE_NODE_TYPE(ForStatement)
 
@@ -851,8 +852,8 @@ class ForStatement V8_FINAL : public IterationStatement {
     may_have_function_literal_ = value;
   }
 
-  virtual BailoutId ContinueId() const V8_OVERRIDE { return continue_id_; }
-  virtual BailoutId StackCheckId() const V8_OVERRIDE { return body_id_; }
+  virtual BailoutId ContinueId() const OVERRIDE { return continue_id_; }
+  virtual BailoutId StackCheckId() const OVERRIDE { return body_id_; }
   BailoutId BodyId() const { return body_id_; }
 
   bool is_fast_smi_loop() { return loop_variable_ != NULL; }
@@ -860,16 +861,16 @@ class ForStatement V8_FINAL : public IterationStatement {
   void set_loop_variable(Variable* var) { loop_variable_ = var; }
 
  protected:
-  ForStatement(Zone* zone, ZoneList<const AstRawString*>* labels, int pos)
-      : IterationStatement(zone, labels, pos),
+  ForStatement(Zone* zone, ZoneList<const AstRawString*>* labels, int pos,
+               IdGen* id_gen)
+      : IterationStatement(zone, labels, pos, id_gen),
         init_(NULL),
         cond_(NULL),
         next_(NULL),
         may_have_function_literal_(true),
         loop_variable_(NULL),
-        continue_id_(GetNextId(zone)),
-        body_id_(GetNextId(zone)) {
-  }
+        continue_id_(id_gen->GetNextId()),
+        body_id_(id_gen->GetNextId()) {}
 
  private:
   Statement* init_;
@@ -902,8 +903,11 @@ class ForEachStatement : public IterationStatement {
   Expression* subject() const { return subject_; }
 
  protected:
-  ForEachStatement(Zone* zone, ZoneList<const AstRawString*>* labels, int pos)
-      : IterationStatement(zone, labels, pos), each_(NULL), subject_(NULL) {}
+  ForEachStatement(Zone* zone, ZoneList<const AstRawString*>* labels, int pos,
+                   IdGen* id_gen)
+      : IterationStatement(zone, labels, pos, id_gen),
+        each_(NULL),
+        subject_(NULL) {}
 
  private:
   Expression* each_;
@@ -911,7 +915,7 @@ class ForEachStatement : public IterationStatement {
 };
 
 
-class ForInStatement V8_FINAL : public ForEachStatement,
+class ForInStatement FINAL : public ForEachStatement,
     public FeedbackSlotInterface {
  public:
   DECLARE_NODE_TYPE(ForInStatement)
@@ -935,17 +939,17 @@ class ForInStatement V8_FINAL : public ForEachStatement,
 
   BailoutId BodyId() const { return body_id_; }
   BailoutId PrepareId() const { return prepare_id_; }
-  virtual BailoutId ContinueId() const V8_OVERRIDE { return EntryId(); }
-  virtual BailoutId StackCheckId() const V8_OVERRIDE { return body_id_; }
+  virtual BailoutId ContinueId() const OVERRIDE { return EntryId(); }
+  virtual BailoutId StackCheckId() const OVERRIDE { return body_id_; }
 
  protected:
-  ForInStatement(Zone* zone, ZoneList<const AstRawString*>* labels, int pos)
-      : ForEachStatement(zone, labels, pos),
+  ForInStatement(Zone* zone, ZoneList<const AstRawString*>* labels, int pos,
+                 IdGen* id_gen)
+      : ForEachStatement(zone, labels, pos, id_gen),
         for_in_type_(SLOW_FOR_IN),
         for_in_feedback_slot_(kInvalidFeedbackSlot),
-        body_id_(GetNextId(zone)),
-        prepare_id_(GetNextId(zone)) {
-  }
+        body_id_(id_gen->GetNextId()),
+        prepare_id_(id_gen->GetNextId()) {}
 
   ForInType for_in_type_;
   int for_in_feedback_slot_;
@@ -954,7 +958,7 @@ class ForInStatement V8_FINAL : public ForEachStatement,
 };
 
 
-class ForOfStatement V8_FINAL : public ForEachStatement {
+class ForOfStatement FINAL : public ForEachStatement {
  public:
   DECLARE_NODE_TYPE(ForOfStatement)
 
@@ -996,20 +1000,20 @@ class ForOfStatement V8_FINAL : public ForEachStatement {
     return assign_each_;
   }
 
-  virtual BailoutId ContinueId() const V8_OVERRIDE { return EntryId(); }
-  virtual BailoutId StackCheckId() const V8_OVERRIDE { return BackEdgeId(); }
+  virtual BailoutId ContinueId() const OVERRIDE { return EntryId(); }
+  virtual BailoutId StackCheckId() const OVERRIDE { return BackEdgeId(); }
 
   BailoutId BackEdgeId() const { return back_edge_id_; }
 
  protected:
-  ForOfStatement(Zone* zone, ZoneList<const AstRawString*>* labels, int pos)
-      : ForEachStatement(zone, labels, pos),
+  ForOfStatement(Zone* zone, ZoneList<const AstRawString*>* labels, int pos,
+                 IdGen* id_gen)
+      : ForEachStatement(zone, labels, pos, id_gen),
         assign_iterator_(NULL),
         next_result_(NULL),
         result_done_(NULL),
         assign_each_(NULL),
-        back_edge_id_(GetNextId(zone)) {
-  }
+        back_edge_id_(id_gen->GetNextId()) {}
 
   Expression* assign_iterator_;
   Expression* next_result_;
@@ -1019,13 +1023,13 @@ class ForOfStatement V8_FINAL : public ForEachStatement {
 };
 
 
-class ExpressionStatement V8_FINAL : public Statement {
+class ExpressionStatement FINAL : public Statement {
  public:
   DECLARE_NODE_TYPE(ExpressionStatement)
 
   void set_expression(Expression* e) { expression_ = e; }
   Expression* expression() const { return expression_; }
-  virtual bool IsJump() const V8_OVERRIDE { return expression_->IsThrow(); }
+  virtual bool IsJump() const OVERRIDE { return expression_->IsThrow(); }
 
  protected:
   ExpressionStatement(Zone* zone, Expression* expression, int pos)
@@ -1038,14 +1042,14 @@ class ExpressionStatement V8_FINAL : public Statement {
 
 class JumpStatement : public Statement {
  public:
-  virtual bool IsJump() const V8_FINAL V8_OVERRIDE { return true; }
+  virtual bool IsJump() const FINAL OVERRIDE { return true; }
 
  protected:
   explicit JumpStatement(Zone* zone, int pos) : Statement(zone, pos) {}
 };
 
 
-class ContinueStatement V8_FINAL : public JumpStatement {
+class ContinueStatement FINAL : public JumpStatement {
  public:
   DECLARE_NODE_TYPE(ContinueStatement)
 
@@ -1060,7 +1064,7 @@ class ContinueStatement V8_FINAL : public JumpStatement {
 };
 
 
-class BreakStatement V8_FINAL : public JumpStatement {
+class BreakStatement FINAL : public JumpStatement {
  public:
   DECLARE_NODE_TYPE(BreakStatement)
 
@@ -1075,7 +1079,7 @@ class BreakStatement V8_FINAL : public JumpStatement {
 };
 
 
-class ReturnStatement V8_FINAL : public JumpStatement {
+class ReturnStatement FINAL : public JumpStatement {
  public:
   DECLARE_NODE_TYPE(ReturnStatement)
 
@@ -1090,7 +1094,7 @@ class ReturnStatement V8_FINAL : public JumpStatement {
 };
 
 
-class WithStatement V8_FINAL : public Statement {
+class WithStatement FINAL : public Statement {
  public:
   DECLARE_NODE_TYPE(WithStatement)
 
@@ -1114,7 +1118,7 @@ class WithStatement V8_FINAL : public Statement {
 };
 
 
-class CaseClause V8_FINAL : public Expression {
+class CaseClause FINAL : public Expression {
  public:
   DECLARE_NODE_TYPE(CaseClause)
 
@@ -1134,10 +1138,8 @@ class CaseClause V8_FINAL : public Expression {
   void set_compare_type(Type* type) { compare_type_ = type; }
 
  private:
-  CaseClause(Zone* zone,
-             Expression* label,
-             ZoneList<Statement*>* statements,
-             int pos);
+  CaseClause(Zone* zone, Expression* label, ZoneList<Statement*>* statements,
+             int pos, IdGen* id_gen);
 
   Expression* label_;
   Label body_target_;
@@ -1149,7 +1151,7 @@ class CaseClause V8_FINAL : public Expression {
 };
 
 
-class SwitchStatement V8_FINAL : public BreakableStatement {
+class SwitchStatement FINAL : public BreakableStatement {
  public:
   DECLARE_NODE_TYPE(SwitchStatement)
 
@@ -1162,10 +1164,11 @@ class SwitchStatement V8_FINAL : public BreakableStatement {
   ZoneList<CaseClause*>* cases() const { return cases_; }
 
  protected:
-  SwitchStatement(Zone* zone, ZoneList<const AstRawString*>* labels, int pos)
-      : BreakableStatement(zone, labels, TARGET_FOR_ANONYMOUS, pos),
+  SwitchStatement(Zone* zone, ZoneList<const AstRawString*>* labels, int pos,
+                  IdGen* id_gen)
+      : BreakableStatement(zone, labels, TARGET_FOR_ANONYMOUS, pos, id_gen),
         tag_(NULL),
-        cases_(NULL) { }
+        cases_(NULL) {}
 
  private:
   Expression* tag_;
@@ -1178,7 +1181,7 @@ class SwitchStatement V8_FINAL : public BreakableStatement {
 // the parser implicitly creates an empty statement. Use the
 // HasThenStatement() and HasElseStatement() functions to check if a
 // given if-statement has a then- or an else-part containing code.
-class IfStatement V8_FINAL : public Statement {
+class IfStatement FINAL : public Statement {
  public:
   DECLARE_NODE_TYPE(IfStatement)
 
@@ -1189,7 +1192,7 @@ class IfStatement V8_FINAL : public Statement {
   Statement* then_statement() const { return then_statement_; }
   Statement* else_statement() const { return else_statement_; }
 
-  virtual bool IsJump() const V8_OVERRIDE {
+  virtual bool IsJump() const OVERRIDE {
     return HasThenStatement() && then_statement()->IsJump()
         && HasElseStatement() && else_statement()->IsJump();
   }
@@ -1199,19 +1202,15 @@ class IfStatement V8_FINAL : public Statement {
   BailoutId ElseId() const { return else_id_; }
 
  protected:
-  IfStatement(Zone* zone,
-              Expression* condition,
-              Statement* then_statement,
-              Statement* else_statement,
-              int pos)
+  IfStatement(Zone* zone, Expression* condition, Statement* then_statement,
+              Statement* else_statement, int pos, IdGen* id_gen)
       : Statement(zone, pos),
         condition_(condition),
         then_statement_(then_statement),
         else_statement_(else_statement),
-        if_id_(GetNextId(zone)),
-        then_id_(GetNextId(zone)),
-        else_id_(GetNextId(zone)) {
-  }
+        if_id_(id_gen->GetNextId()),
+        then_id_(id_gen->GetNextId()),
+        else_id_(id_gen->GetNextId()) {}
 
  private:
   Expression* condition_;
@@ -1225,7 +1224,7 @@ class IfStatement V8_FINAL : public Statement {
 
 // NOTE: TargetCollectors are represented as nodes to fit in the target
 // stack in the compiler; this should probably be reworked.
-class TargetCollector V8_FINAL : public AstNode {
+class TargetCollector FINAL : public AstNode {
  public:
   explicit TargetCollector(Zone* zone)
       : AstNode(RelocInfo::kNoPosition), targets_(0, zone) { }
@@ -1236,9 +1235,9 @@ class TargetCollector V8_FINAL : public AstNode {
   void AddTarget(Label* target, Zone* zone);
 
   // Virtual behaviour. TargetCollectors are never part of the AST.
-  virtual void Accept(AstVisitor* v) V8_OVERRIDE { UNREACHABLE(); }
-  virtual NodeType node_type() const V8_OVERRIDE { return kInvalid; }
-  virtual TargetCollector* AsTargetCollector() V8_OVERRIDE { return this; }
+  virtual void Accept(AstVisitor* v) OVERRIDE { UNREACHABLE(); }
+  virtual NodeType node_type() const OVERRIDE { return kInvalid; }
+  virtual TargetCollector* AsTargetCollector() OVERRIDE { return this; }
 
   ZoneList<Label*>* targets() { return &targets_; }
 
@@ -1273,7 +1272,7 @@ class TryStatement : public Statement {
 };
 
 
-class TryCatchStatement V8_FINAL : public TryStatement {
+class TryCatchStatement FINAL : public TryStatement {
  public:
   DECLARE_NODE_TYPE(TryCatchStatement)
 
@@ -1302,7 +1301,7 @@ class TryCatchStatement V8_FINAL : public TryStatement {
 };
 
 
-class TryFinallyStatement V8_FINAL : public TryStatement {
+class TryFinallyStatement FINAL : public TryStatement {
  public:
   DECLARE_NODE_TYPE(TryFinallyStatement)
 
@@ -1319,16 +1318,22 @@ class TryFinallyStatement V8_FINAL : public TryStatement {
 };
 
 
-class DebuggerStatement V8_FINAL : public Statement {
+class DebuggerStatement FINAL : public Statement {
  public:
   DECLARE_NODE_TYPE(DebuggerStatement)
 
+  BailoutId DebugBreakId() const { return debugger_id_; }
+
  protected:
-  explicit DebuggerStatement(Zone* zone, int pos): Statement(zone, pos) {}
+  explicit DebuggerStatement(Zone* zone, int pos, IdGen* id_gen)
+      : Statement(zone, pos), debugger_id_(id_gen->GetNextId()) {}
+
+ private:
+  const BailoutId debugger_id_;
 };
 
 
-class EmptyStatement V8_FINAL : public Statement {
+class EmptyStatement FINAL : public Statement {
  public:
   DECLARE_NODE_TYPE(EmptyStatement)
 
@@ -1337,11 +1342,11 @@ class EmptyStatement V8_FINAL : public Statement {
 };
 
 
-class Literal V8_FINAL : public Expression {
+class Literal FINAL : public Expression {
  public:
   DECLARE_NODE_TYPE(Literal)
 
-  virtual bool IsPropertyName() const V8_OVERRIDE {
+  virtual bool IsPropertyName() const OVERRIDE {
     return value_->IsPropertyName();
   }
 
@@ -1355,10 +1360,10 @@ class Literal V8_FINAL : public Expression {
     return value_->AsString();
   }
 
-  virtual bool ToBooleanIsTrue() const V8_OVERRIDE {
+  virtual bool ToBooleanIsTrue() const OVERRIDE {
     return value()->BooleanValue();
   }
-  virtual bool ToBooleanIsFalse() const V8_OVERRIDE {
+  virtual bool ToBooleanIsFalse() const OVERRIDE {
     return !value()->BooleanValue();
   }
 
@@ -1378,10 +1383,10 @@ class Literal V8_FINAL : public Expression {
   TypeFeedbackId LiteralFeedbackId() const { return reuse(id()); }
 
  protected:
-  Literal(Zone* zone, const AstValue* value, int position)
-      : Expression(zone, position),
+  Literal(Zone* zone, const AstValue* value, int position, IdGen* id_gen)
+      : Expression(zone, position, id_gen),
         value_(value),
-        isolate_(zone->isolate()) { }
+        isolate_(zone->isolate()) {}
 
  private:
   Handle<String> ToString();
@@ -1406,10 +1411,8 @@ class MaterializedLiteral : public Expression {
   }
 
  protected:
-  MaterializedLiteral(Zone* zone,
-                      int literal_index,
-                      int pos)
-      : Expression(zone, pos),
+  MaterializedLiteral(Zone* zone, int literal_index, int pos, IdGen* id_gen)
+      : Expression(zone, pos, id_gen),
         literal_index_(literal_index),
         is_simple_(false),
         depth_(0) {}
@@ -1447,7 +1450,7 @@ class MaterializedLiteral : public Expression {
 // Property is used for passing information
 // about an object literal's properties from the parser
 // to the code generator.
-class ObjectLiteralProperty V8_FINAL : public ZoneObject {
+class ObjectLiteralProperty FINAL : public ZoneObject {
  public:
   enum Kind {
     CONSTANT,              // Property with constant value (compile time).
@@ -1458,7 +1461,7 @@ class ObjectLiteralProperty V8_FINAL : public ZoneObject {
   };
 
   ObjectLiteralProperty(Zone* zone, AstValueFactory* ast_value_factory,
-                        Literal* key, Expression* value);
+                        Literal* key, Expression* value, bool is_static);
 
   Literal* key() { return key_; }
   Expression* value() { return value_; }
@@ -1477,7 +1480,8 @@ class ObjectLiteralProperty V8_FINAL : public ZoneObject {
  protected:
   template<class> friend class AstNodeFactory;
 
-  ObjectLiteralProperty(Zone* zone, bool is_getter, FunctionLiteral* value);
+  ObjectLiteralProperty(Zone* zone, bool is_getter, FunctionLiteral* value,
+                        bool is_static);
   void set_key(Literal* key) { key_ = key; }
 
  private:
@@ -1485,13 +1489,14 @@ class ObjectLiteralProperty V8_FINAL : public ZoneObject {
   Expression* value_;
   Kind kind_;
   bool emit_store_;
+  bool is_static_;
   Handle<Map> receiver_type_;
 };
 
 
 // An object literal has a boilerplate object that is used
 // for minimizing the work when constructing it at runtime.
-class ObjectLiteral V8_FINAL : public MaterializedLiteral {
+class ObjectLiteral FINAL : public MaterializedLiteral {
  public:
   typedef ObjectLiteralProperty Property;
 
@@ -1536,13 +1541,10 @@ class ObjectLiteral V8_FINAL : public MaterializedLiteral {
   };
 
  protected:
-  ObjectLiteral(Zone* zone,
-                ZoneList<Property*>* properties,
-                int literal_index,
-                int boilerplate_properties,
-                bool has_function,
-                int pos)
-      : MaterializedLiteral(zone, literal_index, pos),
+  ObjectLiteral(Zone* zone, ZoneList<Property*>* properties, int literal_index,
+                int boilerplate_properties, bool has_function, int pos,
+                IdGen* id_gen)
+      : MaterializedLiteral(zone, literal_index, pos, id_gen),
         properties_(properties),
         boilerplate_properties_(boilerplate_properties),
         fast_elements_(false),
@@ -1560,7 +1562,7 @@ class ObjectLiteral V8_FINAL : public MaterializedLiteral {
 
 
 // Node for capturing a regexp literal.
-class RegExpLiteral V8_FINAL : public MaterializedLiteral {
+class RegExpLiteral FINAL : public MaterializedLiteral {
  public:
   DECLARE_NODE_TYPE(RegExpLiteral)
 
@@ -1568,12 +1570,10 @@ class RegExpLiteral V8_FINAL : public MaterializedLiteral {
   Handle<String> flags() const { return flags_->string(); }
 
  protected:
-  RegExpLiteral(Zone* zone,
-                const AstRawString* pattern,
-                const AstRawString* flags,
-                int literal_index,
-                int pos)
-      : MaterializedLiteral(zone, literal_index, pos),
+  RegExpLiteral(Zone* zone, const AstRawString* pattern,
+                const AstRawString* flags, int literal_index, int pos,
+                IdGen* id_gen)
+      : MaterializedLiteral(zone, literal_index, pos, id_gen),
         pattern_(pattern),
         flags_(flags) {
     set_depth(1);
@@ -1587,7 +1587,7 @@ class RegExpLiteral V8_FINAL : public MaterializedLiteral {
 
 // An array literal has a literals object that is used
 // for minimizing the work when constructing it at runtime.
-class ArrayLiteral V8_FINAL : public MaterializedLiteral {
+class ArrayLiteral FINAL : public MaterializedLiteral {
  public:
   DECLARE_NODE_TYPE(ArrayLiteral)
 
@@ -1616,13 +1616,11 @@ class ArrayLiteral V8_FINAL : public MaterializedLiteral {
   };
 
  protected:
-  ArrayLiteral(Zone* zone,
-               ZoneList<Expression*>* values,
-               int literal_index,
-               int pos)
-      : MaterializedLiteral(zone, literal_index, pos),
+  ArrayLiteral(Zone* zone, ZoneList<Expression*>* values, int literal_index,
+               int pos, IdGen* id_gen)
+      : MaterializedLiteral(zone, literal_index, pos, id_gen),
         values_(values),
-        first_element_id_(ReserveIdRange(zone, values->length())) {}
+        first_element_id_(id_gen->ReserveIdRange(values->length())) {}
 
  private:
   Handle<FixedArray> constant_elements_;
@@ -1631,11 +1629,11 @@ class ArrayLiteral V8_FINAL : public MaterializedLiteral {
 };
 
 
-class VariableProxy V8_FINAL : public Expression, public FeedbackSlotInterface {
+class VariableProxy FINAL : public Expression, public FeedbackSlotInterface {
  public:
   DECLARE_NODE_TYPE(VariableProxy)
 
-  virtual bool IsValidReferenceExpression() const V8_OVERRIDE {
+  virtual bool IsValidReferenceExpression() const OVERRIDE {
     return var_ == NULL ? true : var_->IsValidReference();
   }
 
@@ -1661,13 +1659,10 @@ class VariableProxy V8_FINAL : public Expression, public FeedbackSlotInterface {
   int VariableFeedbackSlot() { return variable_feedback_slot_; }
 
  protected:
-  VariableProxy(Zone* zone, Variable* var, int position);
+  VariableProxy(Zone* zone, Variable* var, int position, IdGen* id_gen);
 
-  VariableProxy(Zone* zone,
-                const AstRawString* name,
-                bool is_this,
-                Interface* interface,
-                int position);
+  VariableProxy(Zone* zone, const AstRawString* name, bool is_this,
+                Interface* interface, int position, IdGen* id_gen);
 
   const AstRawString* name_;
   Variable* var_;  // resolved variable, or NULL
@@ -1678,11 +1673,11 @@ class VariableProxy V8_FINAL : public Expression, public FeedbackSlotInterface {
 };
 
 
-class Property V8_FINAL : public Expression, public FeedbackSlotInterface {
+class Property FINAL : public Expression, public FeedbackSlotInterface {
  public:
   DECLARE_NODE_TYPE(Property)
 
-  virtual bool IsValidReferenceExpression() const V8_OVERRIDE { return true; }
+  virtual bool IsValidReferenceExpression() const OVERRIDE { return true; }
 
   Expression* obj() const { return obj_; }
   Expression* key() const { return key_; }
@@ -1692,13 +1687,13 @@ class Property V8_FINAL : public Expression, public FeedbackSlotInterface {
   bool IsStringAccess() const { return is_string_access_; }
 
   // Type feedback information.
-  virtual bool IsMonomorphic() V8_OVERRIDE {
+  virtual bool IsMonomorphic() OVERRIDE {
     return receiver_types_.length() == 1;
   }
-  virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE {
+  virtual SmallMapList* GetReceiverTypes() OVERRIDE {
     return &receiver_types_;
   }
-  virtual KeyedAccessStoreMode GetStoreMode() V8_OVERRIDE {
+  virtual KeyedAccessStoreMode GetStoreMode() OVERRIDE {
     return STANDARD_STORE;
   }
   bool IsUninitialized() { return !is_for_call_ && is_uninitialized_; }
@@ -1710,6 +1705,10 @@ class Property V8_FINAL : public Expression, public FeedbackSlotInterface {
   void mark_for_call() { is_for_call_ = true; }
   bool IsForCall() { return is_for_call_; }
 
+  bool IsSuperAccess() {
+    return obj()->IsSuperReference();
+  }
+
   TypeFeedbackId PropertyFeedbackId() { return reuse(id()); }
 
   virtual int ComputeFeedbackSlotCount() { return FLAG_vector_ics ? 1 : 0; }
@@ -1720,11 +1719,11 @@ class Property V8_FINAL : public Expression, public FeedbackSlotInterface {
   int PropertyFeedbackSlot() const { return property_feedback_slot_; }
 
  protected:
-  Property(Zone* zone, Expression* obj, Expression* key, int pos)
-      : Expression(zone, pos),
+  Property(Zone* zone, Expression* obj, Expression* key, int pos, IdGen* id_gen)
+      : Expression(zone, pos, id_gen),
         obj_(obj),
         key_(key),
-        load_id_(GetNextId(zone)),
+        load_id_(id_gen->GetNextId()),
         property_feedback_slot_(kInvalidFeedbackSlot),
         is_for_call_(false),
         is_uninitialized_(false),
@@ -1743,7 +1742,7 @@ class Property V8_FINAL : public Expression, public FeedbackSlotInterface {
 };
 
 
-class Call V8_FINAL : public Expression, public FeedbackSlotInterface {
+class Call FINAL : public Expression, public FeedbackSlotInterface {
  public:
   DECLARE_NODE_TYPE(Call)
 
@@ -1761,14 +1760,14 @@ class Call V8_FINAL : public Expression, public FeedbackSlotInterface {
   }
   int CallFeedbackSlot() const { return call_feedback_slot_; }
 
-  virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE {
+  virtual SmallMapList* GetReceiverTypes() OVERRIDE {
     if (expression()->IsProperty()) {
       return expression()->AsProperty()->GetReceiverTypes();
     }
     return NULL;
   }
 
-  virtual bool IsMonomorphic() V8_OVERRIDE {
+  virtual bool IsMonomorphic() OVERRIDE {
     if (expression()->IsProperty()) {
       return expression()->AsProperty()->IsMonomorphic();
     }
@@ -1794,7 +1793,7 @@ class Call V8_FINAL : public Expression, public FeedbackSlotInterface {
   void set_allocation_site(Handle<AllocationSite> site) {
     allocation_site_ = site;
   }
-  bool ComputeGlobalTarget(Handle<GlobalObject> global, LookupResult* lookup);
+  bool ComputeGlobalTarget(Handle<GlobalObject> global, LookupIterator* it);
 
   BailoutId ReturnId() const { return return_id_; }
 
@@ -1816,15 +1815,13 @@ class Call V8_FINAL : public Expression, public FeedbackSlotInterface {
 #endif
 
  protected:
-  Call(Zone* zone,
-       Expression* expression,
-       ZoneList<Expression*>* arguments,
-       int pos)
-      : Expression(zone, pos),
+  Call(Zone* zone, Expression* expression, ZoneList<Expression*>* arguments,
+       int pos, IdGen* id_gen)
+      : Expression(zone, pos, id_gen),
         expression_(expression),
         arguments_(arguments),
         call_feedback_slot_(kInvalidFeedbackSlot),
-        return_id_(GetNextId(zone)) {
+        return_id_(id_gen->GetNextId()) {
     if (expression->IsProperty()) {
       expression->AsProperty()->mark_for_call();
     }
@@ -1843,7 +1840,7 @@ class Call V8_FINAL : public Expression, public FeedbackSlotInterface {
 };
 
 
-class CallNew V8_FINAL : public Expression, public FeedbackSlotInterface {
+class CallNew FINAL : public Expression, public FeedbackSlotInterface {
  public:
   DECLARE_NODE_TYPE(CallNew)
 
@@ -1869,7 +1866,7 @@ class CallNew V8_FINAL : public Expression, public FeedbackSlotInterface {
   }
 
   void RecordTypeFeedback(TypeFeedbackOracle* oracle);
-  virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; }
+  virtual bool IsMonomorphic() OVERRIDE { return is_monomorphic_; }
   Handle<JSFunction> target() const { return target_; }
   ElementsKind elements_kind() const { return elements_kind_; }
   Handle<AllocationSite> allocation_site() const {
@@ -1881,17 +1878,15 @@ class CallNew V8_FINAL : public Expression, public FeedbackSlotInterface {
   BailoutId ReturnId() const { return return_id_; }
 
  protected:
-  CallNew(Zone* zone,
-          Expression* expression,
-          ZoneList<Expression*>* arguments,
-          int pos)
-      : Expression(zone, pos),
+  CallNew(Zone* zone, Expression* expression, ZoneList<Expression*>* arguments,
+          int pos, IdGen* id_gen)
+      : Expression(zone, pos, id_gen),
         expression_(expression),
         arguments_(arguments),
         is_monomorphic_(false),
         elements_kind_(GetInitialFastElementsKind()),
         callnew_feedback_slot_(kInvalidFeedbackSlot),
-        return_id_(GetNextId(zone)) { }
+        return_id_(id_gen->GetNextId()) {}
 
  private:
   Expression* expression_;
@@ -1911,7 +1906,7 @@ class CallNew V8_FINAL : public Expression, public FeedbackSlotInterface {
 // language construct. Instead it is used to call a C or JS function
 // with a set of arguments. This is used from the builtins that are
 // implemented in JavaScript (see "v8natives.js").
-class CallRuntime V8_FINAL : public Expression, public FeedbackSlotInterface {
+class CallRuntime FINAL : public Expression, public FeedbackSlotInterface {
  public:
   DECLARE_NODE_TYPE(CallRuntime)
 
@@ -1938,15 +1933,13 @@ class CallRuntime V8_FINAL : public Expression, public FeedbackSlotInterface {
   TypeFeedbackId CallRuntimeFeedbackId() const { return reuse(id()); }
 
  protected:
-  CallRuntime(Zone* zone,
-              const AstRawString* name,
+  CallRuntime(Zone* zone, const AstRawString* name,
               const Runtime::Function* function,
-              ZoneList<Expression*>* arguments,
-              int pos)
-      : Expression(zone, pos),
+              ZoneList<Expression*>* arguments, int pos, IdGen* id_gen)
+      : Expression(zone, pos, id_gen),
         raw_name_(name),
         function_(function),
-        arguments_(arguments) { }
+        arguments_(arguments) {}
 
  private:
   const AstRawString* raw_name_;
@@ -1956,7 +1949,7 @@ class CallRuntime V8_FINAL : public Expression, public FeedbackSlotInterface {
 };
 
 
-class UnaryOperation V8_FINAL : public Expression {
+class UnaryOperation FINAL : public Expression {
  public:
   DECLARE_NODE_TYPE(UnaryOperation)
 
@@ -1967,18 +1960,16 @@ class UnaryOperation V8_FINAL : public Expression {
   BailoutId MaterializeFalseId() { return materialize_false_id_; }
 
   virtual void RecordToBooleanTypeFeedback(
-      TypeFeedbackOracle* oracle) V8_OVERRIDE;
+      TypeFeedbackOracle* oracle) OVERRIDE;
 
  protected:
-  UnaryOperation(Zone* zone,
-                 Token::Value op,
-                 Expression* expression,
-                 int pos)
-      : Expression(zone, pos),
+  UnaryOperation(Zone* zone, Token::Value op, Expression* expression, int pos,
+                 IdGen* id_gen)
+      : Expression(zone, pos, id_gen),
         op_(op),
         expression_(expression),
-        materialize_true_id_(GetNextId(zone)),
-        materialize_false_id_(GetNextId(zone)) {
+        materialize_true_id_(id_gen->GetNextId()),
+        materialize_false_id_(id_gen->GetNextId()) {
     DCHECK(Token::IsUnaryOp(op));
   }
 
@@ -1993,11 +1984,11 @@ class UnaryOperation V8_FINAL : public Expression {
 };
 
 
-class BinaryOperation V8_FINAL : public Expression {
+class BinaryOperation FINAL : public Expression {
  public:
   DECLARE_NODE_TYPE(BinaryOperation)
 
-  virtual bool ResultOverwriteAllowed() const V8_OVERRIDE;
+  virtual bool ResultOverwriteAllowed() const OVERRIDE;
 
   Token::Value op() const { return op_; }
   Expression* left() const { return left_; }
@@ -2014,19 +2005,16 @@ class BinaryOperation V8_FINAL : public Expression {
   void set_fixed_right_arg(Maybe<int> arg) { fixed_right_arg_ = arg; }
 
   virtual void RecordToBooleanTypeFeedback(
-      TypeFeedbackOracle* oracle) V8_OVERRIDE;
+      TypeFeedbackOracle* oracle) OVERRIDE;
 
  protected:
-  BinaryOperation(Zone* zone,
-                  Token::Value op,
-                  Expression* left,
-                  Expression* right,
-                  int pos)
-      : Expression(zone, pos),
+  BinaryOperation(Zone* zone, Token::Value op, Expression* left,
+                  Expression* right, int pos, IdGen* id_gen)
+      : Expression(zone, pos, id_gen),
         op_(op),
         left_(left),
         right_(right),
-        right_id_(GetNextId(zone)) {
+        right_id_(id_gen->GetNextId()) {
     DCHECK(Token::IsBinaryOp(op));
   }
 
@@ -2046,7 +2034,7 @@ class BinaryOperation V8_FINAL : public Expression {
 };
 
 
-class CountOperation V8_FINAL : public Expression {
+class CountOperation FINAL : public Expression {
  public:
   DECLARE_NODE_TYPE(CountOperation)
 
@@ -2060,13 +2048,13 @@ class CountOperation V8_FINAL : public Expression {
 
   Expression* expression() const { return expression_; }
 
-  virtual bool IsMonomorphic() V8_OVERRIDE {
+  virtual bool IsMonomorphic() OVERRIDE {
     return receiver_types_.length() == 1;
   }
-  virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE {
+  virtual SmallMapList* GetReceiverTypes() OVERRIDE {
     return &receiver_types_;
   }
-  virtual KeyedAccessStoreMode GetStoreMode() V8_OVERRIDE {
+  virtual KeyedAccessStoreMode GetStoreMode() OVERRIDE {
     return store_mode_;
   }
   Type* type() const { return type_; }
@@ -2079,18 +2067,15 @@ class CountOperation V8_FINAL : public Expression {
   TypeFeedbackId CountStoreFeedbackId() const { return reuse(id()); }
 
  protected:
-  CountOperation(Zone* zone,
-                 Token::Value op,
-                 bool is_prefix,
-                 Expression* expr,
-                 int pos)
-      : Expression(zone, pos),
+  CountOperation(Zone* zone, Token::Value op, bool is_prefix, Expression* expr,
+                 int pos, IdGen* id_gen)
+      : Expression(zone, pos, id_gen),
         op_(op),
         is_prefix_(is_prefix),
         store_mode_(STANDARD_STORE),
         expression_(expr),
-        assignment_id_(GetNextId(zone)),
-        count_id_(GetNextId(zone)) {}
+        assignment_id_(id_gen->GetNextId()),
+        count_id_(id_gen->GetNextId()) {}
 
  private:
   Token::Value op_;
@@ -2106,7 +2091,7 @@ class CountOperation V8_FINAL : public Expression {
 };
 
 
-class CompareOperation V8_FINAL : public Expression {
+class CompareOperation FINAL : public Expression {
  public:
   DECLARE_NODE_TYPE(CompareOperation)
 
@@ -2125,12 +2110,9 @@ class CompareOperation V8_FINAL : public Expression {
   bool IsLiteralCompareNull(Expression** expr);
 
  protected:
-  CompareOperation(Zone* zone,
-                   Token::Value op,
-                   Expression* left,
-                   Expression* right,
-                   int pos)
-      : Expression(zone, pos),
+  CompareOperation(Zone* zone, Token::Value op, Expression* left,
+                   Expression* right, int pos, IdGen* id_gen)
+      : Expression(zone, pos, id_gen),
         op_(op),
         left_(left),
         right_(right),
@@ -2147,7 +2129,7 @@ class CompareOperation V8_FINAL : public Expression {
 };
 
 
-class Conditional V8_FINAL : public Expression {
+class Conditional FINAL : public Expression {
  public:
   DECLARE_NODE_TYPE(Conditional)
 
@@ -2159,17 +2141,14 @@ class Conditional V8_FINAL : public Expression {
   BailoutId ElseId() const { return else_id_; }
 
  protected:
-  Conditional(Zone* zone,
-              Expression* condition,
-              Expression* then_expression,
-              Expression* else_expression,
-              int position)
-      : Expression(zone, position),
+  Conditional(Zone* zone, Expression* condition, Expression* then_expression,
+              Expression* else_expression, int position, IdGen* id_gen)
+      : Expression(zone, position, id_gen),
         condition_(condition),
         then_expression_(then_expression),
         else_expression_(else_expression),
-        then_id_(GetNextId(zone)),
-        else_id_(GetNextId(zone)) { }
+        then_id_(id_gen->GetNextId()),
+        else_id_(id_gen->GetNextId()) {}
 
  private:
   Expression* condition_;
@@ -2180,7 +2159,7 @@ class Conditional V8_FINAL : public Expression {
 };
 
 
-class Assignment V8_FINAL : public Expression {
+class Assignment FINAL : public Expression {
  public:
   DECLARE_NODE_TYPE(Assignment)
 
@@ -2200,28 +2179,25 @@ class Assignment V8_FINAL : public Expression {
 
   // Type feedback information.
   TypeFeedbackId AssignmentFeedbackId() { return reuse(id()); }
-  virtual bool IsMonomorphic() V8_OVERRIDE {
+  virtual bool IsMonomorphic() OVERRIDE {
     return receiver_types_.length() == 1;
   }
   bool IsUninitialized() { return is_uninitialized_; }
   bool HasNoTypeInformation() {
     return is_uninitialized_;
   }
-  virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE {
+  virtual SmallMapList* GetReceiverTypes() OVERRIDE {
     return &receiver_types_;
   }
-  virtual KeyedAccessStoreMode GetStoreMode() V8_OVERRIDE {
+  virtual KeyedAccessStoreMode GetStoreMode() OVERRIDE {
     return store_mode_;
   }
   void set_is_uninitialized(bool b) { is_uninitialized_ = b; }
   void set_store_mode(KeyedAccessStoreMode mode) { store_mode_ = mode; }
 
  protected:
-  Assignment(Zone* zone,
-             Token::Value op,
-             Expression* target,
-             Expression* value,
-             int pos);
+  Assignment(Zone* zone, Token::Value op, Expression* target, Expression* value,
+             int pos, IdGen* id_gen);
 
   template<class Visitor>
   void Init(Zone* zone, AstNodeFactory<Visitor>* factory) {
@@ -2246,15 +2222,15 @@ class Assignment V8_FINAL : public Expression {
 };
 
 
-class Yield V8_FINAL : public Expression, public FeedbackSlotInterface {
+class Yield FINAL : public Expression, public FeedbackSlotInterface {
  public:
   DECLARE_NODE_TYPE(Yield)
 
   enum Kind {
-    INITIAL,     // The initial yield that returns the unboxed generator object.
-    SUSPEND,     // A normal yield: { value: EXPRESSION, done: false }
-    DELEGATING,  // A yield*.
-    FINAL        // A return: { value: EXPRESSION, done: true }
+    kInitial,  // The initial yield that returns the unboxed generator object.
+    kSuspend,  // A normal yield: { value: EXPRESSION, done: false }
+    kDelegating,  // A yield*.
+    kFinal        // A return: { value: EXPRESSION, done: true }
   };
 
   Expression* generator_object() const { return generator_object_; }
@@ -2265,17 +2241,17 @@ class Yield V8_FINAL : public Expression, public FeedbackSlotInterface {
   // locates the catch handler in the handler table, and is equivalent to
   // TryCatchStatement::index().
   int index() const {
-    DCHECK(yield_kind() == DELEGATING);
+    DCHECK_EQ(kDelegating, yield_kind());
     return index_;
   }
   void set_index(int index) {
-    DCHECK(yield_kind() == DELEGATING);
+    DCHECK_EQ(kDelegating, yield_kind());
     index_ = index;
   }
 
   // Type feedback information.
   virtual int ComputeFeedbackSlotCount() {
-    return (FLAG_vector_ics && yield_kind() == DELEGATING) ? 3 : 0;
+    return (FLAG_vector_ics && yield_kind() == kDelegating) ? 3 : 0;
   }
   virtual void SetFirstFeedbackSlot(int slot) {
     yield_first_feedback_slot_ = slot;
@@ -2297,17 +2273,14 @@ class Yield V8_FINAL : public Expression, public FeedbackSlotInterface {
   }
 
  protected:
-  Yield(Zone* zone,
-        Expression* generator_object,
-        Expression* expression,
-        Kind yield_kind,
-        int pos)
-      : Expression(zone, pos),
+  Yield(Zone* zone, Expression* generator_object, Expression* expression,
+        Kind yield_kind, int pos, IdGen* id_gen)
+      : Expression(zone, pos, id_gen),
         generator_object_(generator_object),
         expression_(expression),
         yield_kind_(yield_kind),
         index_(-1),
-        yield_first_feedback_slot_(kInvalidFeedbackSlot) { }
+        yield_first_feedback_slot_(kInvalidFeedbackSlot) {}
 
  private:
   Expression* generator_object_;
@@ -2318,22 +2291,22 @@ class Yield V8_FINAL : public Expression, public FeedbackSlotInterface {
 };
 
 
-class Throw V8_FINAL : public Expression {
+class Throw FINAL : public Expression {
  public:
   DECLARE_NODE_TYPE(Throw)
 
   Expression* exception() const { return exception_; }
 
  protected:
-  Throw(Zone* zone, Expression* exception, int pos)
-      : Expression(zone, pos), exception_(exception) {}
+  Throw(Zone* zone, Expression* exception, int pos, IdGen* id_gen)
+      : Expression(zone, pos, id_gen), exception_(exception) {}
 
  private:
   Expression* exception_;
 };
 
 
-class FunctionLiteral V8_FINAL : public Expression {
+class FunctionLiteral FINAL : public Expression {
  public:
   enum FunctionType {
     ANONYMOUS_EXPRESSION,
@@ -2356,12 +2329,6 @@ class FunctionLiteral V8_FINAL : public Expression {
     kNotParenthesized
   };
 
-  enum KindFlag {
-    kNormalFunction,
-    kArrowFunction,
-    kGeneratorFunction
-  };
-
   enum ArityRestriction {
     NORMAL_ARITY,
     GETTER_ARITY,
@@ -2451,8 +2418,16 @@ class FunctionLiteral V8_FINAL : public Expression {
     bitfield_ = IsParenthesized::update(bitfield_, kIsParenthesized);
   }
 
-  bool is_generator() { return IsGenerator::decode(bitfield_); }
-  bool is_arrow() { return IsArrow::decode(bitfield_); }
+  FunctionKind kind() { return FunctionKindBits::decode(bitfield_); }
+  bool is_arrow() {
+    return IsArrowFunction(FunctionKindBits::decode(bitfield_));
+  }
+  bool is_generator() {
+    return IsGeneratorFunction(FunctionKindBits::decode(bitfield_));
+  }
+  bool is_concise_method() {
+    return IsConciseMethod(FunctionKindBits::decode(bitfield_));
+  }
 
   int ast_node_count() { return ast_properties_.node_count(); }
   AstProperties::Flags* flags() { return ast_properties_.flags(); }
@@ -2476,9 +2451,9 @@ class FunctionLiteral V8_FINAL : public Expression {
                   int parameter_count, FunctionType function_type,
                   ParameterFlag has_duplicate_parameters,
                   IsFunctionFlag is_function,
-                  IsParenthesizedFlag is_parenthesized, KindFlag kind,
-                  int position)
-      : Expression(zone, position),
+                  IsParenthesizedFlag is_parenthesized, FunctionKind kind,
+                  int position, IdGen* id_gen)
+      : Expression(zone, position, id_gen),
         raw_name_(name),
         scope_(scope),
         body_(body),
@@ -2495,8 +2470,8 @@ class FunctionLiteral V8_FINAL : public Expression {
                 HasDuplicateParameters::encode(has_duplicate_parameters) |
                 IsFunction::encode(is_function) |
                 IsParenthesized::encode(is_parenthesized) |
-                IsGenerator::encode(kind == kGeneratorFunction) |
-                IsArrow::encode(kind == kArrowFunction);
+                FunctionKindBits::encode(kind);
+    DCHECK(IsValidFunctionKind(kind));
   }
 
  private:
@@ -2517,18 +2492,47 @@ class FunctionLiteral V8_FINAL : public Expression {
   int function_token_position_;
 
   unsigned bitfield_;
-  class IsExpression: public BitField<bool, 0, 1> {};
-  class IsAnonymous: public BitField<bool, 1, 1> {};
-  class Pretenure: public BitField<bool, 2, 1> {};
-  class HasDuplicateParameters: public BitField<ParameterFlag, 3, 1> {};
-  class IsFunction: public BitField<IsFunctionFlag, 4, 1> {};
-  class IsParenthesized: public BitField<IsParenthesizedFlag, 5, 1> {};
-  class IsGenerator : public BitField<bool, 6, 1> {};
-  class IsArrow : public BitField<bool, 7, 1> {};
+  class IsExpression : public BitField<bool, 0, 1> {};
+  class IsAnonymous : public BitField<bool, 1, 1> {};
+  class Pretenure : public BitField<bool, 2, 1> {};
+  class HasDuplicateParameters : public BitField<ParameterFlag, 3, 1> {};
+  class IsFunction : public BitField<IsFunctionFlag, 4, 1> {};
+  class IsParenthesized : public BitField<IsParenthesizedFlag, 5, 1> {};
+  class FunctionKindBits : public BitField<FunctionKind, 6, 3> {};
 };
 
 
-class NativeFunctionLiteral V8_FINAL : public Expression {
+class ClassLiteral FINAL : public Expression {
+ public:
+  typedef ObjectLiteralProperty Property;
+
+  DECLARE_NODE_TYPE(ClassLiteral)
+
+  Handle<String> name() const { return raw_name_->string(); }
+  const AstRawString* raw_name() const { return raw_name_; }
+  Expression* extends() const { return extends_; }
+  Expression* constructor() const { return constructor_; }
+  ZoneList<Property*>* properties() const { return properties_; }
+
+ protected:
+  ClassLiteral(Zone* zone, const AstRawString* name, Expression* extends,
+               Expression* constructor, ZoneList<Property*>* properties,
+               int position, IdGen* id_gen)
+      : Expression(zone, position, id_gen),
+        raw_name_(name),
+        extends_(extends),
+        constructor_(constructor),
+        properties_(properties) {}
+
+ private:
+  const AstRawString* raw_name_;
+  Expression* extends_;
+  Expression* constructor_;
+  ZoneList<Property*>* properties_;
+};
+
+
+class NativeFunctionLiteral FINAL : public Expression {
  public:
   DECLARE_NODE_TYPE(NativeFunctionLiteral)
 
@@ -2537,8 +2541,8 @@ class NativeFunctionLiteral V8_FINAL : public Expression {
 
  protected:
   NativeFunctionLiteral(Zone* zone, const AstRawString* name,
-                        v8::Extension* extension, int pos)
-      : Expression(zone, pos), name_(name), extension_(extension) {}
+                        v8::Extension* extension, int pos, IdGen* id_gen)
+      : Expression(zone, pos, id_gen), name_(name), extension_(extension) {}
 
  private:
   const AstRawString* name_;
@@ -2546,14 +2550,34 @@ class NativeFunctionLiteral V8_FINAL : public Expression {
 };
 
 
-class ThisFunction V8_FINAL : public Expression {
+class ThisFunction FINAL : public Expression {
  public:
   DECLARE_NODE_TYPE(ThisFunction)
 
  protected:
-  explicit ThisFunction(Zone* zone, int pos): Expression(zone, pos) {}
+  ThisFunction(Zone* zone, int pos, IdGen* id_gen)
+      : Expression(zone, pos, id_gen) {}
 };
 
+
+class SuperReference FINAL : public Expression {
+ public:
+  DECLARE_NODE_TYPE(SuperReference)
+
+  VariableProxy* this_var() const { return this_var_; }
+
+  TypeFeedbackId HomeObjectFeedbackId() { return reuse(id()); }
+
+ protected:
+  SuperReference(Zone* zone, VariableProxy* this_var, int pos, IdGen* id_gen)
+      : Expression(zone, pos, id_gen), this_var_(this_var) {
+    DCHECK(this_var->is_this());
+  }
+
+  VariableProxy* this_var_;
+};
+
+
 #undef DECLARE_NODE_TYPE
 
 
@@ -2596,19 +2620,19 @@ class RegExpTree : public ZoneObject {
 };
 
 
-class RegExpDisjunction V8_FINAL : public RegExpTree {
+class RegExpDisjunction FINAL : public RegExpTree {
  public:
   explicit RegExpDisjunction(ZoneList<RegExpTree*>* alternatives);
-  virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE;
+  virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
   virtual RegExpNode* ToNode(RegExpCompiler* compiler,
-                             RegExpNode* on_success) V8_OVERRIDE;
-  virtual RegExpDisjunction* AsDisjunction() V8_OVERRIDE;
-  virtual Interval CaptureRegisters() V8_OVERRIDE;
-  virtual bool IsDisjunction() V8_OVERRIDE;
-  virtual bool IsAnchoredAtStart() V8_OVERRIDE;
-  virtual bool IsAnchoredAtEnd() V8_OVERRIDE;
-  virtual int min_match() V8_OVERRIDE { return min_match_; }
-  virtual int max_match() V8_OVERRIDE { return max_match_; }
+                             RegExpNode* on_success) OVERRIDE;
+  virtual RegExpDisjunction* AsDisjunction() OVERRIDE;
+  virtual Interval CaptureRegisters() OVERRIDE;
+  virtual bool IsDisjunction() OVERRIDE;
+  virtual bool IsAnchoredAtStart() OVERRIDE;
+  virtual bool IsAnchoredAtEnd() OVERRIDE;
+  virtual int min_match() OVERRIDE { return min_match_; }
+  virtual int max_match() OVERRIDE { return max_match_; }
   ZoneList<RegExpTree*>* alternatives() { return alternatives_; }
  private:
   ZoneList<RegExpTree*>* alternatives_;
@@ -2617,19 +2641,19 @@ class RegExpDisjunction V8_FINAL : public RegExpTree {
 };
 
 
-class RegExpAlternative V8_FINAL : public RegExpTree {
+class RegExpAlternative FINAL : public RegExpTree {
  public:
   explicit RegExpAlternative(ZoneList<RegExpTree*>* nodes);
-  virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE;
+  virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
   virtual RegExpNode* ToNode(RegExpCompiler* compiler,
-                             RegExpNode* on_success) V8_OVERRIDE;
-  virtual RegExpAlternative* AsAlternative() V8_OVERRIDE;
-  virtual Interval CaptureRegisters() V8_OVERRIDE;
-  virtual bool IsAlternative() V8_OVERRIDE;
-  virtual bool IsAnchoredAtStart() V8_OVERRIDE;
-  virtual bool IsAnchoredAtEnd() V8_OVERRIDE;
-  virtual int min_match() V8_OVERRIDE { return min_match_; }
-  virtual int max_match() V8_OVERRIDE { return max_match_; }
+                             RegExpNode* on_success) OVERRIDE;
+  virtual RegExpAlternative* AsAlternative() OVERRIDE;
+  virtual Interval CaptureRegisters() OVERRIDE;
+  virtual bool IsAlternative() OVERRIDE;
+  virtual bool IsAnchoredAtStart() OVERRIDE;
+  virtual bool IsAnchoredAtEnd() OVERRIDE;
+  virtual int min_match() OVERRIDE { return min_match_; }
+  virtual int max_match() OVERRIDE { return max_match_; }
   ZoneList<RegExpTree*>* nodes() { return nodes_; }
  private:
   ZoneList<RegExpTree*>* nodes_;
@@ -2638,7 +2662,7 @@ class RegExpAlternative V8_FINAL : public RegExpTree {
 };
 
 
-class RegExpAssertion V8_FINAL : public RegExpTree {
+class RegExpAssertion FINAL : public RegExpTree {
  public:
   enum AssertionType {
     START_OF_LINE,
@@ -2649,22 +2673,22 @@ class RegExpAssertion V8_FINAL : public RegExpTree {
     NON_BOUNDARY
   };
   explicit RegExpAssertion(AssertionType type) : assertion_type_(type) { }
-  virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE;
+  virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
   virtual RegExpNode* ToNode(RegExpCompiler* compiler,
-                             RegExpNode* on_success) V8_OVERRIDE;
-  virtual RegExpAssertion* AsAssertion() V8_OVERRIDE;
-  virtual bool IsAssertion() V8_OVERRIDE;
-  virtual bool IsAnchoredAtStart() V8_OVERRIDE;
-  virtual bool IsAnchoredAtEnd() V8_OVERRIDE;
-  virtual int min_match() V8_OVERRIDE { return 0; }
-  virtual int max_match() V8_OVERRIDE { return 0; }
+                             RegExpNode* on_success) OVERRIDE;
+  virtual RegExpAssertion* AsAssertion() OVERRIDE;
+  virtual bool IsAssertion() OVERRIDE;
+  virtual bool IsAnchoredAtStart() OVERRIDE;
+  virtual bool IsAnchoredAtEnd() OVERRIDE;
+  virtual int min_match() OVERRIDE { return 0; }
+  virtual int max_match() OVERRIDE { return 0; }
   AssertionType assertion_type() { return assertion_type_; }
  private:
   AssertionType assertion_type_;
 };
 
 
-class CharacterSet V8_FINAL BASE_EMBEDDED {
+class CharacterSet FINAL BASE_EMBEDDED {
  public:
   explicit CharacterSet(uc16 standard_set_type)
       : ranges_(NULL),
@@ -2687,7 +2711,7 @@ class CharacterSet V8_FINAL BASE_EMBEDDED {
 };
 
 
-class RegExpCharacterClass V8_FINAL : public RegExpTree {
+class RegExpCharacterClass FINAL : public RegExpTree {
  public:
   RegExpCharacterClass(ZoneList<CharacterRange>* ranges, bool is_negated)
       : set_(ranges),
@@ -2695,15 +2719,15 @@ class RegExpCharacterClass V8_FINAL : public RegExpTree {
   explicit RegExpCharacterClass(uc16 type)
       : set_(type),
         is_negated_(false) { }
-  virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE;
+  virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
   virtual RegExpNode* ToNode(RegExpCompiler* compiler,
-                             RegExpNode* on_success) V8_OVERRIDE;
-  virtual RegExpCharacterClass* AsCharacterClass() V8_OVERRIDE;
-  virtual bool IsCharacterClass() V8_OVERRIDE;
-  virtual bool IsTextElement() V8_OVERRIDE { return true; }
-  virtual int min_match() V8_OVERRIDE { return 1; }
-  virtual int max_match() V8_OVERRIDE { return 1; }
-  virtual void AppendToText(RegExpText* text, Zone* zone) V8_OVERRIDE;
+                             RegExpNode* on_success) OVERRIDE;
+  virtual RegExpCharacterClass* AsCharacterClass() OVERRIDE;
+  virtual bool IsCharacterClass() OVERRIDE;
+  virtual bool IsTextElement() OVERRIDE { return true; }
+  virtual int min_match() OVERRIDE { return 1; }
+  virtual int max_match() OVERRIDE { return 1; }
+  virtual void AppendToText(RegExpText* text, Zone* zone) OVERRIDE;
   CharacterSet character_set() { return set_; }
   // TODO(lrn): Remove need for complex version if is_standard that
   // recognizes a mangled standard set and just do { return set_.is_special(); }
@@ -2729,18 +2753,18 @@ class RegExpCharacterClass V8_FINAL : public RegExpTree {
 };
 
 
-class RegExpAtom V8_FINAL : public RegExpTree {
+class RegExpAtom FINAL : public RegExpTree {
  public:
   explicit RegExpAtom(Vector<const uc16> data) : data_(data) { }
-  virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE;
+  virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
   virtual RegExpNode* ToNode(RegExpCompiler* compiler,
-                             RegExpNode* on_success) V8_OVERRIDE;
-  virtual RegExpAtom* AsAtom() V8_OVERRIDE;
-  virtual bool IsAtom() V8_OVERRIDE;
-  virtual bool IsTextElement() V8_OVERRIDE { return true; }
-  virtual int min_match() V8_OVERRIDE { return data_.length(); }
-  virtual int max_match() V8_OVERRIDE { return data_.length(); }
-  virtual void AppendToText(RegExpText* text, Zone* zone) V8_OVERRIDE;
+                             RegExpNode* on_success) OVERRIDE;
+  virtual RegExpAtom* AsAtom() OVERRIDE;
+  virtual bool IsAtom() OVERRIDE;
+  virtual bool IsTextElement() OVERRIDE { return true; }
+  virtual int min_match() OVERRIDE { return data_.length(); }
+  virtual int max_match() OVERRIDE { return data_.length(); }
+  virtual void AppendToText(RegExpText* text, Zone* zone) OVERRIDE;
   Vector<const uc16> data() { return data_; }
   int length() { return data_.length(); }
  private:
@@ -2748,18 +2772,18 @@ class RegExpAtom V8_FINAL : public RegExpTree {
 };
 
 
-class RegExpText V8_FINAL : public RegExpTree {
+class RegExpText FINAL : public RegExpTree {
  public:
   explicit RegExpText(Zone* zone) : elements_(2, zone), length_(0) {}
-  virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE;
+  virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
   virtual RegExpNode* ToNode(RegExpCompiler* compiler,
-                             RegExpNode* on_success) V8_OVERRIDE;
-  virtual RegExpText* AsText() V8_OVERRIDE;
-  virtual bool IsText() V8_OVERRIDE;
-  virtual bool IsTextElement() V8_OVERRIDE { return true; }
-  virtual int min_match() V8_OVERRIDE { return length_; }
-  virtual int max_match() V8_OVERRIDE { return length_; }
-  virtual void AppendToText(RegExpText* text, Zone* zone) V8_OVERRIDE;
+                             RegExpNode* on_success) OVERRIDE;
+  virtual RegExpText* AsText() OVERRIDE;
+  virtual bool IsText() OVERRIDE;
+  virtual bool IsTextElement() OVERRIDE { return true; }
+  virtual int min_match() OVERRIDE { return length_; }
+  virtual int max_match() OVERRIDE { return length_; }
+  virtual void AppendToText(RegExpText* text, Zone* zone) OVERRIDE;
   void AddElement(TextElement elm, Zone* zone)  {
     elements_.Add(elm, zone);
     length_ += elm.length();
@@ -2771,7 +2795,7 @@ class RegExpText V8_FINAL : public RegExpTree {
 };
 
 
-class RegExpQuantifier V8_FINAL : public RegExpTree {
+class RegExpQuantifier FINAL : public RegExpTree {
  public:
   enum QuantifierType { GREEDY, NON_GREEDY, POSSESSIVE };
   RegExpQuantifier(int min, int max, QuantifierType type, RegExpTree* body)
@@ -2786,9 +2810,9 @@ class RegExpQuantifier V8_FINAL : public RegExpTree {
       max_match_ = max * body->max_match();
     }
   }
-  virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE;
+  virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
   virtual RegExpNode* ToNode(RegExpCompiler* compiler,
-                             RegExpNode* on_success) V8_OVERRIDE;
+                             RegExpNode* on_success) OVERRIDE;
   static RegExpNode* ToNode(int min,
                             int max,
                             bool is_greedy,
@@ -2796,11 +2820,11 @@ class RegExpQuantifier V8_FINAL : public RegExpTree {
                             RegExpCompiler* compiler,
                             RegExpNode* on_success,
                             bool not_at_start = false);
-  virtual RegExpQuantifier* AsQuantifier() V8_OVERRIDE;
-  virtual Interval CaptureRegisters() V8_OVERRIDE;
-  virtual bool IsQuantifier() V8_OVERRIDE;
-  virtual int min_match() V8_OVERRIDE { return min_match_; }
-  virtual int max_match() V8_OVERRIDE { return max_match_; }
+  virtual RegExpQuantifier* AsQuantifier() OVERRIDE;
+  virtual Interval CaptureRegisters() OVERRIDE;
+  virtual bool IsQuantifier() OVERRIDE;
+  virtual int min_match() OVERRIDE { return min_match_; }
+  virtual int max_match() OVERRIDE { return max_match_; }
   int min() { return min_; }
   int max() { return max_; }
   bool is_possessive() { return quantifier_type_ == POSSESSIVE; }
@@ -2818,24 +2842,24 @@ class RegExpQuantifier V8_FINAL : public RegExpTree {
 };
 
 
-class RegExpCapture V8_FINAL : public RegExpTree {
+class RegExpCapture FINAL : public RegExpTree {
  public:
   explicit RegExpCapture(RegExpTree* body, int index)
       : body_(body), index_(index) { }
-  virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE;
+  virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
   virtual RegExpNode* ToNode(RegExpCompiler* compiler,
-                             RegExpNode* on_success) V8_OVERRIDE;
+                             RegExpNode* on_success) OVERRIDE;
   static RegExpNode* ToNode(RegExpTree* body,
                             int index,
                             RegExpCompiler* compiler,
                             RegExpNode* on_success);
-  virtual RegExpCapture* AsCapture() V8_OVERRIDE;
-  virtual bool IsAnchoredAtStart() V8_OVERRIDE;
-  virtual bool IsAnchoredAtEnd() V8_OVERRIDE;
-  virtual Interval CaptureRegisters() V8_OVERRIDE;
-  virtual bool IsCapture() V8_OVERRIDE;
-  virtual int min_match() V8_OVERRIDE { return body_->min_match(); }
-  virtual int max_match() V8_OVERRIDE { return body_->max_match(); }
+  virtual RegExpCapture* AsCapture() OVERRIDE;
+  virtual bool IsAnchoredAtStart() OVERRIDE;
+  virtual bool IsAnchoredAtEnd() OVERRIDE;
+  virtual Interval CaptureRegisters() OVERRIDE;
+  virtual bool IsCapture() OVERRIDE;
+  virtual int min_match() OVERRIDE { return body_->min_match(); }
+  virtual int max_match() OVERRIDE { return body_->max_match(); }
   RegExpTree* body() { return body_; }
   int index() { return index_; }
   static int StartRegister(int index) { return index * 2; }
@@ -2847,7 +2871,7 @@ class RegExpCapture V8_FINAL : public RegExpTree {
 };
 
 
-class RegExpLookahead V8_FINAL : public RegExpTree {
+class RegExpLookahead FINAL : public RegExpTree {
  public:
   RegExpLookahead(RegExpTree* body,
                   bool is_positive,
@@ -2858,15 +2882,15 @@ class RegExpLookahead V8_FINAL : public RegExpTree {
         capture_count_(capture_count),
         capture_from_(capture_from) { }
 
-  virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE;
+  virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
   virtual RegExpNode* ToNode(RegExpCompiler* compiler,
-                             RegExpNode* on_success) V8_OVERRIDE;
-  virtual RegExpLookahead* AsLookahead() V8_OVERRIDE;
-  virtual Interval CaptureRegisters() V8_OVERRIDE;
-  virtual bool IsLookahead() V8_OVERRIDE;
-  virtual bool IsAnchoredAtStart() V8_OVERRIDE;
-  virtual int min_match() V8_OVERRIDE { return 0; }
-  virtual int max_match() V8_OVERRIDE { return 0; }
+                             RegExpNode* on_success) OVERRIDE;
+  virtual RegExpLookahead* AsLookahead() OVERRIDE;
+  virtual Interval CaptureRegisters() OVERRIDE;
+  virtual bool IsLookahead() OVERRIDE;
+  virtual bool IsAnchoredAtStart() OVERRIDE;
+  virtual int min_match() OVERRIDE { return 0; }
+  virtual int max_match() OVERRIDE { return 0; }
   RegExpTree* body() { return body_; }
   bool is_positive() { return is_positive_; }
   int capture_count() { return capture_count_; }
@@ -2880,17 +2904,17 @@ class RegExpLookahead V8_FINAL : public RegExpTree {
 };
 
 
-class RegExpBackReference V8_FINAL : public RegExpTree {
+class RegExpBackReference FINAL : public RegExpTree {
  public:
   explicit RegExpBackReference(RegExpCapture* capture)
       : capture_(capture) { }
-  virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE;
+  virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
   virtual RegExpNode* ToNode(RegExpCompiler* compiler,
-                             RegExpNode* on_success) V8_OVERRIDE;
-  virtual RegExpBackReference* AsBackReference() V8_OVERRIDE;
-  virtual bool IsBackReference() V8_OVERRIDE;
-  virtual int min_match() V8_OVERRIDE { return 0; }
-  virtual int max_match() V8_OVERRIDE { return capture_->max_match(); }
+                             RegExpNode* on_success) OVERRIDE;
+  virtual RegExpBackReference* AsBackReference() OVERRIDE;
+  virtual bool IsBackReference() OVERRIDE;
+  virtual int min_match() OVERRIDE { return 0; }
+  virtual int max_match() OVERRIDE { return capture_->max_match(); }
   int index() { return capture_->index(); }
   RegExpCapture* capture() { return capture_; }
  private:
@@ -2898,16 +2922,16 @@ class RegExpBackReference V8_FINAL : public RegExpTree {
 };
 
 
-class RegExpEmpty V8_FINAL : public RegExpTree {
+class RegExpEmpty FINAL : public RegExpTree {
  public:
   RegExpEmpty() { }
-  virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE;
+  virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
   virtual RegExpNode* ToNode(RegExpCompiler* compiler,
-                             RegExpNode* on_success) V8_OVERRIDE;
-  virtual RegExpEmpty* AsEmpty() V8_OVERRIDE;
-  virtual bool IsEmpty() V8_OVERRIDE;
-  virtual int min_match() V8_OVERRIDE { return 0; }
-  virtual int max_match() V8_OVERRIDE { return 0; }
+                             RegExpNode* on_success) OVERRIDE;
+  virtual RegExpEmpty* AsEmpty() OVERRIDE;
+  virtual bool IsEmpty() OVERRIDE;
+  virtual int min_match() OVERRIDE { return 0; }
+  virtual int max_match() OVERRIDE { return 0; }
   static RegExpEmpty* GetInstance() {
     static RegExpEmpty* instance = ::new RegExpEmpty();
     return instance;
@@ -2951,7 +2975,7 @@ class AstVisitor BASE_EMBEDDED {
 
 #define DEFINE_AST_VISITOR_SUBCLASS_MEMBERS()                       \
 public:                                                             \
-  virtual void Visit(AstNode* node) V8_FINAL V8_OVERRIDE {          \
+  virtual void Visit(AstNode* node) FINAL OVERRIDE {          \
     if (!CheckStackOverflow()) node->Accept(this);                  \
   }                                                                 \
                                                                     \
@@ -2983,10 +3007,17 @@ private:                                                            \
 
 class AstConstructionVisitor BASE_EMBEDDED {
  public:
-  AstConstructionVisitor() : dont_optimize_reason_(kNoReason) { }
+  AstConstructionVisitor()
+      : dont_crankshaft_reason_(kNoReason), dont_turbofan_reason_(kNoReason) {}
 
   AstProperties* ast_properties() { return &properties_; }
-  BailoutReason dont_optimize_reason() { return dont_optimize_reason_; }
+  BailoutReason dont_optimize_reason() {
+    if (dont_turbofan_reason_ != kNoReason) {
+      return dont_turbofan_reason_;
+    } else {
+      return dont_crankshaft_reason_;
+    }
+  }
 
  private:
   template<class> friend class AstNodeFactory;
@@ -2999,8 +3030,11 @@ class AstConstructionVisitor BASE_EMBEDDED {
 
   void increase_node_count() { properties_.add_node_count(1); }
   void add_flag(AstPropertiesFlag flag) { properties_.flags()->Add(flag); }
-  void set_dont_optimize_reason(BailoutReason reason) {
-      dont_optimize_reason_ = reason;
+  void set_dont_crankshaft_reason(BailoutReason reason) {
+    dont_crankshaft_reason_ = reason;
+  }
+  void set_dont_turbofan_reason(BailoutReason reason) {
+    dont_turbofan_reason_ = reason;
   }
 
   void add_slot_node(FeedbackSlotInterface* slot_node) {
@@ -3012,7 +3046,8 @@ class AstConstructionVisitor BASE_EMBEDDED {
   }
 
   AstProperties properties_;
-  BailoutReason dont_optimize_reason_;
+  BailoutReason dont_crankshaft_reason_;
+  BailoutReason dont_turbofan_reason_;
 };
 
 
@@ -3031,10 +3066,11 @@ class AstNullVisitor BASE_EMBEDDED {
 // AstNode factory
 
 template<class Visitor>
-class AstNodeFactory V8_FINAL BASE_EMBEDDED {
+class AstNodeFactory FINAL BASE_EMBEDDED {
  public:
-  explicit AstNodeFactory(Zone* zone, AstValueFactory* ast_value_factory)
-      : zone_(zone), ast_value_factory_(ast_value_factory) {}
+  AstNodeFactory(Zone* zone, AstValueFactory* ast_value_factory,
+                 AstNode::IdGen* id_gen)
+      : zone_(zone), ast_value_factory_(ast_value_factory), id_gen_(id_gen) {}
 
   Visitor* visitor() { return &visitor_; }
 
@@ -3112,15 +3148,15 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
                   int capacity,
                   bool is_initializer_block,
                   int pos) {
-    Block* block = new(zone_) Block(
-        zone_, labels, capacity, is_initializer_block, pos);
+    Block* block = new (zone_)
+        Block(zone_, labels, capacity, is_initializer_block, pos, id_gen_);
     VISIT_AND_RETURN(Block, block)
   }
 
-#define STATEMENT_WITH_LABELS(NodeType) \
+#define STATEMENT_WITH_LABELS(NodeType)                                     \
   NodeType* New##NodeType(ZoneList<const AstRawString*>* labels, int pos) { \
-    NodeType* stmt = new(zone_) NodeType(zone_, labels, pos); \
-    VISIT_AND_RETURN(NodeType, stmt); \
+    NodeType* stmt = new (zone_) NodeType(zone_, labels, pos, id_gen_);     \
+    VISIT_AND_RETURN(NodeType, stmt);                                       \
   }
   STATEMENT_WITH_LABELS(DoWhileStatement)
   STATEMENT_WITH_LABELS(WhileStatement)
@@ -3133,11 +3169,13 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
                                         int pos) {
     switch (visit_mode) {
       case ForEachStatement::ENUMERATE: {
-        ForInStatement* stmt = new(zone_) ForInStatement(zone_, labels, pos);
+        ForInStatement* stmt =
+            new (zone_) ForInStatement(zone_, labels, pos, id_gen_);
         VISIT_AND_RETURN(ForInStatement, stmt);
       }
       case ForEachStatement::ITERATE: {
-        ForOfStatement* stmt = new(zone_) ForOfStatement(zone_, labels, pos);
+        ForOfStatement* stmt =
+            new (zone_) ForOfStatement(zone_, labels, pos, id_gen_);
         VISIT_AND_RETURN(ForOfStatement, stmt);
       }
     }
@@ -3185,8 +3223,8 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
                               Statement* then_statement,
                               Statement* else_statement,
                               int pos) {
-    IfStatement* stmt = new(zone_) IfStatement(
-        zone_, condition, then_statement, else_statement, pos);
+    IfStatement* stmt = new (zone_) IfStatement(
+        zone_, condition, then_statement, else_statement, pos, id_gen_);
     VISIT_AND_RETURN(IfStatement, stmt)
   }
 
@@ -3211,7 +3249,8 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
   }
 
   DebuggerStatement* NewDebuggerStatement(int pos) {
-    DebuggerStatement* stmt = new(zone_) DebuggerStatement(zone_, pos);
+    DebuggerStatement* stmt =
+        new (zone_) DebuggerStatement(zone_, pos, id_gen_);
     VISIT_AND_RETURN(DebuggerStatement, stmt)
   }
 
@@ -3222,63 +3261,63 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
   CaseClause* NewCaseClause(
       Expression* label, ZoneList<Statement*>* statements, int pos) {
     CaseClause* clause =
-        new(zone_) CaseClause(zone_, label, statements, pos);
+        new (zone_) CaseClause(zone_, label, statements, pos, id_gen_);
     VISIT_AND_RETURN(CaseClause, clause)
   }
 
   Literal* NewStringLiteral(const AstRawString* string, int pos) {
-    Literal* lit =
-        new (zone_) Literal(zone_, ast_value_factory_->NewString(string), pos);
+    Literal* lit = new (zone_)
+        Literal(zone_, ast_value_factory_->NewString(string), pos, id_gen_);
     VISIT_AND_RETURN(Literal, lit)
   }
 
   // A JavaScript symbol (ECMA-262 edition 6).
   Literal* NewSymbolLiteral(const char* name, int pos) {
-    Literal* lit =
-        new (zone_) Literal(zone_, ast_value_factory_->NewSymbol(name), pos);
+    Literal* lit = new (zone_)
+        Literal(zone_, ast_value_factory_->NewSymbol(name), pos, id_gen_);
     VISIT_AND_RETURN(Literal, lit)
   }
 
   Literal* NewNumberLiteral(double number, int pos) {
     Literal* lit = new (zone_)
-        Literal(zone_, ast_value_factory_->NewNumber(number), pos);
+        Literal(zone_, ast_value_factory_->NewNumber(number), pos, id_gen_);
     VISIT_AND_RETURN(Literal, lit)
   }
 
   Literal* NewSmiLiteral(int number, int pos) {
-    Literal* lit =
-        new (zone_) Literal(zone_, ast_value_factory_->NewSmi(number), pos);
+    Literal* lit = new (zone_)
+        Literal(zone_, ast_value_factory_->NewSmi(number), pos, id_gen_);
     VISIT_AND_RETURN(Literal, lit)
   }
 
   Literal* NewBooleanLiteral(bool b, int pos) {
-    Literal* lit =
-        new (zone_) Literal(zone_, ast_value_factory_->NewBoolean(b), pos);
+    Literal* lit = new (zone_)
+        Literal(zone_, ast_value_factory_->NewBoolean(b), pos, id_gen_);
     VISIT_AND_RETURN(Literal, lit)
   }
 
   Literal* NewStringListLiteral(ZoneList<const AstRawString*>* strings,
                                 int pos) {
-    Literal* lit = new (zone_)
-        Literal(zone_, ast_value_factory_->NewStringList(strings), pos);
+    Literal* lit = new (zone_) Literal(
+        zone_, ast_value_factory_->NewStringList(strings), pos, id_gen_);
     VISIT_AND_RETURN(Literal, lit)
   }
 
   Literal* NewNullLiteral(int pos) {
     Literal* lit =
-        new (zone_) Literal(zone_, ast_value_factory_->NewNull(), pos);
+        new (zone_) Literal(zone_, ast_value_factory_->NewNull(), pos, id_gen_);
     VISIT_AND_RETURN(Literal, lit)
   }
 
   Literal* NewUndefinedLiteral(int pos) {
-    Literal* lit =
-        new (zone_) Literal(zone_, ast_value_factory_->NewUndefined(), pos);
+    Literal* lit = new (zone_)
+        Literal(zone_, ast_value_factory_->NewUndefined(), pos, id_gen_);
     VISIT_AND_RETURN(Literal, lit)
   }
 
   Literal* NewTheHoleLiteral(int pos) {
-    Literal* lit =
-        new (zone_) Literal(zone_, ast_value_factory_->NewTheHole(), pos);
+    Literal* lit = new (zone_)
+        Literal(zone_, ast_value_factory_->NewTheHole(), pos, id_gen_);
     VISIT_AND_RETURN(Literal, lit)
   }
 
@@ -3288,23 +3327,24 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
       int boilerplate_properties,
       bool has_function,
       int pos) {
-    ObjectLiteral* lit = new(zone_) ObjectLiteral(
-        zone_, properties, literal_index, boilerplate_properties,
-        has_function, pos);
+    ObjectLiteral* lit = new (zone_)
+        ObjectLiteral(zone_, properties, literal_index, boilerplate_properties,
+                      has_function, pos, id_gen_);
     VISIT_AND_RETURN(ObjectLiteral, lit)
   }
 
   ObjectLiteral::Property* NewObjectLiteralProperty(Literal* key,
-                                                    Expression* value) {
-    return new (zone_)
-        ObjectLiteral::Property(zone_, ast_value_factory_, key, value);
+                                                    Expression* value,
+                                                    bool is_static) {
+    return new (zone_) ObjectLiteral::Property(zone_, ast_value_factory_, key,
+                                               value, is_static);
   }
 
   ObjectLiteral::Property* NewObjectLiteralProperty(bool is_getter,
                                                     FunctionLiteral* value,
-                                                    int pos) {
+                                                    int pos, bool is_static) {
     ObjectLiteral::Property* prop =
-        new(zone_) ObjectLiteral::Property(zone_, is_getter, value);
+        new (zone_) ObjectLiteral::Property(zone_, is_getter, value, is_static);
     prop->set_key(NewStringLiteral(value->raw_name(), pos));
     return prop;  // Not an AST node, will not be visited.
   }
@@ -3313,22 +3353,22 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
                                   const AstRawString* flags,
                                   int literal_index,
                                   int pos) {
-    RegExpLiteral* lit =
-        new(zone_) RegExpLiteral(zone_, pattern, flags, literal_index, pos);
+    RegExpLiteral* lit = new (zone_)
+        RegExpLiteral(zone_, pattern, flags, literal_index, pos, id_gen_);
     VISIT_AND_RETURN(RegExpLiteral, lit);
   }
 
   ArrayLiteral* NewArrayLiteral(ZoneList<Expression*>* values,
                                 int literal_index,
                                 int pos) {
-    ArrayLiteral* lit = new(zone_) ArrayLiteral(
-        zone_, values, literal_index, pos);
+    ArrayLiteral* lit =
+        new (zone_) ArrayLiteral(zone_, values, literal_index, pos, id_gen_);
     VISIT_AND_RETURN(ArrayLiteral, lit)
   }
 
   VariableProxy* NewVariableProxy(Variable* var,
                                   int pos = RelocInfo::kNoPosition) {
-    VariableProxy* proxy = new(zone_) VariableProxy(zone_, var, pos);
+    VariableProxy* proxy = new (zone_) VariableProxy(zone_, var, pos, id_gen_);
     VISIT_AND_RETURN(VariableProxy, proxy)
   }
 
@@ -3336,27 +3376,28 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
                                   bool is_this,
                                   Interface* interface = Interface::NewValue(),
                                   int position = RelocInfo::kNoPosition) {
-    VariableProxy* proxy =
-        new(zone_) VariableProxy(zone_, name, is_this, interface, position);
+    VariableProxy* proxy = new (zone_)
+        VariableProxy(zone_, name, is_this, interface, position, id_gen_);
     VISIT_AND_RETURN(VariableProxy, proxy)
   }
 
   Property* NewProperty(Expression* obj, Expression* key, int pos) {
-    Property* prop = new(zone_) Property(zone_, obj, key, pos);
+    Property* prop = new (zone_) Property(zone_, obj, key, pos, id_gen_);
     VISIT_AND_RETURN(Property, prop)
   }
 
   Call* NewCall(Expression* expression,
                 ZoneList<Expression*>* arguments,
                 int pos) {
-    Call* call = new(zone_) Call(zone_, expression, arguments, pos);
+    Call* call = new (zone_) Call(zone_, expression, arguments, pos, id_gen_);
     VISIT_AND_RETURN(Call, call)
   }
 
   CallNew* NewCallNew(Expression* expression,
                       ZoneList<Expression*>* arguments,
                       int pos) {
-    CallNew* call = new(zone_) CallNew(zone_, expression, arguments, pos);
+    CallNew* call =
+        new (zone_) CallNew(zone_, expression, arguments, pos, id_gen_);
     VISIT_AND_RETURN(CallNew, call)
   }
 
@@ -3365,7 +3406,7 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
                               ZoneList<Expression*>* arguments,
                               int pos) {
     CallRuntime* call =
-        new(zone_) CallRuntime(zone_, name, function, arguments, pos);
+        new (zone_) CallRuntime(zone_, name, function, arguments, pos, id_gen_);
     VISIT_AND_RETURN(CallRuntime, call)
   }
 
@@ -3373,7 +3414,7 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
                                     Expression* expression,
                                     int pos) {
     UnaryOperation* node =
-        new(zone_) UnaryOperation(zone_, op, expression, pos);
+        new (zone_) UnaryOperation(zone_, op, expression, pos, id_gen_);
     VISIT_AND_RETURN(UnaryOperation, node)
   }
 
@@ -3382,7 +3423,7 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
                                       Expression* right,
                                       int pos) {
     BinaryOperation* node =
-        new(zone_) BinaryOperation(zone_, op, left, right, pos);
+        new (zone_) BinaryOperation(zone_, op, left, right, pos, id_gen_);
     VISIT_AND_RETURN(BinaryOperation, node)
   }
 
@@ -3391,7 +3432,7 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
                                     Expression* expr,
                                     int pos) {
     CountOperation* node =
-        new(zone_) CountOperation(zone_, op, is_prefix, expr, pos);
+        new (zone_) CountOperation(zone_, op, is_prefix, expr, pos, id_gen_);
     VISIT_AND_RETURN(CountOperation, node)
   }
 
@@ -3400,7 +3441,7 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
                                         Expression* right,
                                         int pos) {
     CompareOperation* node =
-        new(zone_) CompareOperation(zone_, op, left, right, pos);
+        new (zone_) CompareOperation(zone_, op, left, right, pos, id_gen_);
     VISIT_AND_RETURN(CompareOperation, node)
   }
 
@@ -3408,8 +3449,8 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
                               Expression* then_expression,
                               Expression* else_expression,
                               int position) {
-    Conditional* cond = new(zone_) Conditional(
-        zone_, condition, then_expression, else_expression, position);
+    Conditional* cond = new (zone_) Conditional(
+        zone_, condition, then_expression, else_expression, position, id_gen_);
     VISIT_AND_RETURN(Conditional, cond)
   }
 
@@ -3418,7 +3459,7 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
                             Expression* value,
                             int pos) {
     Assignment* assign =
-        new(zone_) Assignment(zone_, op, target, value, pos);
+        new (zone_) Assignment(zone_, op, target, value, pos, id_gen_);
     assign->Init(zone_, this);
     VISIT_AND_RETURN(Assignment, assign)
   }
@@ -3428,13 +3469,13 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
                   Yield::Kind yield_kind,
                   int pos) {
     if (!expression) expression = NewUndefinedLiteral(pos);
-    Yield* yield = new(zone_) Yield(
-        zone_, generator_object, expression, yield_kind, pos);
+    Yield* yield = new (zone_)
+        Yield(zone_, generator_object, expression, yield_kind, pos, id_gen_);
     VISIT_AND_RETURN(Yield, yield)
   }
 
   Throw* NewThrow(Expression* exception, int pos) {
-    Throw* t = new(zone_) Throw(zone_, exception, pos);
+    Throw* t = new (zone_) Throw(zone_, exception, pos, id_gen_);
     VISIT_AND_RETURN(Throw, t)
   }
 
@@ -3445,13 +3486,13 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
       FunctionLiteral::ParameterFlag has_duplicate_parameters,
       FunctionLiteral::FunctionType function_type,
       FunctionLiteral::IsFunctionFlag is_function,
-      FunctionLiteral::IsParenthesizedFlag is_parenthesized,
-      FunctionLiteral::KindFlag kind, int position) {
+      FunctionLiteral::IsParenthesizedFlag is_parenthesized, FunctionKind kind,
+      int position) {
     FunctionLiteral* lit = new (zone_) FunctionLiteral(
         zone_, name, ast_value_factory, scope, body, materialized_literal_count,
         expected_property_count, handler_count, parameter_count, function_type,
-        has_duplicate_parameters, is_function, is_parenthesized, kind,
-        position);
+        has_duplicate_parameters, is_function, is_parenthesized, kind, position,
+        id_gen_);
     // Top-level literal doesn't count for the AST's properties.
     if (is_function == FunctionLiteral::kIsFunction) {
       visitor_.VisitFunctionLiteral(lit);
@@ -3459,25 +3500,41 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
     return lit;
   }
 
-  NativeFunctionLiteral* NewNativeFunctionLiteral(
-      const AstRawString* name, v8::Extension* extension,
-      int pos) {
+  ClassLiteral* NewClassLiteral(const AstRawString* name, Expression* extends,
+                                Expression* constructor,
+                                ZoneList<ObjectLiteral::Property*>* properties,
+                                int position) {
+    ClassLiteral* lit = new (zone_) ClassLiteral(
+        zone_, name, extends, constructor, properties, position, id_gen_);
+    VISIT_AND_RETURN(ClassLiteral, lit)
+  }
+
+  NativeFunctionLiteral* NewNativeFunctionLiteral(const AstRawString* name,
+                                                  v8::Extension* extension,
+                                                  int pos) {
     NativeFunctionLiteral* lit =
-        new(zone_) NativeFunctionLiteral(zone_, name, extension, pos);
+        new (zone_) NativeFunctionLiteral(zone_, name, extension, pos, id_gen_);
     VISIT_AND_RETURN(NativeFunctionLiteral, lit)
   }
 
   ThisFunction* NewThisFunction(int pos) {
-    ThisFunction* fun = new(zone_) ThisFunction(zone_, pos);
+    ThisFunction* fun = new (zone_) ThisFunction(zone_, pos, id_gen_);
     VISIT_AND_RETURN(ThisFunction, fun)
   }
 
+  SuperReference* NewSuperReference(VariableProxy* this_var, int pos) {
+    SuperReference* super =
+        new (zone_) SuperReference(zone_, this_var, pos, id_gen_);
+    VISIT_AND_RETURN(SuperReference, super);
+  }
+
 #undef VISIT_AND_RETURN
 
  private:
   Zone* zone_;
   Visitor visitor_;
   AstValueFactory* ast_value_factory_;
+  AstNode::IdGen* id_gen_;
 };