| 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 input_buffer_size_(0), | 473 input_buffer_size_(0), |
| 474 input_buffer_(nullptr), | 474 input_buffer_(nullptr), |
| 475 exit_controls_(local_zone), | 475 exit_controls_(local_zone), |
| 476 loop_assignment_analysis_(loop), | 476 loop_assignment_analysis_(loop), |
| 477 type_hint_analysis_(type_hint_analysis), | 477 type_hint_analysis_(type_hint_analysis), |
| 478 state_values_cache_(jsgraph), | 478 state_values_cache_(jsgraph), |
| 479 liveness_analyzer_(static_cast<size_t>(info->scope()->num_stack_slots()), | 479 liveness_analyzer_(static_cast<size_t>(info->scope()->num_stack_slots()), |
| 480 local_zone), | 480 local_zone), |
| 481 frame_state_function_info_(common()->CreateFrameStateFunctionInfo( | 481 frame_state_function_info_(common()->CreateFrameStateFunctionInfo( |
| 482 FrameStateType::kJavaScriptFunction, info->num_parameters() + 1, | 482 FrameStateType::kJavaScriptFunction, info->num_parameters() + 1, |
| 483 info->scope()->num_stack_slots(), info->shared_info(), | 483 info->scope()->num_stack_slots(), info->shared_info())) { |
| 484 CALL_MAINTAINS_NATIVE_CONTEXT)) { | |
| 485 InitializeAstVisitor(info->isolate()); | 484 InitializeAstVisitor(info->isolate()); |
| 486 } | 485 } |
| 487 | 486 |
| 488 | 487 |
| 489 Node* AstGraphBuilder::GetFunctionClosureForContext() { | 488 Node* AstGraphBuilder::GetFunctionClosureForContext() { |
| 490 Scope* closure_scope = current_scope()->ClosureScope(); | 489 Scope* closure_scope = current_scope()->ClosureScope(); |
| 491 if (closure_scope->is_script_scope() || | 490 if (closure_scope->is_script_scope() || |
| 492 closure_scope->is_module_scope()) { | 491 closure_scope->is_module_scope()) { |
| 493 // Contexts nested in the native context have a canonical empty function as | 492 // Contexts nested in the native context have a canonical empty function as |
| 494 // their closure, not the anonymous closure containing the global code. | 493 // their closure, not the anonymous closure containing the global code. |
| (...skipping 3850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4345 // Phi does not exist yet, introduce one. | 4344 // Phi does not exist yet, introduce one. |
| 4346 value = NewPhi(inputs, value, control); | 4345 value = NewPhi(inputs, value, control); |
| 4347 value->ReplaceInput(inputs - 1, other); | 4346 value->ReplaceInput(inputs - 1, other); |
| 4348 } | 4347 } |
| 4349 return value; | 4348 return value; |
| 4350 } | 4349 } |
| 4351 | 4350 |
| 4352 } // namespace compiler | 4351 } // namespace compiler |
| 4353 } // namespace internal | 4352 } // namespace internal |
| 4354 } // namespace v8 | 4353 } // namespace v8 |
| OLD | NEW |