| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 return statements_[0]->StatementAsCountOperation(); | 352 return statements_[0]->StatementAsCountOperation(); |
| 353 } | 353 } |
| 354 | 354 |
| 355 virtual bool IsInlineable() const; | 355 virtual bool IsInlineable() const; |
| 356 | 356 |
| 357 void AddStatement(Statement* statement) { statements_.Add(statement); } | 357 void AddStatement(Statement* statement) { statements_.Add(statement); } |
| 358 | 358 |
| 359 ZoneList<Statement*>* statements() { return &statements_; } | 359 ZoneList<Statement*>* statements() { return &statements_; } |
| 360 bool is_initializer_block() const { return is_initializer_block_; } | 360 bool is_initializer_block() const { return is_initializer_block_; } |
| 361 | 361 |
| 362 Scope* block_scope() const { return block_scope_; } |
| 363 void set_block_scope(Scope* block_scope) { block_scope_ = block_scope; } |
| 364 |
| 362 private: | 365 private: |
| 363 ZoneList<Statement*> statements_; | 366 ZoneList<Statement*> statements_; |
| 364 bool is_initializer_block_; | 367 bool is_initializer_block_; |
| 368 Scope* block_scope_; |
| 365 }; | 369 }; |
| 366 | 370 |
| 367 | 371 |
| 368 class Declaration: public AstNode { | 372 class Declaration: public AstNode { |
| 369 public: | 373 public: |
| 370 Declaration(VariableProxy* proxy, Variable::Mode mode, FunctionLiteral* fun) | 374 Declaration(VariableProxy* proxy, Variable::Mode mode, FunctionLiteral* fun) |
| 371 : proxy_(proxy), | 375 : proxy_(proxy), |
| 372 mode_(mode), | 376 mode_(mode), |
| 373 fun_(fun) { | 377 fun_(fun) { |
| 374 ASSERT(mode == Variable::VAR || mode == Variable::CONST); | 378 ASSERT(mode == Variable::VAR || mode == Variable::CONST); |
| (...skipping 1861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2236 | 2240 |
| 2237 private: | 2241 private: |
| 2238 Isolate* isolate_; | 2242 Isolate* isolate_; |
| 2239 bool stack_overflow_; | 2243 bool stack_overflow_; |
| 2240 }; | 2244 }; |
| 2241 | 2245 |
| 2242 | 2246 |
| 2243 } } // namespace v8::internal | 2247 } } // namespace v8::internal |
| 2244 | 2248 |
| 2245 #endif // V8_AST_H_ | 2249 #endif // V8_AST_H_ |
| OLD | NEW |