| 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 1392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1403 PrepareFrameState(context, BailoutId::None()); | 1403 PrepareFrameState(context, BailoutId::None()); |
| 1404 { | 1404 { |
| 1405 ContextScope scope(this, stmt->scope(), context); | 1405 ContextScope scope(this, stmt->scope(), context); |
| 1406 DCHECK(stmt->scope()->declarations()->is_empty()); | 1406 DCHECK(stmt->scope()->declarations()->is_empty()); |
| 1407 // Evaluate the catch-block. | 1407 // Evaluate the catch-block. |
| 1408 Visit(stmt->catch_block()); | 1408 Visit(stmt->catch_block()); |
| 1409 } | 1409 } |
| 1410 try_control.EndCatch(); | 1410 try_control.EndCatch(); |
| 1411 | 1411 |
| 1412 // TODO(mstarzinger): Remove bailout once everything works. | 1412 // TODO(mstarzinger): Remove bailout once everything works. |
| 1413 if (!FLAG_turbo_exceptions) SetStackOverflow(); | 1413 if (!FLAG_turbo_try_catch) SetStackOverflow(); |
| 1414 } | 1414 } |
| 1415 | 1415 |
| 1416 | 1416 |
| 1417 void AstGraphBuilder::VisitTryFinallyStatement(TryFinallyStatement* stmt) { | 1417 void AstGraphBuilder::VisitTryFinallyStatement(TryFinallyStatement* stmt) { |
| 1418 TryFinallyBuilder try_control(this); | 1418 TryFinallyBuilder try_control(this); |
| 1419 | 1419 |
| 1420 ExternalReference message_object = | 1420 ExternalReference message_object = |
| 1421 ExternalReference::address_of_pending_message_obj(isolate()); | 1421 ExternalReference::address_of_pending_message_obj(isolate()); |
| 1422 | 1422 |
| 1423 // We keep a record of all paths that enter the finally-block to be able to | 1423 // We keep a record of all paths that enter the finally-block to be able to |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1472 // stack (this is in sync with FullCodeGenerator::ExitFinallyBlock). | 1472 // stack (this is in sync with FullCodeGenerator::ExitFinallyBlock). |
| 1473 message = environment()->Pop(); | 1473 message = environment()->Pop(); |
| 1474 result = environment()->Pop(); | 1474 result = environment()->Pop(); |
| 1475 token = environment()->Pop(); // TODO(mstarzinger): Uncook token! | 1475 token = environment()->Pop(); // TODO(mstarzinger): Uncook token! |
| 1476 BuildStoreExternal(message_object, kMachAnyTagged, message); | 1476 BuildStoreExternal(message_object, kMachAnyTagged, message); |
| 1477 | 1477 |
| 1478 // Dynamic dispatch after the finally-block. | 1478 // Dynamic dispatch after the finally-block. |
| 1479 commands->ApplyDeferredCommands(token, result); | 1479 commands->ApplyDeferredCommands(token, result); |
| 1480 | 1480 |
| 1481 // TODO(mstarzinger): Remove bailout once everything works. | 1481 // TODO(mstarzinger): Remove bailout once everything works. |
| 1482 if (!FLAG_turbo_exceptions) SetStackOverflow(); | 1482 if (!FLAG_turbo_try_finally) SetStackOverflow(); |
| 1483 } | 1483 } |
| 1484 | 1484 |
| 1485 | 1485 |
| 1486 void AstGraphBuilder::VisitDebuggerStatement(DebuggerStatement* stmt) { | 1486 void AstGraphBuilder::VisitDebuggerStatement(DebuggerStatement* stmt) { |
| 1487 Node* node = NewNode(javascript()->CallRuntime(Runtime::kDebugBreak, 0)); | 1487 Node* node = NewNode(javascript()->CallRuntime(Runtime::kDebugBreak, 0)); |
| 1488 PrepareFrameState(node, stmt->DebugBreakId()); | 1488 PrepareFrameState(node, stmt->DebugBreakId()); |
| 1489 environment()->MarkAllLocalsLive(); | 1489 environment()->MarkAllLocalsLive(); |
| 1490 } | 1490 } |
| 1491 | 1491 |
| 1492 | 1492 |
| (...skipping 2546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4039 // Phi does not exist yet, introduce one. | 4039 // Phi does not exist yet, introduce one. |
| 4040 value = NewPhi(inputs, value, control); | 4040 value = NewPhi(inputs, value, control); |
| 4041 value->ReplaceInput(inputs - 1, other); | 4041 value->ReplaceInput(inputs - 1, other); |
| 4042 } | 4042 } |
| 4043 return value; | 4043 return value; |
| 4044 } | 4044 } |
| 4045 | 4045 |
| 4046 } // namespace compiler | 4046 } // namespace compiler |
| 4047 } // namespace internal | 4047 } // namespace internal |
| 4048 } // namespace v8 | 4048 } // namespace v8 |
| OLD | NEW |