| 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 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 Expression* ParserTraits::ThisExpression(Scope* scope, AstNodeFactory* factory, | 752 Expression* ParserTraits::ThisExpression(Scope* scope, AstNodeFactory* factory, |
| 753 int pos) { | 753 int pos) { |
| 754 return scope->NewUnresolved(factory, | 754 return scope->NewUnresolved(factory, |
| 755 parser_->ast_value_factory()->this_string(), | 755 parser_->ast_value_factory()->this_string(), |
| 756 Variable::THIS, pos, pos + 4); | 756 Variable::THIS, pos, pos + 4); |
| 757 } | 757 } |
| 758 | 758 |
| 759 Expression* ParserTraits::SuperPropertyReference(Scope* scope, | 759 Expression* ParserTraits::SuperPropertyReference(Scope* scope, |
| 760 AstNodeFactory* factory, | 760 AstNodeFactory* factory, |
| 761 int pos) { | 761 int pos) { |
| 762 VariableProxy* home_object_proxy = scope->NewUnresolved( | 762 // this_function[home_object_symbol] |
| 763 factory, parser_->ast_value_factory()->home_object_string(), | 763 VariableProxy* this_function_proxy = scope->NewUnresolved( |
| 764 factory, parser_->ast_value_factory()->this_function_string(), |
| 764 Variable::NORMAL, pos); | 765 Variable::NORMAL, pos); |
| 766 Expression* home_object_symbol_literal = |
| 767 factory->NewSymbolLiteral("home_object_symbol", RelocInfo::kNoPosition); |
| 768 Expression* home_object = factory->NewProperty( |
| 769 this_function_proxy, home_object_symbol_literal, pos); |
| 765 return factory->NewSuperPropertyReference( | 770 return factory->NewSuperPropertyReference( |
| 766 ThisExpression(scope, factory, pos)->AsVariableProxy(), home_object_proxy, | 771 ThisExpression(scope, factory, pos)->AsVariableProxy(), home_object, pos); |
| 767 pos); | |
| 768 } | 772 } |
| 769 | 773 |
| 770 | 774 |
| 771 Expression* ParserTraits::SuperCallReference(Scope* scope, | 775 Expression* ParserTraits::SuperCallReference(Scope* scope, |
| 772 AstNodeFactory* factory, int pos) { | 776 AstNodeFactory* factory, int pos) { |
| 773 VariableProxy* new_target_proxy = scope->NewUnresolved( | 777 VariableProxy* new_target_proxy = scope->NewUnresolved( |
| 774 factory, parser_->ast_value_factory()->new_target_string(), | 778 factory, parser_->ast_value_factory()->new_target_string(), |
| 775 Variable::NORMAL, pos); | 779 Variable::NORMAL, pos); |
| 776 VariableProxy* this_function_proxy = scope->NewUnresolved( | 780 VariableProxy* this_function_proxy = scope->NewUnresolved( |
| 777 factory, parser_->ast_value_factory()->this_function_string(), | 781 factory, parser_->ast_value_factory()->this_function_string(), |
| (...skipping 5036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5814 Expression* Parser::SpreadCallNew(Expression* function, | 5818 Expression* Parser::SpreadCallNew(Expression* function, |
| 5815 ZoneList<v8::internal::Expression*>* args, | 5819 ZoneList<v8::internal::Expression*>* args, |
| 5816 int pos) { | 5820 int pos) { |
| 5817 args->InsertAt(0, function, zone()); | 5821 args->InsertAt(0, function, zone()); |
| 5818 | 5822 |
| 5819 return factory()->NewCallRuntime( | 5823 return factory()->NewCallRuntime( |
| 5820 ast_value_factory()->reflect_construct_string(), NULL, args, pos); | 5824 ast_value_factory()->reflect_construct_string(), NULL, args, pos); |
| 5821 } | 5825 } |
| 5822 } // namespace internal | 5826 } // namespace internal |
| 5823 } // namespace v8 | 5827 } // namespace v8 |
| OLD | NEW |