| 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/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
| 9 #include "src/compiler/ast-loop-assignment-analyzer.h" | 9 #include "src/compiler/ast-loop-assignment-analyzer.h" |
| 10 #include "src/compiler/control-builders.h" | 10 #include "src/compiler/control-builders.h" |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 } | 566 } |
| 567 | 567 |
| 568 | 568 |
| 569 void AstGraphBuilder::CreateGraphBody(bool stack_check) { | 569 void AstGraphBuilder::CreateGraphBody(bool stack_check) { |
| 570 DeclarationScope* scope = info()->scope(); | 570 DeclarationScope* scope = info()->scope(); |
| 571 | 571 |
| 572 // Build the arguments object if it is used. | 572 // Build the arguments object if it is used. |
| 573 BuildArgumentsObject(scope->arguments()); | 573 BuildArgumentsObject(scope->arguments()); |
| 574 | 574 |
| 575 // Build rest arguments array if it is used. | 575 // Build rest arguments array if it is used. |
| 576 int rest_index; | 576 int rest_index = 0; |
| 577 Variable* rest_parameter = scope->rest_parameter(&rest_index); | 577 Variable* rest_parameter = scope->rest_parameter(&rest_index); |
| 578 BuildRestArgumentsArray(rest_parameter, rest_index); | 578 BuildRestArgumentsArray(rest_parameter, rest_index); |
| 579 | 579 |
| 580 // Build assignment to {.this_function} variable if it is used. | 580 // Build assignment to {.this_function} variable if it is used. |
| 581 BuildThisFunctionVariable(scope->this_function_var()); | 581 BuildThisFunctionVariable(scope->this_function_var()); |
| 582 | 582 |
| 583 // Build assignment to {new.target} variable if it is used. | 583 // Build assignment to {new.target} variable if it is used. |
| 584 BuildNewTargetVariable(scope->new_target_var()); | 584 BuildNewTargetVariable(scope->new_target_var()); |
| 585 | 585 |
| 586 // Emit tracing call if requested to do so. | 586 // Emit tracing call if requested to do so. |
| (...skipping 3738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4325 // Phi does not exist yet, introduce one. | 4325 // Phi does not exist yet, introduce one. |
| 4326 value = NewPhi(inputs, value, control); | 4326 value = NewPhi(inputs, value, control); |
| 4327 value->ReplaceInput(inputs - 1, other); | 4327 value->ReplaceInput(inputs - 1, other); |
| 4328 } | 4328 } |
| 4329 return value; | 4329 return value; |
| 4330 } | 4330 } |
| 4331 | 4331 |
| 4332 } // namespace compiler | 4332 } // namespace compiler |
| 4333 } // namespace internal | 4333 } // namespace internal |
| 4334 } // namespace v8 | 4334 } // namespace v8 |
| OLD | NEW |