| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_AST_H_ | 5 #ifndef V8_AST_H_ |
| 6 #define V8_AST_H_ | 6 #define V8_AST_H_ |
| 7 | 7 |
| 8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
| 9 #include "src/ast-value-factory.h" | 9 #include "src/ast-value-factory.h" |
| 10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
| (...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1000 class WithStatement final : public Statement { | 1000 class WithStatement final : public Statement { |
| 1001 public: | 1001 public: |
| 1002 DECLARE_NODE_TYPE(WithStatement) | 1002 DECLARE_NODE_TYPE(WithStatement) |
| 1003 | 1003 |
| 1004 Scope* scope() { return scope_; } | 1004 Scope* scope() { return scope_; } |
| 1005 Expression* expression() const { return expression_; } | 1005 Expression* expression() const { return expression_; } |
| 1006 Statement* statement() const { return statement_; } | 1006 Statement* statement() const { return statement_; } |
| 1007 void set_statement(Statement* s) { statement_ = s; } | 1007 void set_statement(Statement* s) { statement_ = s; } |
| 1008 | 1008 |
| 1009 void set_base_id(int id) { base_id_ = id; } | 1009 void set_base_id(int id) { base_id_ = id; } |
| 1010 static int num_ids() { return parent_num_ids() + 1; } | 1010 static int num_ids() { return parent_num_ids() + 2; } |
| 1011 BailoutId EntryId() const { return BailoutId(local_id(0)); } | 1011 BailoutId ToObjectId() const { return BailoutId(local_id(0)); } |
| 1012 BailoutId EntryId() const { return BailoutId(local_id(1)); } |
| 1012 | 1013 |
| 1013 protected: | 1014 protected: |
| 1014 WithStatement(Zone* zone, Scope* scope, Expression* expression, | 1015 WithStatement(Zone* zone, Scope* scope, Expression* expression, |
| 1015 Statement* statement, int pos) | 1016 Statement* statement, int pos) |
| 1016 : Statement(zone, pos), | 1017 : Statement(zone, pos), |
| 1017 scope_(scope), | 1018 scope_(scope), |
| 1018 expression_(expression), | 1019 expression_(expression), |
| 1019 statement_(statement), | 1020 statement_(statement), |
| 1020 base_id_(BailoutId::None().ToInt()) {} | 1021 base_id_(BailoutId::None().ToInt()) {} |
| 1021 static int parent_num_ids() { return 0; } | 1022 static int parent_num_ids() { return 0; } |
| (...skipping 2644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3666 // the parser-level zone. | 3667 // the parser-level zone. |
| 3667 Zone* parser_zone_; | 3668 Zone* parser_zone_; |
| 3668 AstValueFactory* ast_value_factory_; | 3669 AstValueFactory* ast_value_factory_; |
| 3669 }; | 3670 }; |
| 3670 | 3671 |
| 3671 | 3672 |
| 3672 } // namespace internal | 3673 } // namespace internal |
| 3673 } // namespace v8 | 3674 } // namespace v8 |
| 3674 | 3675 |
| 3675 #endif // V8_AST_H_ | 3676 #endif // V8_AST_H_ |
| OLD | NEW |