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/ast/compile-time-value.h" | 7 #include "src/ast/compile-time-value.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/compilation-info.h" | 9 #include "src/compilation-info.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 3759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3770 return call; | 3770 return call; |
3771 } | 3771 } |
3772 | 3772 |
3773 | 3773 |
3774 Node* AstGraphBuilder::BuildReturn(Node* return_value) { | 3774 Node* AstGraphBuilder::BuildReturn(Node* return_value) { |
3775 // Emit tracing call if requested to do so. | 3775 // Emit tracing call if requested to do so. |
3776 if (FLAG_trace) { | 3776 if (FLAG_trace) { |
3777 return_value = | 3777 return_value = |
3778 NewNode(javascript()->CallRuntime(Runtime::kTraceExit), return_value); | 3778 NewNode(javascript()->CallRuntime(Runtime::kTraceExit), return_value); |
3779 } | 3779 } |
3780 Node* control = NewNode(common()->Return(), return_value); | 3780 Node* pop_node = jsgraph()->Int32Constant(0); |
| 3781 Node* control = NewNode(common()->Return(), pop_node, return_value); |
3781 UpdateControlDependencyToLeaveFunction(control); | 3782 UpdateControlDependencyToLeaveFunction(control); |
3782 return control; | 3783 return control; |
3783 } | 3784 } |
3784 | 3785 |
3785 | 3786 |
3786 Node* AstGraphBuilder::BuildThrow(Node* exception_value) { | 3787 Node* AstGraphBuilder::BuildThrow(Node* exception_value) { |
3787 NewNode(javascript()->CallRuntime(Runtime::kReThrow), exception_value); | 3788 NewNode(javascript()->CallRuntime(Runtime::kReThrow), exception_value); |
3788 Node* control = NewNode(common()->Throw(), exception_value); | 3789 Node* control = NewNode(common()->Throw(), exception_value); |
3789 UpdateControlDependencyToLeaveFunction(control); | 3790 UpdateControlDependencyToLeaveFunction(control); |
3790 return control; | 3791 return control; |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4355 // Phi does not exist yet, introduce one. | 4356 // Phi does not exist yet, introduce one. |
4356 value = NewPhi(inputs, value, control); | 4357 value = NewPhi(inputs, value, control); |
4357 value->ReplaceInput(inputs - 1, other); | 4358 value->ReplaceInput(inputs - 1, other); |
4358 } | 4359 } |
4359 return value; | 4360 return value; |
4360 } | 4361 } |
4361 | 4362 |
4362 } // namespace compiler | 4363 } // namespace compiler |
4363 } // namespace internal | 4364 } // namespace internal |
4364 } // namespace v8 | 4365 } // namespace v8 |
OLD | NEW |