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

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

Issue 1804783002: Remove Scope::scope_contains_with_ bit (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix scope names and GCC build Created 4 years, 9 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 bool HasIllegalRedeclaration() const { return illegal_redecl_ != NULL; } 238 bool HasIllegalRedeclaration() const { return illegal_redecl_ != NULL; }
239 239
240 // For harmony block scoping mode: Check if the scope has conflicting var 240 // For harmony block scoping mode: Check if the scope has conflicting var
241 // declarations, i.e. a var declaration that has been hoisted from a nested 241 // declarations, i.e. a var declaration that has been hoisted from a nested
242 // scope over a let binding of the same name. 242 // scope over a let binding of the same name.
243 Declaration* CheckConflictingVarDeclarations(); 243 Declaration* CheckConflictingVarDeclarations();
244 244
245 // --------------------------------------------------------------------------- 245 // ---------------------------------------------------------------------------
246 // Scope-specific info. 246 // Scope-specific info.
247 247
248 // Inform the scope that the corresponding code contains a with statement.
249 void RecordWithStatement() { scope_contains_with_ = true; }
250
251 // Inform the scope that the corresponding code contains an eval call. 248 // Inform the scope that the corresponding code contains an eval call.
252 void RecordEvalCall() { scope_calls_eval_ = true; } 249 void RecordEvalCall() { scope_calls_eval_ = true; }
253 250
254 // Inform the scope that the corresponding code uses "arguments". 251 // Inform the scope that the corresponding code uses "arguments".
255 void RecordArgumentsUsage() { scope_uses_arguments_ = true; } 252 void RecordArgumentsUsage() { scope_uses_arguments_ = true; }
256 253
257 // Inform the scope that the corresponding code uses "super". 254 // Inform the scope that the corresponding code uses "super".
258 void RecordSuperPropertyUsage() { scope_uses_super_property_ = true; } 255 void RecordSuperPropertyUsage() { scope_uses_super_property_ = true; }
259 256
260 // Set the language mode flag (unless disabled by a global flag). 257 // Set the language mode flag (unless disabled by a global flag).
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 // Map of function names to lists of functions defined in sloppy blocks 636 // Map of function names to lists of functions defined in sloppy blocks
640 SloppyBlockFunctionMap sloppy_block_function_map_; 637 SloppyBlockFunctionMap sloppy_block_function_map_;
641 638
642 // Illegal redeclaration. 639 // Illegal redeclaration.
643 Expression* illegal_redecl_; 640 Expression* illegal_redecl_;
644 641
645 // Scope-specific information computed during parsing. 642 // Scope-specific information computed during parsing.
646 // 643 //
647 // This scope is inside a 'with' of some outer scope. 644 // This scope is inside a 'with' of some outer scope.
648 bool scope_inside_with_; 645 bool scope_inside_with_;
649 // This scope contains a 'with' statement.
650 bool scope_contains_with_;
651 // This scope or a nested catch scope or with scope contain an 'eval' call. At 646 // This scope or a nested catch scope or with scope contain an 'eval' call. At
652 // the 'eval' call site this scope is the declaration scope. 647 // the 'eval' call site this scope is the declaration scope.
653 bool scope_calls_eval_; 648 bool scope_calls_eval_;
654 // This scope uses "arguments". 649 // This scope uses "arguments".
655 bool scope_uses_arguments_; 650 bool scope_uses_arguments_;
656 // This scope uses "super" property ('super.foo'). 651 // This scope uses "super" property ('super.foo').
657 bool scope_uses_super_property_; 652 bool scope_uses_super_property_;
658 // This scope contains an "use asm" annotation. 653 // This scope contains an "use asm" annotation.
659 bool asm_module_; 654 bool asm_module_;
660 // This scope's outer context is an asm module. 655 // This scope's outer context is an asm module.
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 AstValueFactory* ast_value_factory_; 817 AstValueFactory* ast_value_factory_;
823 Zone* zone_; 818 Zone* zone_;
824 819
825 PendingCompilationErrorHandler pending_error_handler_; 820 PendingCompilationErrorHandler pending_error_handler_;
826 }; 821 };
827 822
828 } // namespace internal 823 } // namespace internal
829 } // namespace v8 824 } // namespace v8
830 825
831 #endif // V8_AST_SCOPES_H_ 826 #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