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/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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
242 IncrementNodeCount(); | 242 IncrementNodeCount(); |
243 VisitVariableProxy(node->proxy()); | 243 VisitVariableProxy(node->proxy()); |
244 VisitFunctionLiteral(node->fun()); | 244 VisitFunctionLiteral(node->fun()); |
245 } | 245 } |
246 | 246 |
247 | 247 |
248 void AstNumberingVisitor::VisitCallRuntime(CallRuntime* node) { | 248 void AstNumberingVisitor::VisitCallRuntime(CallRuntime* node) { |
249 IncrementNodeCount(); | 249 IncrementNodeCount(); |
250 node->set_base_id(ReserveIdRange(CallRuntime::num_ids())); | 250 node->set_base_id(ReserveIdRange(CallRuntime::num_ids())); |
251 VisitArguments(node->arguments()); | 251 VisitArguments(node->arguments()); |
252 // Indicate the catch prediction to the running async program | |
253 if (node->is_jsruntime() && | |
254 node->context_index() == Context::ASYNC_FUNCTION_AWAIT_CAUGHT_INDEX && | |
255 catch_prediction_ == HandlerTable::ASYNC_AWAIT) { | |
256 node->set_context_index(Context::ASYNC_FUNCTION_AWAIT_UNCAUGHT_INDEX); | |
jgruber
2016/09/08 10:19:59
Changing the called runtime function from the AstN
| |
257 } | |
252 } | 258 } |
253 | 259 |
254 | 260 |
255 void AstNumberingVisitor::VisitWithStatement(WithStatement* node) { | 261 void AstNumberingVisitor::VisitWithStatement(WithStatement* node) { |
256 IncrementNodeCount(); | 262 IncrementNodeCount(); |
257 DisableCrankshaft(kWithStatement); | 263 DisableCrankshaft(kWithStatement); |
258 node->set_base_id(ReserveIdRange(WithStatement::num_ids())); | 264 node->set_base_id(ReserveIdRange(WithStatement::num_ids())); |
259 Visit(node->expression()); | 265 Visit(node->expression()); |
260 Visit(node->statement()); | 266 Visit(node->statement()); |
261 } | 267 } |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
587 } | 593 } |
588 | 594 |
589 | 595 |
590 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 596 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
591 FunctionLiteral* function) { | 597 FunctionLiteral* function) { |
592 AstNumberingVisitor visitor(isolate, zone); | 598 AstNumberingVisitor visitor(isolate, zone); |
593 return visitor.Renumber(function); | 599 return visitor.Renumber(function); |
594 } | 600 } |
595 } // namespace internal | 601 } // namespace internal |
596 } // namespace v8 | 602 } // namespace v8 |
OLD | NEW |