OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 Label break_target_; | 409 Label break_target_; |
410 int entry_id_; | 410 int entry_id_; |
411 int exit_id_; | 411 int exit_id_; |
412 }; | 412 }; |
413 | 413 |
414 | 414 |
415 class Block: public BreakableStatement { | 415 class Block: public BreakableStatement { |
416 public: | 416 public: |
417 DECLARE_NODE_TYPE(Block) | 417 DECLARE_NODE_TYPE(Block) |
418 | 418 |
419 void AddStatement(Statement* statement) { statements_.Add(statement); } | 419 void AddStatement(Statement* statement, Zone* zone) { |
| 420 statements_.Add(statement, zone); |
| 421 } |
420 | 422 |
421 ZoneList<Statement*>* statements() { return &statements_; } | 423 ZoneList<Statement*>* statements() { return &statements_; } |
422 bool is_initializer_block() const { return is_initializer_block_; } | 424 bool is_initializer_block() const { return is_initializer_block_; } |
423 | 425 |
424 Scope* scope() const { return scope_; } | 426 Scope* scope() const { return scope_; } |
425 void set_scope(Scope* scope) { scope_ = scope; } | 427 void set_scope(Scope* scope) { scope_ = scope; } |
426 | 428 |
427 protected: | 429 protected: |
428 template<class> friend class AstNodeFactory; | 430 template<class> friend class AstNodeFactory; |
429 | 431 |
(...skipping 2548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2978 private: | 2980 private: |
2979 Isolate* isolate_; | 2981 Isolate* isolate_; |
2980 Zone* zone_; | 2982 Zone* zone_; |
2981 Visitor visitor_; | 2983 Visitor visitor_; |
2982 }; | 2984 }; |
2983 | 2985 |
2984 | 2986 |
2985 } } // namespace v8::internal | 2987 } } // namespace v8::internal |
2986 | 2988 |
2987 #endif // V8_AST_H_ | 2989 #endif // V8_AST_H_ |
OLD | NEW |