| Index: src/ast.h
|
| diff --git a/src/ast.h b/src/ast.h
|
| index bbe92999f56407542e638e8229aa03828b2244ce..0ee44a452bc6d9d7f3c3547c8aae501bf9ee8055 100644
|
| --- a/src/ast.h
|
| +++ b/src/ast.h
|
| @@ -226,13 +226,13 @@ class AstNode: public ZoneObject {
|
| virtual MaterializedLiteral* AsMaterializedLiteral() { return NULL; }
|
|
|
| protected:
|
| - static int GetNextId(Isolate* isolate) {
|
| - return ReserveIdRange(isolate, 1);
|
| + static int GetNextId(Zone* zone) {
|
| + return ReserveIdRange(zone, 1);
|
| }
|
|
|
| - static int ReserveIdRange(Isolate* isolate, int n) {
|
| - int tmp = isolate->ast_node_id();
|
| - isolate->set_ast_node_id(tmp + n);
|
| + static int ReserveIdRange(Zone* zone, int n) {
|
| + int tmp = zone->isolate()->ast_node_id();
|
| + zone->isolate()->set_ast_node_id(tmp + n);
|
| return tmp;
|
| }
|
|
|
| @@ -255,7 +255,7 @@ class AstNode: public ZoneObject {
|
|
|
| class Statement : public AstNode {
|
| public:
|
| - explicit Statement(int position) : AstNode(position) {}
|
| + explicit Statement(Zone* zone, int position) : AstNode(position) {}
|
|
|
| bool IsEmpty() { return AsEmptyStatement() != NULL; }
|
| virtual bool IsJump() const { return false; }
|
| @@ -377,11 +377,11 @@ class Expression : public AstNode {
|
| TypeFeedbackId test_id() const { return test_id_; }
|
|
|
| protected:
|
| - Expression(Isolate* isolate, int pos)
|
| + Expression(Zone* zone, int pos)
|
| : AstNode(pos),
|
| - bounds_(Bounds::Unbounded(isolate)),
|
| - id_(GetNextId(isolate)),
|
| - test_id_(GetNextId(isolate)) {}
|
| + bounds_(Bounds::Unbounded(zone)),
|
| + id_(GetNextId(zone)),
|
| + test_id_(GetNextId(zone)) {}
|
| void set_to_boolean_types(byte types) { to_boolean_types_ = types; }
|
|
|
| private:
|
| @@ -422,13 +422,13 @@ class BreakableStatement : public Statement {
|
|
|
| protected:
|
| BreakableStatement(
|
| - Isolate* isolate, ZoneStringList* labels,
|
| + Zone* zone, ZoneStringList* labels,
|
| BreakableType breakable_type, int position)
|
| - : Statement(position),
|
| + : Statement(zone, position),
|
| labels_(labels),
|
| breakable_type_(breakable_type),
|
| - entry_id_(GetNextId(isolate)),
|
| - exit_id_(GetNextId(isolate)) {
|
| + entry_id_(GetNextId(zone)),
|
| + exit_id_(GetNextId(zone)) {
|
| ASSERT(labels == NULL || labels->length() > 0);
|
| }
|
|
|
| @@ -462,13 +462,12 @@ class Block V8_FINAL : public BreakableStatement {
|
| void set_scope(Scope* scope) { scope_ = scope; }
|
|
|
| protected:
|
| - Block(Isolate* isolate,
|
| + Block(Zone* zone,
|
| ZoneStringList* labels,
|
| int capacity,
|
| bool is_initializer_block,
|
| - int pos,
|
| - Zone* zone)
|
| - : BreakableStatement(isolate, labels, TARGET_FOR_NAMED_ONLY, pos),
|
| + int pos)
|
| + : BreakableStatement(zone, labels, TARGET_FOR_NAMED_ONLY, pos),
|
| statements_(capacity, zone),
|
| is_initializer_block_(is_initializer_block),
|
| scope_(NULL) {
|
| @@ -490,7 +489,8 @@ class Declaration : public AstNode {
|
| virtual bool IsInlineable() const;
|
|
|
| protected:
|
| - Declaration(VariableProxy* proxy,
|
| + Declaration(Zone* zone,
|
| + VariableProxy* proxy,
|
| VariableMode mode,
|
| Scope* scope,
|
| int pos)
|
| @@ -519,11 +519,12 @@ class VariableDeclaration V8_FINAL : public Declaration {
|
| }
|
|
|
| protected:
|
| - VariableDeclaration(VariableProxy* proxy,
|
| + VariableDeclaration(Zone* zone,
|
| + VariableProxy* proxy,
|
| VariableMode mode,
|
| Scope* scope,
|
| int pos)
|
| - : Declaration(proxy, mode, scope, pos) {
|
| + : Declaration(zone, proxy, mode, scope, pos) {
|
| }
|
| };
|
|
|
| @@ -539,12 +540,13 @@ class FunctionDeclaration V8_FINAL : public Declaration {
|
| virtual bool IsInlineable() const V8_OVERRIDE;
|
|
|
| protected:
|
| - FunctionDeclaration(VariableProxy* proxy,
|
| + FunctionDeclaration(Zone* zone,
|
| + VariableProxy* proxy,
|
| VariableMode mode,
|
| FunctionLiteral* fun,
|
| Scope* scope,
|
| int pos)
|
| - : Declaration(proxy, mode, scope, pos),
|
| + : Declaration(zone, proxy, mode, scope, pos),
|
| fun_(fun) {
|
| // At the moment there are no "const functions" in JavaScript...
|
| ASSERT(mode == VAR || mode == LET);
|
| @@ -566,11 +568,12 @@ class ModuleDeclaration V8_FINAL : public Declaration {
|
| }
|
|
|
| protected:
|
| - ModuleDeclaration(VariableProxy* proxy,
|
| + ModuleDeclaration(Zone* zone,
|
| + VariableProxy* proxy,
|
| Module* module,
|
| Scope* scope,
|
| int pos)
|
| - : Declaration(proxy, MODULE, scope, pos),
|
| + : Declaration(zone, proxy, MODULE, scope, pos),
|
| module_(module) {
|
| }
|
|
|
| @@ -589,11 +592,12 @@ class ImportDeclaration V8_FINAL : public Declaration {
|
| }
|
|
|
| protected:
|
| - ImportDeclaration(VariableProxy* proxy,
|
| + ImportDeclaration(Zone* zone,
|
| + VariableProxy* proxy,
|
| Module* module,
|
| Scope* scope,
|
| int pos)
|
| - : Declaration(proxy, LET, scope, pos),
|
| + : Declaration(zone, proxy, LET, scope, pos),
|
| module_(module) {
|
| }
|
|
|
| @@ -611,8 +615,8 @@ class ExportDeclaration V8_FINAL : public Declaration {
|
| }
|
|
|
| protected:
|
| - ExportDeclaration(VariableProxy* proxy, Scope* scope, int pos)
|
| - : Declaration(proxy, LET, scope, pos) {}
|
| + ExportDeclaration(Zone* zone, VariableProxy* proxy, Scope* scope, int pos)
|
| + : Declaration(zone, proxy, LET, scope, pos) {}
|
| };
|
|
|
|
|
| @@ -626,7 +630,7 @@ class Module : public AstNode {
|
| : AstNode(pos),
|
| interface_(Interface::NewModule(zone)),
|
| body_(NULL) {}
|
| - Module(Interface* interface, int pos, Block* body = NULL)
|
| + Module(Zone* zone, Interface* interface, int pos, Block* body = NULL)
|
| : AstNode(pos),
|
| interface_(interface),
|
| body_(body) {}
|
| @@ -642,8 +646,8 @@ class ModuleLiteral V8_FINAL : public Module {
|
| DECLARE_NODE_TYPE(ModuleLiteral)
|
|
|
| protected:
|
| - ModuleLiteral(Block* body, Interface* interface, int pos)
|
| - : Module(interface, pos, body) {}
|
| + ModuleLiteral(Zone* zone, Block* body, Interface* interface, int pos)
|
| + : Module(zone, interface, pos, body) {}
|
| };
|
|
|
|
|
| @@ -654,7 +658,7 @@ class ModuleVariable V8_FINAL : public Module {
|
| VariableProxy* proxy() const { return proxy_; }
|
|
|
| protected:
|
| - inline ModuleVariable(VariableProxy* proxy, int pos);
|
| + inline ModuleVariable(Zone* zone, VariableProxy* proxy, int pos);
|
|
|
| private:
|
| VariableProxy* proxy_;
|
| @@ -669,7 +673,7 @@ class ModulePath V8_FINAL : public Module {
|
| Handle<String> name() const { return name_; }
|
|
|
| protected:
|
| - ModulePath(Module* module, Handle<String> name, Zone* zone, int pos)
|
| + ModulePath(Zone* zone, Module* module, Handle<String> name, int pos)
|
| : Module(zone, pos),
|
| module_(module),
|
| name_(name) {
|
| @@ -688,7 +692,7 @@ class ModuleUrl V8_FINAL : public Module {
|
| Handle<String> url() const { return url_; }
|
|
|
| protected:
|
| - ModuleUrl(Handle<String> url, Zone* zone, int pos)
|
| + ModuleUrl(Zone* zone, Handle<String> url, int pos)
|
| : Module(zone, pos), url_(url) {
|
| }
|
|
|
| @@ -705,8 +709,8 @@ class ModuleStatement V8_FINAL : public Statement {
|
| Block* body() const { return body_; }
|
|
|
| protected:
|
| - ModuleStatement(VariableProxy* proxy, Block* body, int pos)
|
| - : Statement(pos),
|
| + ModuleStatement(Zone* zone, VariableProxy* proxy, Block* body, int pos)
|
| + : Statement(zone, pos),
|
| proxy_(proxy),
|
| body_(body) {
|
| }
|
| @@ -734,10 +738,10 @@ class IterationStatement : public BreakableStatement {
|
| Label* continue_target() { return &continue_target_; }
|
|
|
| protected:
|
| - IterationStatement(Isolate* isolate, ZoneStringList* labels, int pos)
|
| - : BreakableStatement(isolate, labels, TARGET_FOR_ANONYMOUS, pos),
|
| + IterationStatement(Zone* zone, ZoneStringList* labels, int pos)
|
| + : BreakableStatement(zone, labels, TARGET_FOR_ANONYMOUS, pos),
|
| body_(NULL),
|
| - osr_entry_id_(GetNextId(isolate)) {
|
| + osr_entry_id_(GetNextId(zone)) {
|
| }
|
|
|
| void Initialize(Statement* body) {
|
| @@ -768,11 +772,11 @@ class DoWhileStatement V8_FINAL : public IterationStatement {
|
| BailoutId BackEdgeId() const { return back_edge_id_; }
|
|
|
| protected:
|
| - DoWhileStatement(Isolate* isolate, ZoneStringList* labels, int pos)
|
| - : IterationStatement(isolate, labels, pos),
|
| + DoWhileStatement(Zone* zone, ZoneStringList* labels, int pos)
|
| + : IterationStatement(zone, labels, pos),
|
| cond_(NULL),
|
| - continue_id_(GetNextId(isolate)),
|
| - back_edge_id_(GetNextId(isolate)) {
|
| + continue_id_(GetNextId(zone)),
|
| + back_edge_id_(GetNextId(zone)) {
|
| }
|
|
|
| private:
|
| @@ -805,11 +809,11 @@ class WhileStatement V8_FINAL : public IterationStatement {
|
| BailoutId BodyId() const { return body_id_; }
|
|
|
| protected:
|
| - WhileStatement(Isolate* isolate, ZoneStringList* labels, int pos)
|
| - : IterationStatement(isolate, labels, pos),
|
| + WhileStatement(Zone* zone, ZoneStringList* labels, int pos)
|
| + : IterationStatement(zone, labels, pos),
|
| cond_(NULL),
|
| may_have_function_literal_(true),
|
| - body_id_(GetNextId(isolate)) {
|
| + body_id_(GetNextId(zone)) {
|
| }
|
|
|
| private:
|
| @@ -856,15 +860,15 @@ class ForStatement V8_FINAL : public IterationStatement {
|
| void set_loop_variable(Variable* var) { loop_variable_ = var; }
|
|
|
| protected:
|
| - ForStatement(Isolate* isolate, ZoneStringList* labels, int pos)
|
| - : IterationStatement(isolate, labels, pos),
|
| + ForStatement(Zone* zone, ZoneStringList* labels, int pos)
|
| + : IterationStatement(zone, labels, pos),
|
| init_(NULL),
|
| cond_(NULL),
|
| next_(NULL),
|
| may_have_function_literal_(true),
|
| loop_variable_(NULL),
|
| - continue_id_(GetNextId(isolate)),
|
| - body_id_(GetNextId(isolate)) {
|
| + continue_id_(GetNextId(zone)),
|
| + body_id_(GetNextId(zone)) {
|
| }
|
|
|
| private:
|
| @@ -898,8 +902,8 @@ class ForEachStatement : public IterationStatement {
|
| Expression* subject() const { return subject_; }
|
|
|
| protected:
|
| - ForEachStatement(Isolate* isolate, ZoneStringList* labels, int pos)
|
| - : IterationStatement(isolate, labels, pos),
|
| + ForEachStatement(Zone* zone, ZoneStringList* labels, int pos)
|
| + : IterationStatement(zone, labels, pos),
|
| each_(NULL),
|
| subject_(NULL) {
|
| }
|
| @@ -929,11 +933,11 @@ class ForInStatement V8_FINAL : public ForEachStatement {
|
| virtual BailoutId StackCheckId() const V8_OVERRIDE { return body_id_; }
|
|
|
| protected:
|
| - ForInStatement(Isolate* isolate, ZoneStringList* labels, int pos)
|
| - : ForEachStatement(isolate, labels, pos),
|
| + ForInStatement(Zone* zone, ZoneStringList* labels, int pos)
|
| + : ForEachStatement(zone, labels, pos),
|
| for_in_type_(SLOW_FOR_IN),
|
| - body_id_(GetNextId(isolate)),
|
| - prepare_id_(GetNextId(isolate)) {
|
| + body_id_(GetNextId(zone)),
|
| + prepare_id_(GetNextId(zone)) {
|
| }
|
|
|
| ForInType for_in_type_;
|
| @@ -990,13 +994,13 @@ class ForOfStatement V8_FINAL : public ForEachStatement {
|
| BailoutId BackEdgeId() const { return back_edge_id_; }
|
|
|
| protected:
|
| - ForOfStatement(Isolate* isolate, ZoneStringList* labels, int pos)
|
| - : ForEachStatement(isolate, labels, pos),
|
| + ForOfStatement(Zone* zone, ZoneStringList* labels, int pos)
|
| + : ForEachStatement(zone, labels, pos),
|
| assign_iterator_(NULL),
|
| next_result_(NULL),
|
| result_done_(NULL),
|
| assign_each_(NULL),
|
| - back_edge_id_(GetNextId(isolate)) {
|
| + back_edge_id_(GetNextId(zone)) {
|
| }
|
|
|
| Expression* assign_iterator_;
|
| @@ -1016,8 +1020,8 @@ class ExpressionStatement V8_FINAL : public Statement {
|
| virtual bool IsJump() const V8_OVERRIDE { return expression_->IsThrow(); }
|
|
|
| protected:
|
| - ExpressionStatement(Expression* expression, int pos)
|
| - : Statement(pos), expression_(expression) { }
|
| + ExpressionStatement(Zone* zone, Expression* expression, int pos)
|
| + : Statement(zone, pos), expression_(expression) { }
|
|
|
| private:
|
| Expression* expression_;
|
| @@ -1029,7 +1033,7 @@ class JumpStatement : public Statement {
|
| virtual bool IsJump() const V8_FINAL V8_OVERRIDE { return true; }
|
|
|
| protected:
|
| - explicit JumpStatement(int pos) : Statement(pos) {}
|
| + explicit JumpStatement(Zone* zone, int pos) : Statement(zone, pos) {}
|
| };
|
|
|
|
|
| @@ -1040,8 +1044,8 @@ class ContinueStatement V8_FINAL : public JumpStatement {
|
| IterationStatement* target() const { return target_; }
|
|
|
| protected:
|
| - explicit ContinueStatement(IterationStatement* target, int pos)
|
| - : JumpStatement(pos), target_(target) { }
|
| + explicit ContinueStatement(Zone* zone, IterationStatement* target, int pos)
|
| + : JumpStatement(zone, pos), target_(target) { }
|
|
|
| private:
|
| IterationStatement* target_;
|
| @@ -1055,8 +1059,8 @@ class BreakStatement V8_FINAL : public JumpStatement {
|
| BreakableStatement* target() const { return target_; }
|
|
|
| protected:
|
| - explicit BreakStatement(BreakableStatement* target, int pos)
|
| - : JumpStatement(pos), target_(target) { }
|
| + explicit BreakStatement(Zone* zone, BreakableStatement* target, int pos)
|
| + : JumpStatement(zone, pos), target_(target) { }
|
|
|
| private:
|
| BreakableStatement* target_;
|
| @@ -1070,8 +1074,8 @@ class ReturnStatement V8_FINAL : public JumpStatement {
|
| Expression* expression() const { return expression_; }
|
|
|
| protected:
|
| - explicit ReturnStatement(Expression* expression, int pos)
|
| - : JumpStatement(pos), expression_(expression) { }
|
| + explicit ReturnStatement(Zone* zone, Expression* expression, int pos)
|
| + : JumpStatement(zone, pos), expression_(expression) { }
|
|
|
| private:
|
| Expression* expression_;
|
| @@ -1088,8 +1092,9 @@ class WithStatement V8_FINAL : public Statement {
|
|
|
| protected:
|
| WithStatement(
|
| - Scope* scope, Expression* expression, Statement* statement, int pos)
|
| - : Statement(pos),
|
| + Zone* zone, Scope* scope,
|
| + Expression* expression, Statement* statement, int pos)
|
| + : Statement(zone, pos),
|
| scope_(scope),
|
| expression_(expression),
|
| statement_(statement) { }
|
| @@ -1117,11 +1122,11 @@ class CaseClause V8_FINAL : public Expression {
|
|
|
| // Type feedback information.
|
| TypeFeedbackId CompareId() { return compare_id_; }
|
| - Handle<Type> compare_type() { return compare_type_; }
|
| - void set_compare_type(Handle<Type> type) { compare_type_ = type; }
|
| + Type* compare_type() { return compare_type_; }
|
| + void set_compare_type(Type* type) { compare_type_ = type; }
|
|
|
| private:
|
| - CaseClause(Isolate* isolate,
|
| + CaseClause(Zone* zone,
|
| Expression* label,
|
| ZoneList<Statement*>* statements,
|
| int pos);
|
| @@ -1129,7 +1134,7 @@ class CaseClause V8_FINAL : public Expression {
|
| Expression* label_;
|
| Label body_target_;
|
| ZoneList<Statement*>* statements_;
|
| - Handle<Type> compare_type_;
|
| + Type* compare_type_;
|
|
|
| const TypeFeedbackId compare_id_;
|
| const BailoutId entry_id_;
|
| @@ -1149,8 +1154,8 @@ class SwitchStatement V8_FINAL : public BreakableStatement {
|
| ZoneList<CaseClause*>* cases() const { return cases_; }
|
|
|
| protected:
|
| - SwitchStatement(Isolate* isolate, ZoneStringList* labels, int pos)
|
| - : BreakableStatement(isolate, labels, TARGET_FOR_ANONYMOUS, pos),
|
| + SwitchStatement(Zone* zone, ZoneStringList* labels, int pos)
|
| + : BreakableStatement(zone, labels, TARGET_FOR_ANONYMOUS, pos),
|
| tag_(NULL),
|
| cases_(NULL) { }
|
|
|
| @@ -1186,18 +1191,18 @@ class IfStatement V8_FINAL : public Statement {
|
| BailoutId ElseId() const { return else_id_; }
|
|
|
| protected:
|
| - IfStatement(Isolate* isolate,
|
| + IfStatement(Zone* zone,
|
| Expression* condition,
|
| Statement* then_statement,
|
| Statement* else_statement,
|
| int pos)
|
| - : Statement(pos),
|
| + : Statement(zone, pos),
|
| condition_(condition),
|
| then_statement_(then_statement),
|
| else_statement_(else_statement),
|
| - if_id_(GetNextId(isolate)),
|
| - then_id_(GetNextId(isolate)),
|
| - else_id_(GetNextId(isolate)) {
|
| + if_id_(GetNextId(zone)),
|
| + then_id_(GetNextId(zone)),
|
| + else_id_(GetNextId(zone)) {
|
| }
|
|
|
| private:
|
| @@ -1245,8 +1250,8 @@ class TryStatement : public Statement {
|
| ZoneList<Label*>* escaping_targets() const { return escaping_targets_; }
|
|
|
| protected:
|
| - TryStatement(int index, Block* try_block, int pos)
|
| - : Statement(pos),
|
| + TryStatement(Zone* zone, int index, Block* try_block, int pos)
|
| + : Statement(zone, pos),
|
| index_(index),
|
| try_block_(try_block),
|
| escaping_targets_(NULL) { }
|
| @@ -1269,13 +1274,14 @@ class TryCatchStatement V8_FINAL : public TryStatement {
|
| Block* catch_block() const { return catch_block_; }
|
|
|
| protected:
|
| - TryCatchStatement(int index,
|
| + TryCatchStatement(Zone* zone,
|
| + int index,
|
| Block* try_block,
|
| Scope* scope,
|
| Variable* variable,
|
| Block* catch_block,
|
| int pos)
|
| - : TryStatement(index, try_block, pos),
|
| + : TryStatement(zone, index, try_block, pos),
|
| scope_(scope),
|
| variable_(variable),
|
| catch_block_(catch_block) {
|
| @@ -1296,8 +1302,8 @@ class TryFinallyStatement V8_FINAL : public TryStatement {
|
|
|
| protected:
|
| TryFinallyStatement(
|
| - int index, Block* try_block, Block* finally_block, int pos)
|
| - : TryStatement(index, try_block, pos),
|
| + Zone* zone, int index, Block* try_block, Block* finally_block, int pos)
|
| + : TryStatement(zone, index, try_block, pos),
|
| finally_block_(finally_block) { }
|
|
|
| private:
|
| @@ -1310,7 +1316,7 @@ class DebuggerStatement V8_FINAL : public Statement {
|
| DECLARE_NODE_TYPE(DebuggerStatement)
|
|
|
| protected:
|
| - explicit DebuggerStatement(int pos): Statement(pos) {}
|
| + explicit DebuggerStatement(Zone* zone, int pos): Statement(zone, pos) {}
|
| };
|
|
|
|
|
| @@ -1319,7 +1325,7 @@ class EmptyStatement V8_FINAL : public Statement {
|
| DECLARE_NODE_TYPE(EmptyStatement)
|
|
|
| protected:
|
| - explicit EmptyStatement(int pos): Statement(pos) {}
|
| + explicit EmptyStatement(Zone* zone, int pos): Statement(zone, pos) {}
|
| };
|
|
|
|
|
| @@ -1376,11 +1382,10 @@ class Literal V8_FINAL : public Expression {
|
| TypeFeedbackId LiteralFeedbackId() const { return reuse(id()); }
|
|
|
| protected:
|
| - Literal(
|
| - Isolate* isolate, Handle<Object> value, int position)
|
| - : Expression(isolate, position),
|
| + Literal(Zone* zone, Handle<Object> value, int position)
|
| + : Expression(zone, position),
|
| value_(value),
|
| - isolate_(isolate) { }
|
| + isolate_(zone->isolate()) { }
|
|
|
| private:
|
| Handle<String> ToString();
|
| @@ -1405,10 +1410,10 @@ class MaterializedLiteral : public Expression {
|
| }
|
|
|
| protected:
|
| - MaterializedLiteral(Isolate* isolate,
|
| + MaterializedLiteral(Zone* zone,
|
| int literal_index,
|
| int pos)
|
| - : Expression(isolate, pos),
|
| + : Expression(zone, pos),
|
| literal_index_(literal_index),
|
| is_simple_(false),
|
| depth_(0) {}
|
| @@ -1456,7 +1461,7 @@ class ObjectLiteralProperty V8_FINAL : public ZoneObject {
|
| PROTOTYPE // Property is __proto__.
|
| };
|
|
|
| - ObjectLiteralProperty(Literal* key, Expression* value, Isolate* isolate);
|
| + ObjectLiteralProperty(Zone* zone, Literal* key, Expression* value);
|
|
|
| Literal* key() { return key_; }
|
| Expression* value() { return value_; }
|
| @@ -1475,7 +1480,7 @@ class ObjectLiteralProperty V8_FINAL : public ZoneObject {
|
| protected:
|
| template<class> friend class AstNodeFactory;
|
|
|
| - ObjectLiteralProperty(bool is_getter, FunctionLiteral* value);
|
| + ObjectLiteralProperty(Zone* zone, bool is_getter, FunctionLiteral* value);
|
| void set_key(Literal* key) { key_ = key; }
|
|
|
| private:
|
| @@ -1527,13 +1532,13 @@ class ObjectLiteral V8_FINAL : public MaterializedLiteral {
|
| };
|
|
|
| protected:
|
| - ObjectLiteral(Isolate* isolate,
|
| + ObjectLiteral(Zone* zone,
|
| ZoneList<Property*>* properties,
|
| int literal_index,
|
| int boilerplate_properties,
|
| bool has_function,
|
| int pos)
|
| - : MaterializedLiteral(isolate, literal_index, pos),
|
| + : MaterializedLiteral(zone, literal_index, pos),
|
| properties_(properties),
|
| boilerplate_properties_(boilerplate_properties),
|
| fast_elements_(false),
|
| @@ -1559,12 +1564,12 @@ class RegExpLiteral V8_FINAL : public MaterializedLiteral {
|
| Handle<String> flags() const { return flags_; }
|
|
|
| protected:
|
| - RegExpLiteral(Isolate* isolate,
|
| + RegExpLiteral(Zone* zone,
|
| Handle<String> pattern,
|
| Handle<String> flags,
|
| int literal_index,
|
| int pos)
|
| - : MaterializedLiteral(isolate, literal_index, pos),
|
| + : MaterializedLiteral(zone, literal_index, pos),
|
| pattern_(pattern),
|
| flags_(flags) {
|
| set_depth(1);
|
| @@ -1600,13 +1605,13 @@ class ArrayLiteral V8_FINAL : public MaterializedLiteral {
|
| };
|
|
|
| protected:
|
| - ArrayLiteral(Isolate* isolate,
|
| + ArrayLiteral(Zone* zone,
|
| ZoneList<Expression*>* values,
|
| int literal_index,
|
| int pos)
|
| - : MaterializedLiteral(isolate, literal_index, pos),
|
| + : MaterializedLiteral(zone, literal_index, pos),
|
| values_(values),
|
| - first_element_id_(ReserveIdRange(isolate, values->length())) {}
|
| + first_element_id_(ReserveIdRange(zone, values->length())) {}
|
|
|
| private:
|
| Handle<FixedArray> constant_elements_;
|
| @@ -1646,9 +1651,9 @@ class VariableProxy V8_FINAL : public Expression {
|
| void BindTo(Variable* var);
|
|
|
| protected:
|
| - VariableProxy(Isolate* isolate, Variable* var, int position);
|
| + VariableProxy(Zone* zone, Variable* var, int position);
|
|
|
| - VariableProxy(Isolate* isolate,
|
| + VariableProxy(Zone* zone,
|
| Handle<String> name,
|
| bool is_this,
|
| Interface* interface,
|
| @@ -1702,14 +1707,14 @@ class Property V8_FINAL : public Expression {
|
| TypeFeedbackId PropertyFeedbackId() { return reuse(id()); }
|
|
|
| protected:
|
| - Property(Isolate* isolate,
|
| + Property(Zone* zone,
|
| Expression* obj,
|
| Expression* key,
|
| int pos)
|
| - : Expression(isolate, pos),
|
| + : Expression(zone, pos),
|
| obj_(obj),
|
| key_(key),
|
| - load_id_(GetNextId(isolate)),
|
| + load_id_(GetNextId(zone)),
|
| is_pre_monomorphic_(false),
|
| is_uninitialized_(false),
|
| is_string_access_(false),
|
| @@ -1785,17 +1790,17 @@ class Call V8_FINAL : public Expression {
|
| #endif
|
|
|
| protected:
|
| - Call(Isolate* isolate,
|
| + Call(Zone* zone,
|
| Expression* expression,
|
| ZoneList<Expression*>* arguments,
|
| int pos)
|
| - : Expression(isolate, pos),
|
| + : Expression(zone, pos),
|
| expression_(expression),
|
| arguments_(arguments),
|
| is_monomorphic_(false),
|
| keyed_array_call_is_holey_(true),
|
| check_type_(RECEIVER_MAP_CHECK),
|
| - return_id_(GetNextId(isolate)) { }
|
| + return_id_(GetNextId(zone)) { }
|
|
|
| private:
|
| Expression* expression_;
|
| @@ -1833,16 +1838,16 @@ class CallNew V8_FINAL : public Expression {
|
| BailoutId ReturnId() const { return return_id_; }
|
|
|
| protected:
|
| - CallNew(Isolate* isolate,
|
| + CallNew(Zone* zone,
|
| Expression* expression,
|
| ZoneList<Expression*>* arguments,
|
| int pos)
|
| - : Expression(isolate, pos),
|
| + : Expression(zone, pos),
|
| expression_(expression),
|
| arguments_(arguments),
|
| is_monomorphic_(false),
|
| elements_kind_(GetInitialFastElementsKind()),
|
| - return_id_(GetNextId(isolate)) { }
|
| + return_id_(GetNextId(zone)) { }
|
|
|
| private:
|
| Expression* expression_;
|
| @@ -1873,12 +1878,12 @@ class CallRuntime V8_FINAL : public Expression {
|
| TypeFeedbackId CallRuntimeFeedbackId() const { return reuse(id()); }
|
|
|
| protected:
|
| - CallRuntime(Isolate* isolate,
|
| + CallRuntime(Zone* zone,
|
| Handle<String> name,
|
| const Runtime::Function* function,
|
| ZoneList<Expression*>* arguments,
|
| int pos)
|
| - : Expression(isolate, pos),
|
| + : Expression(zone, pos),
|
| name_(name),
|
| function_(function),
|
| arguments_(arguments) { }
|
| @@ -1904,15 +1909,15 @@ class UnaryOperation V8_FINAL : public Expression {
|
| TypeFeedbackOracle* oracle) V8_OVERRIDE;
|
|
|
| protected:
|
| - UnaryOperation(Isolate* isolate,
|
| + UnaryOperation(Zone* zone,
|
| Token::Value op,
|
| Expression* expression,
|
| int pos)
|
| - : Expression(isolate, pos),
|
| + : Expression(zone, pos),
|
| op_(op),
|
| expression_(expression),
|
| - materialize_true_id_(GetNextId(isolate)),
|
| - materialize_false_id_(GetNextId(isolate)) {
|
| + materialize_true_id_(GetNextId(zone)),
|
| + materialize_false_id_(GetNextId(zone)) {
|
| ASSERT(Token::IsUnaryOp(op));
|
| }
|
|
|
| @@ -1947,16 +1952,16 @@ class BinaryOperation V8_FINAL : public Expression {
|
| TypeFeedbackOracle* oracle) V8_OVERRIDE;
|
|
|
| protected:
|
| - BinaryOperation(Isolate* isolate,
|
| + BinaryOperation(Zone* zone,
|
| Token::Value op,
|
| Expression* left,
|
| Expression* right,
|
| int pos)
|
| - : Expression(isolate, pos),
|
| + : Expression(zone, pos),
|
| op_(op),
|
| left_(left),
|
| right_(right),
|
| - right_id_(GetNextId(isolate)) {
|
| + right_id_(GetNextId(zone)) {
|
| ASSERT(Token::IsBinaryOp(op));
|
| }
|
|
|
| @@ -1998,9 +2003,9 @@ class CountOperation V8_FINAL : public Expression {
|
| virtual KeyedAccessStoreMode GetStoreMode() V8_OVERRIDE {
|
| return store_mode_;
|
| }
|
| - Handle<Type> type() const { return type_; }
|
| + Type* type() const { return type_; }
|
| void set_store_mode(KeyedAccessStoreMode mode) { store_mode_ = mode; }
|
| - void set_type(Handle<Type> type) { type_ = type; }
|
| + void set_type(Type* type) { type_ = type; }
|
|
|
| BailoutId AssignmentId() const { return assignment_id_; }
|
|
|
| @@ -2008,25 +2013,25 @@ class CountOperation V8_FINAL : public Expression {
|
| TypeFeedbackId CountStoreFeedbackId() const { return reuse(id()); }
|
|
|
| protected:
|
| - CountOperation(Isolate* isolate,
|
| + CountOperation(Zone* zone,
|
| Token::Value op,
|
| bool is_prefix,
|
| Expression* expr,
|
| int pos)
|
| - : Expression(isolate, pos),
|
| + : Expression(zone, pos),
|
| op_(op),
|
| is_prefix_(is_prefix),
|
| store_mode_(STANDARD_STORE),
|
| expression_(expr),
|
| - assignment_id_(GetNextId(isolate)),
|
| - count_id_(GetNextId(isolate)) {}
|
| + assignment_id_(GetNextId(zone)),
|
| + count_id_(GetNextId(zone)) {}
|
|
|
| private:
|
| Token::Value op_;
|
| bool is_prefix_ : 1;
|
| KeyedAccessStoreMode store_mode_ : 5; // Windows treats as signed,
|
| // must have extra bit.
|
| - Handle<Type> type_;
|
| + Type* type_;
|
|
|
| Expression* expression_;
|
| const BailoutId assignment_id_;
|
| @@ -2045,8 +2050,8 @@ class CompareOperation V8_FINAL : public Expression {
|
|
|
| // Type feedback information.
|
| TypeFeedbackId CompareOperationFeedbackId() const { return reuse(id()); }
|
| - Handle<Type> combined_type() const { return combined_type_; }
|
| - void set_combined_type(Handle<Type> type) { combined_type_ = type; }
|
| + Type* combined_type() const { return combined_type_; }
|
| + void set_combined_type(Type* type) { combined_type_ = type; }
|
|
|
| // Match special cases.
|
| bool IsLiteralCompareTypeof(Expression** expr, Handle<String>* check);
|
| @@ -2054,16 +2059,16 @@ class CompareOperation V8_FINAL : public Expression {
|
| bool IsLiteralCompareNull(Expression** expr);
|
|
|
| protected:
|
| - CompareOperation(Isolate* isolate,
|
| + CompareOperation(Zone* zone,
|
| Token::Value op,
|
| Expression* left,
|
| Expression* right,
|
| int pos)
|
| - : Expression(isolate, pos),
|
| + : Expression(zone, pos),
|
| op_(op),
|
| left_(left),
|
| right_(right),
|
| - combined_type_(Type::None(isolate)) {
|
| + combined_type_(Type::None(zone)) {
|
| ASSERT(Token::IsCompareOp(op));
|
| }
|
|
|
| @@ -2072,7 +2077,7 @@ class CompareOperation V8_FINAL : public Expression {
|
| Expression* left_;
|
| Expression* right_;
|
|
|
| - Handle<Type> combined_type_;
|
| + Type* combined_type_;
|
| };
|
|
|
|
|
| @@ -2088,17 +2093,17 @@ class Conditional V8_FINAL : public Expression {
|
| BailoutId ElseId() const { return else_id_; }
|
|
|
| protected:
|
| - Conditional(Isolate* isolate,
|
| + Conditional(Zone* zone,
|
| Expression* condition,
|
| Expression* then_expression,
|
| Expression* else_expression,
|
| int position)
|
| - : Expression(isolate, position),
|
| + : Expression(zone, position),
|
| condition_(condition),
|
| then_expression_(then_expression),
|
| else_expression_(else_expression),
|
| - then_id_(GetNextId(isolate)),
|
| - else_id_(GetNextId(isolate)) { }
|
| + then_id_(GetNextId(zone)),
|
| + else_id_(GetNextId(zone)) { }
|
|
|
| private:
|
| Expression* condition_;
|
| @@ -2148,14 +2153,14 @@ class Assignment V8_FINAL : public Expression {
|
| void set_store_mode(KeyedAccessStoreMode mode) { store_mode_ = mode; }
|
|
|
| protected:
|
| - Assignment(Isolate* isolate,
|
| + Assignment(Zone* zone,
|
| Token::Value op,
|
| Expression* target,
|
| Expression* value,
|
| int pos);
|
|
|
| template<class Visitor>
|
| - void Init(Isolate* isolate, AstNodeFactory<Visitor>* factory) {
|
| + void Init(Zone* zone, AstNodeFactory<Visitor>* factory) {
|
| ASSERT(Token::IsAssignmentOp(op_));
|
| if (is_compound()) {
|
| binary_operation_ = factory->NewBinaryOperation(
|
| @@ -2206,12 +2211,12 @@ class Yield V8_FINAL : public Expression {
|
| }
|
|
|
| protected:
|
| - Yield(Isolate* isolate,
|
| + Yield(Zone* zone,
|
| Expression* generator_object,
|
| Expression* expression,
|
| Kind yield_kind,
|
| int pos)
|
| - : Expression(isolate, pos),
|
| + : Expression(zone, pos),
|
| generator_object_(generator_object),
|
| expression_(expression),
|
| yield_kind_(yield_kind),
|
| @@ -2232,8 +2237,8 @@ class Throw V8_FINAL : public Expression {
|
| Expression* exception() const { return exception_; }
|
|
|
| protected:
|
| - Throw(Isolate* isolate, Expression* exception, int pos)
|
| - : Expression(isolate, pos), exception_(exception) {}
|
| + Throw(Zone* zone, Expression* exception, int pos)
|
| + : Expression(zone, pos), exception_(exception) {}
|
|
|
| private:
|
| Expression* exception_;
|
| @@ -2339,7 +2344,7 @@ class FunctionLiteral V8_FINAL : public Expression {
|
| }
|
|
|
| protected:
|
| - FunctionLiteral(Isolate* isolate,
|
| + FunctionLiteral(Zone* zone,
|
| Handle<String> name,
|
| Scope* scope,
|
| ZoneList<Statement*>* body,
|
| @@ -2353,11 +2358,11 @@ class FunctionLiteral V8_FINAL : public Expression {
|
| IsParenthesizedFlag is_parenthesized,
|
| IsGeneratorFlag is_generator,
|
| int position)
|
| - : Expression(isolate, position),
|
| + : Expression(zone, position),
|
| name_(name),
|
| scope_(scope),
|
| body_(body),
|
| - inferred_name_(isolate->factory()->empty_string()),
|
| + inferred_name_(zone->isolate()->factory()->empty_string()),
|
| dont_optimize_reason_(kNoReason),
|
| materialized_literal_count_(materialized_literal_count),
|
| expected_property_count_(expected_property_count),
|
| @@ -2408,8 +2413,8 @@ class NativeFunctionLiteral V8_FINAL : public Expression {
|
|
|
| protected:
|
| NativeFunctionLiteral(
|
| - Isolate* isolate, Handle<String> name, v8::Extension* extension, int pos)
|
| - : Expression(isolate, pos), name_(name), extension_(extension) {}
|
| + Zone* zone, Handle<String> name, v8::Extension* extension, int pos)
|
| + : Expression(zone, pos), name_(name), extension_(extension) {}
|
|
|
| private:
|
| Handle<String> name_;
|
| @@ -2422,7 +2427,7 @@ class ThisFunction V8_FINAL : public Expression {
|
| DECLARE_NODE_TYPE(ThisFunction)
|
|
|
| protected:
|
| - explicit ThisFunction(Isolate* isolate, int pos): Expression(isolate, pos) {}
|
| + explicit ThisFunction(Zone* zone, int pos): Expression(zone, pos) {}
|
| };
|
|
|
| #undef DECLARE_NODE_TYPE
|
| @@ -2789,8 +2794,8 @@ class RegExpEmpty V8_FINAL : public RegExpTree {
|
| // ----------------------------------------------------------------------------
|
| // Out-of-line inline constructors (to side-step cyclic dependencies).
|
|
|
| -inline ModuleVariable::ModuleVariable(VariableProxy* proxy, int pos)
|
| - : Module(proxy->interface(), pos),
|
| +inline ModuleVariable::ModuleVariable(Zone* zone, VariableProxy* proxy, int pos)
|
| + : Module(zone, proxy->interface(), pos),
|
| proxy_(proxy) {
|
| }
|
|
|
| @@ -2822,7 +2827,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) V8_FINAL V8_OVERRIDE { \
|
| if (!CheckStackOverflow()) node->Accept(this); \
|
| } \
|
| \
|
| @@ -2832,19 +2837,20 @@ public: \
|
| \
|
| bool CheckStackOverflow() { \
|
| if (stack_overflow_) return true; \
|
| - StackLimitCheck check(isolate_); \
|
| + StackLimitCheck check(zone_->isolate()); \
|
| if (!check.HasOverflowed()) return false; \
|
| return (stack_overflow_ = true); \
|
| } \
|
| \
|
| private: \
|
| - void InitializeAstVisitor(Isolate* isolate) { \
|
| - isolate_ = isolate; \
|
| + void InitializeAstVisitor(Zone* zone) { \
|
| + zone_ = zone; \
|
| stack_overflow_ = false; \
|
| } \
|
| - Isolate* isolate() { return isolate_; } \
|
| + Zone* zone() { return zone_; } \
|
| + Isolate* isolate() { return zone_->isolate(); } \
|
| \
|
| - Isolate* isolate_; \
|
| + Zone* zone_; \
|
| bool stack_overflow_
|
|
|
|
|
| @@ -2895,9 +2901,7 @@ class AstNullVisitor BASE_EMBEDDED {
|
| template<class Visitor>
|
| class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| public:
|
| - AstNodeFactory(Isolate* isolate, Zone* zone)
|
| - : isolate_(isolate),
|
| - zone_(zone) { }
|
| + explicit AstNodeFactory(Zone* zone) : zone_(zone) { }
|
|
|
| Visitor* visitor() { return &visitor_; }
|
|
|
| @@ -2910,7 +2914,7 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| Scope* scope,
|
| int pos) {
|
| VariableDeclaration* decl =
|
| - new(zone_) VariableDeclaration(proxy, mode, scope, pos);
|
| + new(zone_) VariableDeclaration(zone_, proxy, mode, scope, pos);
|
| VISIT_AND_RETURN(VariableDeclaration, decl)
|
| }
|
|
|
| @@ -2920,7 +2924,7 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| Scope* scope,
|
| int pos) {
|
| FunctionDeclaration* decl =
|
| - new(zone_) FunctionDeclaration(proxy, mode, fun, scope, pos);
|
| + new(zone_) FunctionDeclaration(zone_, proxy, mode, fun, scope, pos);
|
| VISIT_AND_RETURN(FunctionDeclaration, decl)
|
| }
|
|
|
| @@ -2929,7 +2933,7 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| Scope* scope,
|
| int pos) {
|
| ModuleDeclaration* decl =
|
| - new(zone_) ModuleDeclaration(proxy, module, scope, pos);
|
| + new(zone_) ModuleDeclaration(zone_, proxy, module, scope, pos);
|
| VISIT_AND_RETURN(ModuleDeclaration, decl)
|
| }
|
|
|
| @@ -2938,7 +2942,7 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| Scope* scope,
|
| int pos) {
|
| ImportDeclaration* decl =
|
| - new(zone_) ImportDeclaration(proxy, module, scope, pos);
|
| + new(zone_) ImportDeclaration(zone_, proxy, module, scope, pos);
|
| VISIT_AND_RETURN(ImportDeclaration, decl)
|
| }
|
|
|
| @@ -2946,27 +2950,28 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| Scope* scope,
|
| int pos) {
|
| ExportDeclaration* decl =
|
| - new(zone_) ExportDeclaration(proxy, scope, pos);
|
| + new(zone_) ExportDeclaration(zone_, proxy, scope, pos);
|
| VISIT_AND_RETURN(ExportDeclaration, decl)
|
| }
|
|
|
| ModuleLiteral* NewModuleLiteral(Block* body, Interface* interface, int pos) {
|
| - ModuleLiteral* module = new(zone_) ModuleLiteral(body, interface, pos);
|
| + ModuleLiteral* module =
|
| + new(zone_) ModuleLiteral(zone_, body, interface, pos);
|
| VISIT_AND_RETURN(ModuleLiteral, module)
|
| }
|
|
|
| ModuleVariable* NewModuleVariable(VariableProxy* proxy, int pos) {
|
| - ModuleVariable* module = new(zone_) ModuleVariable(proxy, pos);
|
| + ModuleVariable* module = new(zone_) ModuleVariable(zone_, proxy, pos);
|
| VISIT_AND_RETURN(ModuleVariable, module)
|
| }
|
|
|
| ModulePath* NewModulePath(Module* origin, Handle<String> name, int pos) {
|
| - ModulePath* module = new(zone_) ModulePath(origin, name, zone_, pos);
|
| + ModulePath* module = new(zone_) ModulePath(zone_, origin, name, pos);
|
| VISIT_AND_RETURN(ModulePath, module)
|
| }
|
|
|
| ModuleUrl* NewModuleUrl(Handle<String> url, int pos) {
|
| - ModuleUrl* module = new(zone_) ModuleUrl(url, zone_, pos);
|
| + ModuleUrl* module = new(zone_) ModuleUrl(zone_, url, pos);
|
| VISIT_AND_RETURN(ModuleUrl, module)
|
| }
|
|
|
| @@ -2975,13 +2980,13 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| bool is_initializer_block,
|
| int pos) {
|
| Block* block = new(zone_) Block(
|
| - isolate_, labels, capacity, is_initializer_block, pos, zone_);
|
| + zone_, labels, capacity, is_initializer_block, pos);
|
| VISIT_AND_RETURN(Block, block)
|
| }
|
|
|
| #define STATEMENT_WITH_LABELS(NodeType) \
|
| NodeType* New##NodeType(ZoneStringList* labels, int pos) { \
|
| - NodeType* stmt = new(zone_) NodeType(isolate_, labels, pos); \
|
| + NodeType* stmt = new(zone_) NodeType(zone_, labels, pos); \
|
| VISIT_AND_RETURN(NodeType, stmt); \
|
| }
|
| STATEMENT_WITH_LABELS(DoWhileStatement)
|
| @@ -2995,11 +3000,11 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| int pos) {
|
| switch (visit_mode) {
|
| case ForEachStatement::ENUMERATE: {
|
| - ForInStatement* stmt = new(zone_) ForInStatement(isolate_, labels, pos);
|
| + ForInStatement* stmt = new(zone_) ForInStatement(zone_, labels, pos);
|
| VISIT_AND_RETURN(ForInStatement, stmt);
|
| }
|
| case ForEachStatement::ITERATE: {
|
| - ForOfStatement* stmt = new(zone_) ForOfStatement(isolate_, labels, pos);
|
| + ForOfStatement* stmt = new(zone_) ForOfStatement(zone_, labels, pos);
|
| VISIT_AND_RETURN(ForOfStatement, stmt);
|
| }
|
| }
|
| @@ -3009,27 +3014,28 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
|
|
| ModuleStatement* NewModuleStatement(
|
| VariableProxy* proxy, Block* body, int pos) {
|
| - ModuleStatement* stmt = new(zone_) ModuleStatement(proxy, body, pos);
|
| + ModuleStatement* stmt = new(zone_) ModuleStatement(zone_, proxy, body, pos);
|
| VISIT_AND_RETURN(ModuleStatement, stmt)
|
| }
|
|
|
| ExpressionStatement* NewExpressionStatement(Expression* expression, int pos) {
|
| - ExpressionStatement* stmt = new(zone_) ExpressionStatement(expression, pos);
|
| + ExpressionStatement* stmt =
|
| + new(zone_) ExpressionStatement(zone_, expression, pos);
|
| VISIT_AND_RETURN(ExpressionStatement, stmt)
|
| }
|
|
|
| ContinueStatement* NewContinueStatement(IterationStatement* target, int pos) {
|
| - ContinueStatement* stmt = new(zone_) ContinueStatement(target, pos);
|
| + ContinueStatement* stmt = new(zone_) ContinueStatement(zone_, target, pos);
|
| VISIT_AND_RETURN(ContinueStatement, stmt)
|
| }
|
|
|
| BreakStatement* NewBreakStatement(BreakableStatement* target, int pos) {
|
| - BreakStatement* stmt = new(zone_) BreakStatement(target, pos);
|
| + BreakStatement* stmt = new(zone_) BreakStatement(zone_, target, pos);
|
| VISIT_AND_RETURN(BreakStatement, stmt)
|
| }
|
|
|
| ReturnStatement* NewReturnStatement(Expression* expression, int pos) {
|
| - ReturnStatement* stmt = new(zone_) ReturnStatement(expression, pos);
|
| + ReturnStatement* stmt = new(zone_) ReturnStatement(zone_, expression, pos);
|
| VISIT_AND_RETURN(ReturnStatement, stmt)
|
| }
|
|
|
| @@ -3038,7 +3044,7 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| Statement* statement,
|
| int pos) {
|
| WithStatement* stmt = new(zone_) WithStatement(
|
| - scope, expression, statement, pos);
|
| + zone_, scope, expression, statement, pos);
|
| VISIT_AND_RETURN(WithStatement, stmt)
|
| }
|
|
|
| @@ -3047,7 +3053,7 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| Statement* else_statement,
|
| int pos) {
|
| IfStatement* stmt = new(zone_) IfStatement(
|
| - isolate_, condition, then_statement, else_statement, pos);
|
| + zone_, condition, then_statement, else_statement, pos);
|
| VISIT_AND_RETURN(IfStatement, stmt)
|
| }
|
|
|
| @@ -3058,7 +3064,7 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| Block* catch_block,
|
| int pos) {
|
| TryCatchStatement* stmt = new(zone_) TryCatchStatement(
|
| - index, try_block, scope, variable, catch_block, pos);
|
| + zone_, index, try_block, scope, variable, catch_block, pos);
|
| VISIT_AND_RETURN(TryCatchStatement, stmt)
|
| }
|
|
|
| @@ -3066,34 +3072,35 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| Block* try_block,
|
| Block* finally_block,
|
| int pos) {
|
| - TryFinallyStatement* stmt =
|
| - new(zone_) TryFinallyStatement(index, try_block, finally_block, pos);
|
| + TryFinallyStatement* stmt = new(zone_) TryFinallyStatement(
|
| + zone_, index, try_block, finally_block, pos);
|
| VISIT_AND_RETURN(TryFinallyStatement, stmt)
|
| }
|
|
|
| DebuggerStatement* NewDebuggerStatement(int pos) {
|
| - DebuggerStatement* stmt = new(zone_) DebuggerStatement(pos);
|
| + DebuggerStatement* stmt = new(zone_) DebuggerStatement(zone_, pos);
|
| VISIT_AND_RETURN(DebuggerStatement, stmt)
|
| }
|
|
|
| EmptyStatement* NewEmptyStatement(int pos) {
|
| - return new(zone_) EmptyStatement(pos);
|
| + return new(zone_) EmptyStatement(zone_, pos);
|
| }
|
|
|
| CaseClause* NewCaseClause(
|
| Expression* label, ZoneList<Statement*>* statements, int pos) {
|
| CaseClause* clause =
|
| - new(zone_) CaseClause(isolate_, label, statements, pos);
|
| + new(zone_) CaseClause(zone_, label, statements, pos);
|
| VISIT_AND_RETURN(CaseClause, clause)
|
| }
|
|
|
| Literal* NewLiteral(Handle<Object> handle, int pos) {
|
| - Literal* lit = new(zone_) Literal(isolate_, handle, pos);
|
| + Literal* lit = new(zone_) Literal(zone_, handle, pos);
|
| VISIT_AND_RETURN(Literal, lit)
|
| }
|
|
|
| Literal* NewNumberLiteral(double number, int pos) {
|
| - return NewLiteral(isolate_->factory()->NewNumber(number, TENURED), pos);
|
| + return NewLiteral(
|
| + zone_->isolate()->factory()->NewNumber(number, TENURED), pos);
|
| }
|
|
|
| ObjectLiteral* NewObjectLiteral(
|
| @@ -3103,16 +3110,21 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| bool has_function,
|
| int pos) {
|
| ObjectLiteral* lit = new(zone_) ObjectLiteral(
|
| - isolate_, properties, literal_index, boilerplate_properties,
|
| + zone_, properties, literal_index, boilerplate_properties,
|
| has_function, pos);
|
| VISIT_AND_RETURN(ObjectLiteral, lit)
|
| }
|
|
|
| + ObjectLiteral::Property* NewObjectLiteralProperty(Literal* key,
|
| + Expression* value) {
|
| + return new(zone_) ObjectLiteral::Property(zone_, key, value);
|
| + }
|
| +
|
| ObjectLiteral::Property* NewObjectLiteralProperty(bool is_getter,
|
| FunctionLiteral* value,
|
| int pos) {
|
| ObjectLiteral::Property* prop =
|
| - new(zone_) ObjectLiteral::Property(is_getter, value);
|
| + new(zone_) ObjectLiteral::Property(zone_, is_getter, value);
|
| prop->set_key(NewLiteral(value->name(), pos));
|
| return prop; // Not an AST node, will not be visited.
|
| }
|
| @@ -3122,7 +3134,7 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| int literal_index,
|
| int pos) {
|
| RegExpLiteral* lit =
|
| - new(zone_) RegExpLiteral(isolate_, pattern, flags, literal_index, pos);
|
| + new(zone_) RegExpLiteral(zone_, pattern, flags, literal_index, pos);
|
| VISIT_AND_RETURN(RegExpLiteral, lit);
|
| }
|
|
|
| @@ -3130,13 +3142,13 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| int literal_index,
|
| int pos) {
|
| ArrayLiteral* lit = new(zone_) ArrayLiteral(
|
| - isolate_, values, literal_index, pos);
|
| + zone_, values, literal_index, pos);
|
| VISIT_AND_RETURN(ArrayLiteral, lit)
|
| }
|
|
|
| VariableProxy* NewVariableProxy(Variable* var,
|
| int pos = RelocInfo::kNoPosition) {
|
| - VariableProxy* proxy = new(zone_) VariableProxy(isolate_, var, pos);
|
| + VariableProxy* proxy = new(zone_) VariableProxy(zone_, var, pos);
|
| VISIT_AND_RETURN(VariableProxy, proxy)
|
| }
|
|
|
| @@ -3145,26 +3157,26 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| Interface* interface = Interface::NewValue(),
|
| int position = RelocInfo::kNoPosition) {
|
| VariableProxy* proxy =
|
| - new(zone_) VariableProxy(isolate_, name, is_this, interface, position);
|
| + new(zone_) VariableProxy(zone_, name, is_this, interface, position);
|
| VISIT_AND_RETURN(VariableProxy, proxy)
|
| }
|
|
|
| Property* NewProperty(Expression* obj, Expression* key, int pos) {
|
| - Property* prop = new(zone_) Property(isolate_, obj, key, pos);
|
| + Property* prop = new(zone_) Property(zone_, obj, key, pos);
|
| VISIT_AND_RETURN(Property, prop)
|
| }
|
|
|
| Call* NewCall(Expression* expression,
|
| ZoneList<Expression*>* arguments,
|
| int pos) {
|
| - Call* call = new(zone_) Call(isolate_, expression, arguments, pos);
|
| + Call* call = new(zone_) Call(zone_, expression, arguments, pos);
|
| VISIT_AND_RETURN(Call, call)
|
| }
|
|
|
| CallNew* NewCallNew(Expression* expression,
|
| ZoneList<Expression*>* arguments,
|
| int pos) {
|
| - CallNew* call = new(zone_) CallNew(isolate_, expression, arguments, pos);
|
| + CallNew* call = new(zone_) CallNew(zone_, expression, arguments, pos);
|
| VISIT_AND_RETURN(CallNew, call)
|
| }
|
|
|
| @@ -3173,7 +3185,7 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| ZoneList<Expression*>* arguments,
|
| int pos) {
|
| CallRuntime* call =
|
| - new(zone_) CallRuntime(isolate_, name, function, arguments, pos);
|
| + new(zone_) CallRuntime(zone_, name, function, arguments, pos);
|
| VISIT_AND_RETURN(CallRuntime, call)
|
| }
|
|
|
| @@ -3181,7 +3193,7 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| Expression* expression,
|
| int pos) {
|
| UnaryOperation* node =
|
| - new(zone_) UnaryOperation(isolate_, op, expression, pos);
|
| + new(zone_) UnaryOperation(zone_, op, expression, pos);
|
| VISIT_AND_RETURN(UnaryOperation, node)
|
| }
|
|
|
| @@ -3190,7 +3202,7 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| Expression* right,
|
| int pos) {
|
| BinaryOperation* node =
|
| - new(zone_) BinaryOperation(isolate_, op, left, right, pos);
|
| + new(zone_) BinaryOperation(zone_, op, left, right, pos);
|
| VISIT_AND_RETURN(BinaryOperation, node)
|
| }
|
|
|
| @@ -3199,7 +3211,7 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| Expression* expr,
|
| int pos) {
|
| CountOperation* node =
|
| - new(zone_) CountOperation(isolate_, op, is_prefix, expr, pos);
|
| + new(zone_) CountOperation(zone_, op, is_prefix, expr, pos);
|
| VISIT_AND_RETURN(CountOperation, node)
|
| }
|
|
|
| @@ -3208,7 +3220,7 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| Expression* right,
|
| int pos) {
|
| CompareOperation* node =
|
| - new(zone_) CompareOperation(isolate_, op, left, right, pos);
|
| + new(zone_) CompareOperation(zone_, op, left, right, pos);
|
| VISIT_AND_RETURN(CompareOperation, node)
|
| }
|
|
|
| @@ -3217,7 +3229,7 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| Expression* else_expression,
|
| int position) {
|
| Conditional* cond = new(zone_) Conditional(
|
| - isolate_, condition, then_expression, else_expression, position);
|
| + zone_, condition, then_expression, else_expression, position);
|
| VISIT_AND_RETURN(Conditional, cond)
|
| }
|
|
|
| @@ -3226,8 +3238,8 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| Expression* value,
|
| int pos) {
|
| Assignment* assign =
|
| - new(zone_) Assignment(isolate_, op, target, value, pos);
|
| - assign->Init(isolate_, this);
|
| + new(zone_) Assignment(zone_, op, target, value, pos);
|
| + assign->Init(zone_, this);
|
| VISIT_AND_RETURN(Assignment, assign)
|
| }
|
|
|
| @@ -3236,12 +3248,12 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| Yield::Kind yield_kind,
|
| int pos) {
|
| Yield* yield = new(zone_) Yield(
|
| - isolate_, generator_object, expression, yield_kind, pos);
|
| + zone_, generator_object, expression, yield_kind, pos);
|
| VISIT_AND_RETURN(Yield, yield)
|
| }
|
|
|
| Throw* NewThrow(Expression* exception, int pos) {
|
| - Throw* t = new(zone_) Throw(isolate_, exception, pos);
|
| + Throw* t = new(zone_) Throw(zone_, exception, pos);
|
| VISIT_AND_RETURN(Throw, t)
|
| }
|
|
|
| @@ -3260,7 +3272,7 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| FunctionLiteral::IsGeneratorFlag is_generator,
|
| int position) {
|
| FunctionLiteral* lit = new(zone_) FunctionLiteral(
|
| - isolate_, name, scope, body,
|
| + zone_, name, scope, body,
|
| materialized_literal_count, expected_property_count, handler_count,
|
| parameter_count, function_type, has_duplicate_parameters, is_function,
|
| is_parenthesized, is_generator, position);
|
| @@ -3274,19 +3286,18 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| NativeFunctionLiteral* NewNativeFunctionLiteral(
|
| Handle<String> name, v8::Extension* extension, int pos) {
|
| NativeFunctionLiteral* lit =
|
| - new(zone_) NativeFunctionLiteral(isolate_, name, extension, pos);
|
| + new(zone_) NativeFunctionLiteral(zone_, name, extension, pos);
|
| VISIT_AND_RETURN(NativeFunctionLiteral, lit)
|
| }
|
|
|
| ThisFunction* NewThisFunction(int pos) {
|
| - ThisFunction* fun = new(zone_) ThisFunction(isolate_, pos);
|
| + ThisFunction* fun = new(zone_) ThisFunction(zone_, pos);
|
| VISIT_AND_RETURN(ThisFunction, fun)
|
| }
|
|
|
| #undef VISIT_AND_RETURN
|
|
|
| private:
|
| - Isolate* isolate_;
|
| Zone* zone_;
|
| Visitor visitor_;
|
| };
|
|
|