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

Side by Side Diff: src/typing.cc

Issue 1218783005: Support for global var shortcuts in script contexts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixing builds 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.cc ('k') | src/variables.h » ('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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 store_.LookupBounds(parameter_index(-1)).lower); 98 store_.LookupBounds(parameter_index(-1)).lower);
99 99
100 for (int i = 0; i < params; i++) { 100 for (int i = 0; i < params; i++) {
101 PrintObserved(scope->parameter(i), 101 PrintObserved(scope->parameter(i),
102 frame->GetParameter(i), 102 frame->GetParameter(i),
103 store_.LookupBounds(parameter_index(i)).lower); 103 store_.LookupBounds(parameter_index(i)).lower);
104 } 104 }
105 105
106 ZoneList<Variable*> local_vars(locals, zone()); 106 ZoneList<Variable*> local_vars(locals, zone());
107 ZoneList<Variable*> context_vars(scope->ContextLocalCount(), zone()); 107 ZoneList<Variable*> context_vars(scope->ContextLocalCount(), zone());
108 scope->CollectStackAndContextLocals(&local_vars, &context_vars); 108 ZoneList<Variable*> global_vars(scope->ContextGlobalCount(), zone());
109 scope->CollectStackAndContextLocals(&local_vars, &context_vars,
110 &global_vars);
109 for (int i = 0; i < locals; i++) { 111 for (int i = 0; i < locals; i++) {
110 PrintObserved(local_vars.at(i), 112 PrintObserved(local_vars.at(i),
111 frame->GetExpression(i), 113 frame->GetExpression(i),
112 store_.LookupBounds(stack_local_index(i)).lower); 114 store_.LookupBounds(stack_local_index(i)).lower);
113 } 115 }
114 } 116 }
115 #endif // OBJECT_PRINT 117 #endif // OBJECT_PRINT
116 } 118 }
117 119
118 120
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 void AstTyper::VisitImportDeclaration(ImportDeclaration* declaration) { 787 void AstTyper::VisitImportDeclaration(ImportDeclaration* declaration) {
786 } 788 }
787 789
788 790
789 void AstTyper::VisitExportDeclaration(ExportDeclaration* declaration) { 791 void AstTyper::VisitExportDeclaration(ExportDeclaration* declaration) {
790 } 792 }
791 793
792 794
793 } // namespace internal 795 } // namespace internal
794 } // namespace v8 796 } // namespace v8
OLDNEW
« no previous file with comments | « src/scopes.cc ('k') | src/variables.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698