OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/compiler/ast-graph-builder.h" | 5 #include "src/compiler/ast-graph-builder.h" |
6 | 6 |
7 #include "src/compiler.h" | 7 #include "src/compiler.h" |
8 #include "src/compiler/ast-loop-assignment-analyzer.h" | 8 #include "src/compiler/ast-loop-assignment-analyzer.h" |
9 #include "src/compiler/control-builders.h" | 9 #include "src/compiler/control-builders.h" |
10 #include "src/compiler/js-type-feedback.h" | 10 #include "src/compiler/js-type-feedback.h" |
(...skipping 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1415 | 1415 |
1416 // Create a catch scope that binds the exception. | 1416 // Create a catch scope that binds the exception. |
1417 Node* exception = try_control.GetExceptionNode(); | 1417 Node* exception = try_control.GetExceptionNode(); |
1418 Handle<String> name = stmt->variable()->name(); | 1418 Handle<String> name = stmt->variable()->name(); |
1419 const Operator* op = javascript()->CreateCatchContext(name); | 1419 const Operator* op = javascript()->CreateCatchContext(name); |
1420 Node* context = NewNode(op, exception, GetFunctionClosureForContext()); | 1420 Node* context = NewNode(op, exception, GetFunctionClosureForContext()); |
1421 | 1421 |
1422 // Evaluate the catch-block. | 1422 // Evaluate the catch-block. |
1423 VisitInScope(stmt->catch_block(), stmt->scope(), context); | 1423 VisitInScope(stmt->catch_block(), stmt->scope(), context); |
1424 try_control.EndCatch(); | 1424 try_control.EndCatch(); |
1425 | |
1426 // TODO(mstarzinger): Remove bailout once everything works. | |
1427 if (!FLAG_turbo_try_catch) SetStackOverflow(); | |
1428 } | 1425 } |
1429 | 1426 |
1430 | 1427 |
1431 void AstGraphBuilder::VisitTryFinallyStatement(TryFinallyStatement* stmt) { | 1428 void AstGraphBuilder::VisitTryFinallyStatement(TryFinallyStatement* stmt) { |
1432 TryFinallyBuilder try_control(this); | 1429 TryFinallyBuilder try_control(this); |
1433 ExternalReference message_object = | 1430 ExternalReference message_object = |
1434 ExternalReference::address_of_pending_message_obj(isolate()); | 1431 ExternalReference::address_of_pending_message_obj(isolate()); |
1435 | 1432 |
1436 // We keep a record of all paths that enter the finally-block to be able to | 1433 // We keep a record of all paths that enter the finally-block to be able to |
1437 // dispatch to the correct continuation point after the statements in the | 1434 // dispatch to the correct continuation point after the statements in the |
(...skipping 2826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4264 // Phi does not exist yet, introduce one. | 4261 // Phi does not exist yet, introduce one. |
4265 value = NewPhi(inputs, value, control); | 4262 value = NewPhi(inputs, value, control); |
4266 value->ReplaceInput(inputs - 1, other); | 4263 value->ReplaceInput(inputs - 1, other); |
4267 } | 4264 } |
4268 return value; | 4265 return value; |
4269 } | 4266 } |
4270 | 4267 |
4271 } // namespace compiler | 4268 } // namespace compiler |
4272 } // namespace internal | 4269 } // namespace internal |
4273 } // namespace v8 | 4270 } // namespace v8 |
OLD | NEW |