Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: src/compiler/ast-graph-builder.cc

Issue 1245603003: Add function literal variable to declaration list. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_turbofan-super-6
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ast-numbering.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/ast-numbering.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698