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

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

Issue 2009963002: [modules] Disable HTML-like comments Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Unify behavior for optimized and non-optimized executions Created 4 years, 6 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 } 336 }
337 bool outer_scope_calls_sloppy_eval() const { 337 bool outer_scope_calls_sloppy_eval() const {
338 return outer_scope_calls_sloppy_eval_; 338 return outer_scope_calls_sloppy_eval_;
339 } 339 }
340 bool asm_module() const { return asm_module_; } 340 bool asm_module() const { return asm_module_; }
341 bool asm_function() const { return asm_function_; } 341 bool asm_function() const { return asm_function_; }
342 342
343 // Is this scope inside a with statement. 343 // Is this scope inside a with statement.
344 bool inside_with() const { return scope_inside_with_; } 344 bool inside_with() const { return scope_inside_with_; }
345 345
346 // Is this scope inside ECMAScript module code.
347 bool inside_module() const { return scope_inside_module_; }
348
346 // Does this scope access "arguments". 349 // Does this scope access "arguments".
347 bool uses_arguments() const { return scope_uses_arguments_; } 350 bool uses_arguments() const { return scope_uses_arguments_; }
348 // Does this scope access "super" property (super.foo). 351 // Does this scope access "super" property (super.foo).
349 bool uses_super_property() const { return scope_uses_super_property_; } 352 bool uses_super_property() const { return scope_uses_super_property_; }
350 // Does this scope have the potential to execute declarations non-linearly? 353 // Does this scope have the potential to execute declarations non-linearly?
351 bool is_nonlinear() const { return scope_nonlinear_; } 354 bool is_nonlinear() const { return scope_nonlinear_; }
352 355
353 // Whether this needs to be represented by a runtime context. 356 // Whether this needs to be represented by a runtime context.
354 bool NeedsContext() const { 357 bool NeedsContext() const {
355 // Catch and module scopes always have heap slots. 358 // Catch and module scopes always have heap slots.
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 // Module descriptor; module scopes only. 635 // Module descriptor; module scopes only.
633 ModuleDescriptor* module_descriptor_; 636 ModuleDescriptor* module_descriptor_;
634 637
635 // Map of function names to lists of functions defined in sloppy blocks 638 // Map of function names to lists of functions defined in sloppy blocks
636 SloppyBlockFunctionMap sloppy_block_function_map_; 639 SloppyBlockFunctionMap sloppy_block_function_map_;
637 640
638 // Scope-specific information computed during parsing. 641 // Scope-specific information computed during parsing.
639 // 642 //
640 // This scope is inside a 'with' of some outer scope. 643 // This scope is inside a 'with' of some outer scope.
641 bool scope_inside_with_; 644 bool scope_inside_with_;
645 // This scope is inside ECMAScript module code
646 bool scope_inside_module_;
642 // This scope or a nested catch scope or with scope contain an 'eval' call. At 647 // This scope or a nested catch scope or with scope contain an 'eval' call. At
643 // the 'eval' call site this scope is the declaration scope. 648 // the 'eval' call site this scope is the declaration scope.
644 bool scope_calls_eval_; 649 bool scope_calls_eval_;
645 // This scope uses "arguments". 650 // This scope uses "arguments".
646 bool scope_uses_arguments_; 651 bool scope_uses_arguments_;
647 // This scope uses "super" property ('super.foo'). 652 // This scope uses "super" property ('super.foo').
648 bool scope_uses_super_property_; 653 bool scope_uses_super_property_;
649 // This scope contains an "use asm" annotation. 654 // This scope contains an "use asm" annotation.
650 bool asm_module_; 655 bool asm_module_;
651 // This scope's outer context is an asm module. 656 // This scope's outer context is an asm module.
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 AstValueFactory* ast_value_factory_; 819 AstValueFactory* ast_value_factory_;
815 Zone* zone_; 820 Zone* zone_;
816 821
817 PendingCompilationErrorHandler pending_error_handler_; 822 PendingCompilationErrorHandler pending_error_handler_;
818 }; 823 };
819 824
820 } // namespace internal 825 } // namespace internal
821 } // namespace v8 826 } // namespace v8
822 827
823 #endif // V8_AST_SCOPES_H_ 828 #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