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

Side by Side Diff: src/scopes.h

Issue 1409253007: Scope cleanup: remove unused bits and accessors (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/pattern-rewriter.cc ('k') | src/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_SCOPES_H_ 5 #ifndef V8_SCOPES_H_
6 #define V8_SCOPES_H_ 6 #define V8_SCOPES_H_
7 7
8 #include "src/ast.h" 8 #include "src/ast.h"
9 #include "src/pending-compilation-error-handler.h" 9 #include "src/pending-compilation-error-handler.h"
10 #include "src/zone.h" 10 #include "src/zone.h"
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 return scope_calls_eval_ && is_sloppy(language_mode_); 332 return scope_calls_eval_ && is_sloppy(language_mode_);
333 } 333 }
334 bool outer_scope_calls_sloppy_eval() const { 334 bool outer_scope_calls_sloppy_eval() const {
335 return outer_scope_calls_sloppy_eval_; 335 return outer_scope_calls_sloppy_eval_;
336 } 336 }
337 bool asm_module() const { return asm_module_; } 337 bool asm_module() const { return asm_module_; }
338 bool asm_function() const { return asm_function_; } 338 bool asm_function() const { return asm_function_; }
339 339
340 // Is this scope inside a with statement. 340 // Is this scope inside a with statement.
341 bool inside_with() const { return scope_inside_with_; } 341 bool inside_with() const { return scope_inside_with_; }
342 // Does this scope contain a with statement.
343 bool contains_with() const { return scope_contains_with_; }
344 342
345 // Does this scope access "arguments". 343 // Does this scope access "arguments".
346 bool uses_arguments() const { return scope_uses_arguments_; } 344 bool uses_arguments() const { return scope_uses_arguments_; }
347 // Does any inner scope access "arguments".
348 bool inner_uses_arguments() const { return inner_scope_uses_arguments_; }
349 // Does this scope access "super" property (super.foo). 345 // Does this scope access "super" property (super.foo).
350 bool uses_super_property() const { return scope_uses_super_property_; } 346 bool uses_super_property() const { return scope_uses_super_property_; }
351 // Does this scope have the potential to execute declarations non-linearly? 347 // Does this scope have the potential to execute declarations non-linearly?
352 bool is_nonlinear() const { return scope_nonlinear_; } 348 bool is_nonlinear() const { return scope_nonlinear_; }
353 349
354 // Whether this needs to be represented by a runtime context. 350 // Whether this needs to be represented by a runtime context.
355 bool NeedsContext() const { 351 bool NeedsContext() const {
356 // Catch and module scopes always have heap slots. 352 // Catch and module scopes always have heap slots.
357 DCHECK(!is_catch_scope() || num_heap_slots() > 0); 353 DCHECK(!is_catch_scope() || num_heap_slots() > 0);
358 DCHECK(!is_module_scope() || num_heap_slots() > 0); 354 DCHECK(!is_module_scope() || num_heap_slots() > 0);
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 bool scope_nonlinear_; 664 bool scope_nonlinear_;
669 // The language mode of this scope. 665 // The language mode of this scope.
670 LanguageMode language_mode_; 666 LanguageMode language_mode_;
671 // Source positions. 667 // Source positions.
672 int start_position_; 668 int start_position_;
673 int end_position_; 669 int end_position_;
674 670
675 // Computed via PropagateScopeInfo. 671 // Computed via PropagateScopeInfo.
676 bool outer_scope_calls_sloppy_eval_; 672 bool outer_scope_calls_sloppy_eval_;
677 bool inner_scope_calls_eval_; 673 bool inner_scope_calls_eval_;
678 bool inner_scope_uses_arguments_;
679 bool force_eager_compilation_; 674 bool force_eager_compilation_;
680 bool force_context_allocation_; 675 bool force_context_allocation_;
681 676
682 // True if it doesn't need scope resolution (e.g., if the scope was 677 // True if it doesn't need scope resolution (e.g., if the scope was
683 // constructed based on a serialized scope info or a catch context). 678 // constructed based on a serialized scope info or a catch context).
684 bool already_resolved_; 679 bool already_resolved_;
685 680
686 // True if it holds 'var' declarations. 681 // True if it holds 'var' declarations.
687 bool is_declaration_scope_; 682 bool is_declaration_scope_;
688 683
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 840
846 // For tracking which classes are declared consecutively. Needed for strong 841 // For tracking which classes are declared consecutively. Needed for strong
847 // mode. 842 // mode.
848 int class_declaration_group_start_; 843 int class_declaration_group_start_;
849 }; 844 };
850 845
851 } // namespace internal 846 } // namespace internal
852 } // namespace v8 847 } // namespace v8
853 848
854 #endif // V8_SCOPES_H_ 849 #endif // V8_SCOPES_H_
OLDNEW
« no previous file with comments | « src/pattern-rewriter.cc ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698