| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/api.h" | 7 #include "src/api.h" |
| 8 #include "src/ast.h" | 8 #include "src/ast.h" |
| 9 #include "src/base/platform/platform.h" | 9 #include "src/base/platform/platform.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 const AstRawString* ParserTraits::GetNextSymbol(Scanner* scanner) { | 612 const AstRawString* ParserTraits::GetNextSymbol(Scanner* scanner) { |
| 613 return parser_->scanner()->NextSymbol(parser_->ast_value_factory_); | 613 return parser_->scanner()->NextSymbol(parser_->ast_value_factory_); |
| 614 } | 614 } |
| 615 | 615 |
| 616 | 616 |
| 617 Expression* ParserTraits::ThisExpression( | 617 Expression* ParserTraits::ThisExpression( |
| 618 Scope* scope, AstNodeFactory<AstConstructionVisitor>* factory, int pos) { | 618 Scope* scope, AstNodeFactory<AstConstructionVisitor>* factory, int pos) { |
| 619 return factory->NewVariableProxy(scope->receiver(), pos); | 619 return factory->NewVariableProxy(scope->receiver(), pos); |
| 620 } | 620 } |
| 621 | 621 |
| 622 Expression* ParserTraits::SuperReference( |
| 623 Scope* scope, AstNodeFactory<AstConstructionVisitor>* factory, int pos) { |
| 624 return factory->NewSuperReference( |
| 625 ThisExpression(scope, factory, pos)->AsVariableProxy(), |
| 626 pos); |
| 627 } |
| 622 | 628 |
| 623 Literal* ParserTraits::ExpressionFromLiteral( | 629 Literal* ParserTraits::ExpressionFromLiteral( |
| 624 Token::Value token, int pos, | 630 Token::Value token, int pos, |
| 625 Scanner* scanner, | 631 Scanner* scanner, |
| 626 AstNodeFactory<AstConstructionVisitor>* factory) { | 632 AstNodeFactory<AstConstructionVisitor>* factory) { |
| 627 switch (token) { | 633 switch (token) { |
| 628 case Token::NULL_LITERAL: | 634 case Token::NULL_LITERAL: |
| 629 return factory->NewNullLiteral(pos); | 635 return factory->NewNullLiteral(pos); |
| 630 case Token::TRUE_LITERAL: | 636 case Token::TRUE_LITERAL: |
| 631 return factory->NewBooleanLiteral(true, pos); | 637 return factory->NewBooleanLiteral(true, pos); |
| (...skipping 4170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4802 info()->SetAstValueFactory(ast_value_factory_); | 4808 info()->SetAstValueFactory(ast_value_factory_); |
| 4803 } | 4809 } |
| 4804 ast_value_factory_ = NULL; | 4810 ast_value_factory_ = NULL; |
| 4805 | 4811 |
| 4806 InternalizeUseCounts(); | 4812 InternalizeUseCounts(); |
| 4807 | 4813 |
| 4808 return (result != NULL); | 4814 return (result != NULL); |
| 4809 } | 4815 } |
| 4810 | 4816 |
| 4811 } } // namespace v8::internal | 4817 } } // namespace v8::internal |
| OLD | NEW |