| 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 3762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3773 return call; | 3773 return call; |
| 3774 } | 3774 } |
| 3775 | 3775 |
| 3776 | 3776 |
| 3777 Node* AstGraphBuilder::BuildReturn(Node* return_value) { | 3777 Node* AstGraphBuilder::BuildReturn(Node* return_value) { |
| 3778 // Emit tracing call if requested to do so. | 3778 // Emit tracing call if requested to do so. |
| 3779 if (FLAG_trace) { | 3779 if (FLAG_trace) { |
| 3780 return_value = | 3780 return_value = |
| 3781 NewNode(javascript()->CallRuntime(Runtime::kTraceExit), return_value); | 3781 NewNode(javascript()->CallRuntime(Runtime::kTraceExit), return_value); |
| 3782 } | 3782 } |
| 3783 Node* pop_node = jsgraph()->Int32Constant(0); | 3783 Node* pop_node = jsgraph()->ZeroConstant(); |
| 3784 Node* control = NewNode(common()->Return(), pop_node, return_value); | 3784 Node* control = NewNode(common()->Return(), pop_node, return_value); |
| 3785 UpdateControlDependencyToLeaveFunction(control); | 3785 UpdateControlDependencyToLeaveFunction(control); |
| 3786 return control; | 3786 return control; |
| 3787 } | 3787 } |
| 3788 | 3788 |
| 3789 | 3789 |
| 3790 Node* AstGraphBuilder::BuildThrow(Node* exception_value) { | 3790 Node* AstGraphBuilder::BuildThrow(Node* exception_value) { |
| 3791 NewNode(javascript()->CallRuntime(Runtime::kReThrow), exception_value); | 3791 NewNode(javascript()->CallRuntime(Runtime::kReThrow), exception_value); |
| 3792 Node* control = NewNode(common()->Throw(), exception_value); | 3792 Node* control = NewNode(common()->Throw(), exception_value); |
| 3793 UpdateControlDependencyToLeaveFunction(control); | 3793 UpdateControlDependencyToLeaveFunction(control); |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4359 // Phi does not exist yet, introduce one. | 4359 // Phi does not exist yet, introduce one. |
| 4360 value = NewPhi(inputs, value, control); | 4360 value = NewPhi(inputs, value, control); |
| 4361 value->ReplaceInput(inputs - 1, other); | 4361 value->ReplaceInput(inputs - 1, other); |
| 4362 } | 4362 } |
| 4363 return value; | 4363 return value; |
| 4364 } | 4364 } |
| 4365 | 4365 |
| 4366 } // namespace compiler | 4366 } // namespace compiler |
| 4367 } // namespace internal | 4367 } // namespace internal |
| 4368 } // namespace v8 | 4368 } // namespace v8 |
| OLD | NEW |