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

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

Issue 1807913002: [crankshaft] Support calling JS runtime functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | src/bailout-reason.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/ast/ast-numbering.h" 5 #include "src/ast/ast-numbering.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 void AstNumberingVisitor::VisitFunctionDeclaration(FunctionDeclaration* node) { 259 void AstNumberingVisitor::VisitFunctionDeclaration(FunctionDeclaration* node) {
260 IncrementNodeCount(); 260 IncrementNodeCount();
261 VisitVariableProxy(node->proxy()); 261 VisitVariableProxy(node->proxy());
262 VisitFunctionLiteral(node->fun()); 262 VisitFunctionLiteral(node->fun());
263 } 263 }
264 264
265 265
266 void AstNumberingVisitor::VisitCallRuntime(CallRuntime* node) { 266 void AstNumberingVisitor::VisitCallRuntime(CallRuntime* node) {
267 IncrementNodeCount(); 267 IncrementNodeCount();
268 ReserveFeedbackSlots(node); 268 ReserveFeedbackSlots(node);
269 if (node->is_jsruntime()) {
270 // Don't try to optimize JS runtime calls because we bailout on them.
271 DisableCrankshaft(kCallToAJavaScriptRuntimeFunction);
272 }
273 node->set_base_id(ReserveIdRange(CallRuntime::num_ids())); 269 node->set_base_id(ReserveIdRange(CallRuntime::num_ids()));
274 VisitArguments(node->arguments()); 270 VisitArguments(node->arguments());
275 } 271 }
276 272
277 273
278 void AstNumberingVisitor::VisitWithStatement(WithStatement* node) { 274 void AstNumberingVisitor::VisitWithStatement(WithStatement* node) {
279 IncrementNodeCount(); 275 IncrementNodeCount();
280 DisableCrankshaft(kWithStatement); 276 DisableCrankshaft(kWithStatement);
281 node->set_base_id(ReserveIdRange(WithStatement::num_ids())); 277 node->set_base_id(ReserveIdRange(WithStatement::num_ids()));
282 Visit(node->expression()); 278 Visit(node->expression());
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 } 587 }
592 588
593 589
594 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, 590 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone,
595 FunctionLiteral* function) { 591 FunctionLiteral* function) {
596 AstNumberingVisitor visitor(isolate, zone); 592 AstNumberingVisitor visitor(isolate, zone);
597 return visitor.Renumber(function); 593 return visitor.Renumber(function);
598 } 594 }
599 } // namespace internal 595 } // namespace internal
600 } // namespace v8 596 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/bailout-reason.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698