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

Side by Side Diff: src/typing.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/scopes.h ('k') | src/x64/full-codegen-x64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/typing.h" 5 #include "src/typing.h"
6 6
7 #include "src/frames.h" 7 #include "src/frames.h"
8 #include "src/frames-inl.h" 8 #include "src/frames-inl.h"
9 #include "src/ostreams.h" 9 #include "src/ostreams.h"
10 #include "src/parser.h" // for CompileTimeValue; TODO(rossberg): should move 10 #include "src/parser.h" // for CompileTimeValue; TODO(rossberg): should move
(...skipping 18 matching lines...) Expand all
29 do { \ 29 do { \
30 DCHECK(!visitor->HasStackOverflow()); \ 30 DCHECK(!visitor->HasStackOverflow()); \
31 call; \ 31 call; \
32 if (visitor->HasStackOverflow()) return; \ 32 if (visitor->HasStackOverflow()) return; \
33 } while (false) 33 } while (false)
34 34
35 void AstTyper::Run(CompilationInfo* info) { 35 void AstTyper::Run(CompilationInfo* info) {
36 AstTyper* visitor = new(info->zone()) AstTyper(info); 36 AstTyper* visitor = new(info->zone()) AstTyper(info);
37 Scope* scope = info->scope(); 37 Scope* scope = info->scope();
38 38
39 // Handle implicit declaration of the function name in named function
40 // expressions before other declarations.
41 if (scope->is_function_scope() && scope->function() != NULL) {
42 RECURSE(visitor->VisitVariableDeclaration(scope->function()));
43 }
44 RECURSE(visitor->VisitDeclarations(scope->declarations())); 39 RECURSE(visitor->VisitDeclarations(scope->declarations()));
45 RECURSE(visitor->VisitStatements(info->function()->body())); 40 RECURSE(visitor->VisitStatements(info->function()->body()));
46 } 41 }
47 42
48 #undef RECURSE 43 #undef RECURSE
49 44
50 45
51 #ifdef OBJECT_PRINT 46 #ifdef OBJECT_PRINT
52 static void PrintObserved(Variable* var, Object* value, Type* type) { 47 static void PrintObserved(Variable* var, Object* value, Type* type) {
53 OFStream os(stdout); 48 OFStream os(stdout);
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 void AstTyper::VisitImportDeclaration(ImportDeclaration* declaration) { 782 void AstTyper::VisitImportDeclaration(ImportDeclaration* declaration) {
788 } 783 }
789 784
790 785
791 void AstTyper::VisitExportDeclaration(ExportDeclaration* declaration) { 786 void AstTyper::VisitExportDeclaration(ExportDeclaration* declaration) {
792 } 787 }
793 788
794 789
795 } // namespace internal 790 } // namespace internal
796 } // namespace v8 791 } // namespace v8
OLDNEW
« no previous file with comments | « src/scopes.h ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698