| 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 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 NewNode(javascript()->CallRuntime(Runtime::kTraceEnter, 0)); | 577 NewNode(javascript()->CallRuntime(Runtime::kTraceEnter, 0)); |
| 578 } | 578 } |
| 579 | 579 |
| 580 // Visit illegal re-declaration and bail out if it exists. | 580 // Visit illegal re-declaration and bail out if it exists. |
| 581 if (scope->HasIllegalRedeclaration()) { | 581 if (scope->HasIllegalRedeclaration()) { |
| 582 AstEffectContext for_effect(this); | 582 AstEffectContext for_effect(this); |
| 583 scope->VisitIllegalRedeclaration(this); | 583 scope->VisitIllegalRedeclaration(this); |
| 584 return; | 584 return; |
| 585 } | 585 } |
| 586 | 586 |
| 587 // Visit implicit declaration of the function name. | |
| 588 if (scope->is_function_scope() && scope->function() != NULL) { | |
| 589 VisitVariableDeclaration(scope->function()); | |
| 590 } | |
| 591 | |
| 592 // Visit declarations within the function scope. | 587 // Visit declarations within the function scope. |
| 593 VisitDeclarations(scope->declarations()); | 588 VisitDeclarations(scope->declarations()); |
| 594 | 589 |
| 595 // Build a stack-check before the body. | 590 // Build a stack-check before the body. |
| 596 if (stack_check) { | 591 if (stack_check) { |
| 597 Node* node = NewNode(javascript()->StackCheck()); | 592 Node* node = NewNode(javascript()->StackCheck()); |
| 598 PrepareFrameState(node, BailoutId::FunctionEntry()); | 593 PrepareFrameState(node, BailoutId::FunctionEntry()); |
| 599 } | 594 } |
| 600 | 595 |
| 601 // Visit statements in the function body. | 596 // Visit statements in the function body. |
| (...skipping 3710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4312 // Phi does not exist yet, introduce one. | 4307 // Phi does not exist yet, introduce one. |
| 4313 value = NewPhi(inputs, value, control); | 4308 value = NewPhi(inputs, value, control); |
| 4314 value->ReplaceInput(inputs - 1, other); | 4309 value->ReplaceInput(inputs - 1, other); |
| 4315 } | 4310 } |
| 4316 return value; | 4311 return value; |
| 4317 } | 4312 } |
| 4318 | 4313 |
| 4319 } // namespace compiler | 4314 } // namespace compiler |
| 4320 } // namespace internal | 4315 } // namespace internal |
| 4321 } // namespace v8 | 4316 } // namespace v8 |
| OLD | NEW |