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/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 } | 732 } |
733 | 733 |
734 | 734 |
735 const AstRawString* ParserTraits::GetNextSymbol(Scanner* scanner) { | 735 const AstRawString* ParserTraits::GetNextSymbol(Scanner* scanner) { |
736 return parser_->scanner()->NextSymbol(parser_->ast_value_factory()); | 736 return parser_->scanner()->NextSymbol(parser_->ast_value_factory()); |
737 } | 737 } |
738 | 738 |
739 | 739 |
740 Expression* ParserTraits::ThisExpression(Scope* scope, AstNodeFactory* factory, | 740 Expression* ParserTraits::ThisExpression(Scope* scope, AstNodeFactory* factory, |
741 int pos) { | 741 int pos) { |
742 return factory->NewVariableProxy(scope->receiver(), pos); | 742 return scope->NewUnresolved(factory, |
| 743 parser_->ast_value_factory()->this_string(), pos, |
| 744 pos + 4, Variable::THIS); |
743 } | 745 } |
744 | 746 |
745 Expression* ParserTraits::SuperReference(Scope* scope, AstNodeFactory* factory, | 747 Expression* ParserTraits::SuperReference(Scope* scope, AstNodeFactory* factory, |
746 int pos) { | 748 int pos) { |
747 return factory->NewSuperReference( | 749 return factory->NewSuperReference( |
748 ThisExpression(scope, factory, pos)->AsVariableProxy(), | 750 ThisExpression(scope, factory, pos)->AsVariableProxy(), |
749 pos); | 751 pos); |
750 } | 752 } |
751 | 753 |
752 | 754 |
(...skipping 4988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5741 | 5743 |
5742 Expression* Parser::SpreadCallNew(Expression* function, | 5744 Expression* Parser::SpreadCallNew(Expression* function, |
5743 ZoneList<v8::internal::Expression*>* args, | 5745 ZoneList<v8::internal::Expression*>* args, |
5744 int pos) { | 5746 int pos) { |
5745 args->InsertAt(0, function, zone()); | 5747 args->InsertAt(0, function, zone()); |
5746 | 5748 |
5747 return factory()->NewCallRuntime( | 5749 return factory()->NewCallRuntime( |
5748 ast_value_factory()->reflect_construct_string(), NULL, args, pos); | 5750 ast_value_factory()->reflect_construct_string(), NULL, args, pos); |
5749 } | 5751 } |
5750 } } // namespace v8::internal | 5752 } } // namespace v8::internal |
OLD | NEW |