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/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/assembler.h" | 10 #include "src/assembler.h" |
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 | 570 |
571 protected: | 571 protected: |
572 FunctionDeclaration(Zone* zone, | 572 FunctionDeclaration(Zone* zone, |
573 VariableProxy* proxy, | 573 VariableProxy* proxy, |
574 VariableMode mode, | 574 VariableMode mode, |
575 FunctionLiteral* fun, | 575 FunctionLiteral* fun, |
576 Scope* scope, | 576 Scope* scope, |
577 int pos) | 577 int pos) |
578 : Declaration(zone, proxy, mode, scope, pos), | 578 : Declaration(zone, proxy, mode, scope, pos), |
579 fun_(fun) { | 579 fun_(fun) { |
580 // At the moment there are no "const functions" in JavaScript... | 580 DCHECK(mode == VAR || mode == LET || mode == CONST); |
581 DCHECK(mode == VAR || mode == LET); | |
582 DCHECK(fun != NULL); | 581 DCHECK(fun != NULL); |
583 } | 582 } |
584 | 583 |
585 private: | 584 private: |
586 FunctionLiteral* fun_; | 585 FunctionLiteral* fun_; |
587 }; | 586 }; |
588 | 587 |
589 | 588 |
590 class ModuleDeclaration FINAL : public Declaration { | 589 class ModuleDeclaration FINAL : public Declaration { |
591 public: | 590 public: |
(...skipping 2899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3491 | 3490 |
3492 private: | 3491 private: |
3493 Zone* zone_; | 3492 Zone* zone_; |
3494 AstValueFactory* ast_value_factory_; | 3493 AstValueFactory* ast_value_factory_; |
3495 }; | 3494 }; |
3496 | 3495 |
3497 | 3496 |
3498 } } // namespace v8::internal | 3497 } } // namespace v8::internal |
3499 | 3498 |
3500 #endif // V8_AST_H_ | 3499 #endif // V8_AST_H_ |
OLD | NEW |