Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: src/parser.cc

Issue 418143007: FYI Implementing 'super' keyword (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Use private own symbol for [[HomeObject]] Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/parser.h ('k') | src/preparser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/parser.h ('k') | src/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698