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

Side by Side Diff: src/ast/scopes.h

Issue 1906923002: [modules] Infer strict mode from within scope object (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | src/ast/scopes.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_AST_SCOPES_H_ 5 #ifndef V8_AST_SCOPES_H_
6 #define V8_AST_SCOPES_H_ 6 #define V8_AST_SCOPES_H_
7 7
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/hashmap.h" 9 #include "src/hashmap.h"
10 #include "src/pending-compilation-error-handler.h" 10 #include "src/pending-compilation-error-handler.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 void RecordEvalCall() { scope_calls_eval_ = true; } 236 void RecordEvalCall() { scope_calls_eval_ = true; }
237 237
238 // Inform the scope that the corresponding code uses "arguments". 238 // Inform the scope that the corresponding code uses "arguments".
239 void RecordArgumentsUsage() { scope_uses_arguments_ = true; } 239 void RecordArgumentsUsage() { scope_uses_arguments_ = true; }
240 240
241 // Inform the scope that the corresponding code uses "super". 241 // Inform the scope that the corresponding code uses "super".
242 void RecordSuperPropertyUsage() { scope_uses_super_property_ = true; } 242 void RecordSuperPropertyUsage() { scope_uses_super_property_ = true; }
243 243
244 // Set the language mode flag (unless disabled by a global flag). 244 // Set the language mode flag (unless disabled by a global flag).
245 void SetLanguageMode(LanguageMode language_mode) { 245 void SetLanguageMode(LanguageMode language_mode) {
246 DCHECK(!is_module_scope());
246 language_mode_ = language_mode; 247 language_mode_ = language_mode;
247 } 248 }
248 249
249 // Set the ASM module flag. 250 // Set the ASM module flag.
250 void SetAsmModule() { asm_module_ = true; } 251 void SetAsmModule() { asm_module_ = true; }
251 252
252 // Inform the scope that the scope may execute declarations nonlinearly. 253 // Inform the scope that the scope may execute declarations nonlinearly.
253 // Currently, the only nonlinear scope is a switch statement. The name is 254 // Currently, the only nonlinear scope is a switch statement. The name is
254 // more general in case something else comes up with similar control flow, 255 // more general in case something else comes up with similar control flow,
255 // for example the ability to break out of something which does not have 256 // for example the ability to break out of something which does not have
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 AstValueFactory* ast_value_factory_; 802 AstValueFactory* ast_value_factory_;
802 Zone* zone_; 803 Zone* zone_;
803 804
804 PendingCompilationErrorHandler pending_error_handler_; 805 PendingCompilationErrorHandler pending_error_handler_;
805 }; 806 };
806 807
807 } // namespace internal 808 } // namespace internal
808 } // namespace v8 809 } // namespace v8
809 810
810 #endif // V8_AST_SCOPES_H_ 811 #endif // V8_AST_SCOPES_H_
OLDNEW
« no previous file with comments | « no previous file | src/ast/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698