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

Side by Side Diff: src/ast-numbering.cc

Issue 663683006: Implement ES6 Template Literals (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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
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/ast.h" 7 #include "src/ast.h"
8 #include "src/ast-numbering.h" 8 #include "src/ast-numbering.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/scopes.h" 10 #include "src/scopes.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 NativeFunctionLiteral* node) { 77 NativeFunctionLiteral* node) {
78 node->set_base_id(ReserveIdRange(NativeFunctionLiteral::num_ids())); 78 node->set_base_id(ReserveIdRange(NativeFunctionLiteral::num_ids()));
79 } 79 }
80 80
81 81
82 void AstNumberingVisitor::VisitLiteral(Literal* node) { 82 void AstNumberingVisitor::VisitLiteral(Literal* node) {
83 node->set_base_id(ReserveIdRange(Literal::num_ids())); 83 node->set_base_id(ReserveIdRange(Literal::num_ids()));
84 } 84 }
85 85
86 86
87 void AstNumberingVisitor::VisitTemplateLiteral(TemplateLiteral* node) {
88 node->set_base_id(ReserveIdRange(TemplateLiteral::num_ids()));
89 }
90
91
87 void AstNumberingVisitor::VisitRegExpLiteral(RegExpLiteral* node) { 92 void AstNumberingVisitor::VisitRegExpLiteral(RegExpLiteral* node) {
88 node->set_base_id(ReserveIdRange(RegExpLiteral::num_ids())); 93 node->set_base_id(ReserveIdRange(RegExpLiteral::num_ids()));
89 } 94 }
90 95
91 96
92 void AstNumberingVisitor::VisitVariableProxy(VariableProxy* node) { 97 void AstNumberingVisitor::VisitVariableProxy(VariableProxy* node) {
93 node->set_base_id(ReserveIdRange(VariableProxy::num_ids())); 98 node->set_base_id(ReserveIdRange(VariableProxy::num_ids()));
94 } 99 }
95 100
96 101
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 } 412 }
408 413
409 414
410 bool AstNumbering::Renumber(FunctionLiteral* function, Zone* zone) { 415 bool AstNumbering::Renumber(FunctionLiteral* function, Zone* zone) {
411 AstNumberingVisitor visitor(zone); 416 AstNumberingVisitor visitor(zone);
412 visitor.Renumber(function); 417 visitor.Renumber(function);
413 return !visitor.HasStackOverflow(); 418 return !visitor.HasStackOverflow();
414 } 419 }
415 } 420 }
416 } // namespace v8::internal 421 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/ast-value-factory.h » ('j') | src/bailout-reason.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698