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

Side by Side Diff: src/contexts.cc

Issue 2108193003: [modules] AST and parser rework. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@anonymous-declarations
Patch Set: Rebase. Created 4 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/compiler/ast-loop-assignment-analyzer.cc ('k') | src/crankshaft/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 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/contexts.h" 5 #include "src/contexts.h"
6 6
7 #include "src/ast/scopeinfo.h" 7 #include "src/ast/scopeinfo.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 DCHECK_EQ(kCreatedInitialized, init_flag); 196 DCHECK_EQ(kCreatedInitialized, init_flag);
197 *attributes = READ_ONLY; 197 *attributes = READ_ONLY;
198 *binding_flags = BINDING_IS_INITIALIZED; 198 *binding_flags = BINDING_IS_INITIALIZED;
199 break; 199 break;
200 case CONST: 200 case CONST:
201 *attributes = READ_ONLY; 201 *attributes = READ_ONLY;
202 *binding_flags = (init_flag == kNeedsInitialization) 202 *binding_flags = (init_flag == kNeedsInitialization)
203 ? BINDING_CHECK_INITIALIZED 203 ? BINDING_CHECK_INITIALIZED
204 : BINDING_IS_INITIALIZED; 204 : BINDING_IS_INITIALIZED;
205 break; 205 break;
206 case IMPORT: // TODO(neis): Make sure this is what we want for IMPORT.
206 case DYNAMIC: 207 case DYNAMIC:
207 case DYNAMIC_GLOBAL: 208 case DYNAMIC_GLOBAL:
208 case DYNAMIC_LOCAL: 209 case DYNAMIC_LOCAL:
209 case TEMPORARY: 210 case TEMPORARY:
210 // Note: Fixed context slots are statically allocated by the compiler. 211 // Note: Fixed context slots are statically allocated by the compiler.
211 // Statically allocated variables always have a statically known mode, 212 // Statically allocated variables always have a statically known mode,
212 // which is the mode with which they were declared when added to the 213 // which is the mode with which they were declared when added to the
213 // scope. Thus, the DYNAMIC mode (which corresponds to dynamically 214 // scope. Thus, the DYNAMIC mode (which corresponds to dynamically
214 // declared variables that were introduced through declaration nodes) 215 // declared variables that were introduced through declaration nodes)
215 // must not appear here. 216 // must not appear here.
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 610
610 int previous_value = errors_thrown()->value(); 611 int previous_value = errors_thrown()->value();
611 set_errors_thrown(Smi::FromInt(previous_value + 1)); 612 set_errors_thrown(Smi::FromInt(previous_value + 1));
612 } 613 }
613 614
614 615
615 int Context::GetErrorsThrown() { return errors_thrown()->value(); } 616 int Context::GetErrorsThrown() { return errors_thrown()->value(); }
616 617
617 } // namespace internal 618 } // namespace internal
618 } // namespace v8 619 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-loop-assignment-analyzer.cc ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698