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

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

Issue 1083193005: WIP: new.target (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix return from new func Created 5 years, 8 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
« no previous file with comments | « src/ast.cc ('k') | src/ast-value-factory.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/ast.h" 7 #include "src/ast.h"
8 #include "src/ast-numbering.h" 8 #include "src/ast-numbering.h"
9 #include "src/scopes.h" 9 #include "src/scopes.h"
10 10
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 IncrementNodeCount(); 152 IncrementNodeCount();
153 node->set_base_id(ReserveIdRange(RegExpLiteral::num_ids())); 153 node->set_base_id(ReserveIdRange(RegExpLiteral::num_ids()));
154 } 154 }
155 155
156 156
157 void AstNumberingVisitor::VisitVariableProxy(VariableProxy* node) { 157 void AstNumberingVisitor::VisitVariableProxy(VariableProxy* node) {
158 IncrementNodeCount(); 158 IncrementNodeCount();
159 if (node->var()->IsLookupSlot()) { 159 if (node->var()->IsLookupSlot()) {
160 DisableOptimization(kReferenceToAVariableWhichRequiresDynamicLookup); 160 DisableOptimization(kReferenceToAVariableWhichRequiresDynamicLookup);
161 } 161 }
162 if (node->is_new_target()) {
163 DisableOptimization(kNewTarget);
164 }
162 ReserveFeedbackSlots(node); 165 ReserveFeedbackSlots(node);
163 node->set_base_id(ReserveIdRange(VariableProxy::num_ids())); 166 node->set_base_id(ReserveIdRange(VariableProxy::num_ids()));
164 } 167 }
165 168
166 169
167 void AstNumberingVisitor::VisitThisFunction(ThisFunction* node) { 170 void AstNumberingVisitor::VisitThisFunction(ThisFunction* node) {
168 IncrementNodeCount(); 171 IncrementNodeCount();
169 node->set_base_id(ReserveIdRange(ThisFunction::num_ids())); 172 node->set_base_id(ReserveIdRange(ThisFunction::num_ids()));
170 } 173 }
171 174
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 } 562 }
560 563
561 564
562 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, 565 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone,
563 FunctionLiteral* function) { 566 FunctionLiteral* function) {
564 AstNumberingVisitor visitor(isolate, zone); 567 AstNumberingVisitor visitor(isolate, zone);
565 return visitor.Renumber(function); 568 return visitor.Renumber(function);
566 } 569 }
567 } 570 }
568 } // namespace v8::internal 571 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/ast-value-factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698