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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 // Build assignment to {new.target} variable if it is used. | 574 // Build assignment to {new.target} variable if it is used. |
575 BuildNewTargetVariable(scope->new_target_var()); | 575 BuildNewTargetVariable(scope->new_target_var()); |
576 | 576 |
577 // Emit tracing call if requested to do so. | 577 // Emit tracing call if requested to do so. |
578 if (FLAG_trace) { | 578 if (FLAG_trace) { |
579 NewNode(javascript()->CallRuntime(Runtime::kTraceEnter, 0)); | 579 NewNode(javascript()->CallRuntime(Runtime::kTraceEnter, 0)); |
580 } | 580 } |
581 | 581 |
582 // Visit illegal re-declaration and bail out if it exists. | 582 // Visit illegal re-declaration and bail out if it exists. |
583 if (scope->HasIllegalRedeclaration()) { | 583 if (scope->HasIllegalRedeclaration()) { |
584 AstEffectContext for_effect(this); | 584 VisitForEffect(scope->GetIllegalRedeclaration()); |
585 scope->VisitIllegalRedeclaration(this); | |
586 return; | 585 return; |
587 } | 586 } |
588 | 587 |
589 // Visit declarations within the function scope. | 588 // Visit declarations within the function scope. |
590 VisitDeclarations(scope->declarations()); | 589 VisitDeclarations(scope->declarations()); |
591 | 590 |
592 // Build a stack-check before the body. | 591 // Build a stack-check before the body. |
593 if (stack_check) { | 592 if (stack_check) { |
594 Node* node = NewNode(javascript()->StackCheck()); | 593 Node* node = NewNode(javascript()->StackCheck()); |
595 PrepareFrameState(node, BailoutId::FunctionEntry()); | 594 PrepareFrameState(node, BailoutId::FunctionEntry()); |
(...skipping 3671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4267 // Phi does not exist yet, introduce one. | 4266 // Phi does not exist yet, introduce one. |
4268 value = NewPhi(inputs, value, control); | 4267 value = NewPhi(inputs, value, control); |
4269 value->ReplaceInput(inputs - 1, other); | 4268 value->ReplaceInput(inputs - 1, other); |
4270 } | 4269 } |
4271 return value; | 4270 return value; |
4272 } | 4271 } |
4273 | 4272 |
4274 } // namespace compiler | 4273 } // namespace compiler |
4275 } // namespace internal | 4274 } // namespace internal |
4276 } // namespace v8 | 4275 } // namespace v8 |
OLD | NEW |