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

Side by Side Diff: src/ast/variables.cc

Issue 2199283002: [modules] Introduce new VariableLocation for module imports/exports. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 4 years, 4 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/scopes.cc ('k') | src/compiler/ast-graph-builder.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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/ast/variables.h" 5 #include "src/ast/variables.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/globals.h" 9 #include "src/globals.h"
10 10
11 namespace v8 { 11 namespace v8 {
12 namespace internal { 12 namespace internal {
13 13
14 // ---------------------------------------------------------------------------- 14 // ----------------------------------------------------------------------------
15 // Implementation Variable. 15 // Implementation Variable.
16 16
17 const char* Variable::Mode2String(VariableMode mode) { 17 const char* Variable::Mode2String(VariableMode mode) {
18 switch (mode) { 18 switch (mode) {
19 case VAR: return "VAR"; 19 case VAR: return "VAR";
20 case CONST_LEGACY: return "CONST_LEGACY"; 20 case CONST_LEGACY: return "CONST_LEGACY";
21 case LET: return "LET"; 21 case LET: return "LET";
22 case CONST: return "CONST"; 22 case CONST: return "CONST";
23 case IMPORT: return "IMPORT";
24 case DYNAMIC: return "DYNAMIC"; 23 case DYNAMIC: return "DYNAMIC";
25 case DYNAMIC_GLOBAL: return "DYNAMIC_GLOBAL"; 24 case DYNAMIC_GLOBAL: return "DYNAMIC_GLOBAL";
26 case DYNAMIC_LOCAL: return "DYNAMIC_LOCAL"; 25 case DYNAMIC_LOCAL: return "DYNAMIC_LOCAL";
27 case TEMPORARY: return "TEMPORARY"; 26 case TEMPORARY: return "TEMPORARY";
28 } 27 }
29 UNREACHABLE(); 28 UNREACHABLE();
30 return NULL; 29 return NULL;
31 } 30 }
32 31
33 Variable::Variable(Scope* scope, const AstRawString* name, VariableMode mode, 32 Variable::Variable(Scope* scope, const AstRawString* name, VariableMode mode,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 68
70 int Variable::CompareIndex(Variable* const* v, Variable* const* w) { 69 int Variable::CompareIndex(Variable* const* v, Variable* const* w) {
71 int x = (*v)->index(); 70 int x = (*v)->index();
72 int y = (*w)->index(); 71 int y = (*w)->index();
73 // Consider sorting them according to type as well? 72 // Consider sorting them according to type as well?
74 return x - y; 73 return x - y;
75 } 74 }
76 75
77 } // namespace internal 76 } // namespace internal
78 } // namespace v8 77 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/scopes.cc ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698