| OLD | NEW |
| 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 // scope over a let binding of the same name. | 230 // scope over a let binding of the same name. |
| 231 Declaration* CheckConflictingVarDeclarations(); | 231 Declaration* CheckConflictingVarDeclarations(); |
| 232 | 232 |
| 233 // --------------------------------------------------------------------------- | 233 // --------------------------------------------------------------------------- |
| 234 // Scope-specific info. | 234 // Scope-specific info. |
| 235 | 235 |
| 236 // Inform the scope that the corresponding code contains a with statement. | 236 // Inform the scope that the corresponding code contains a with statement. |
| 237 void RecordWithStatement() { scope_contains_with_ = true; } | 237 void RecordWithStatement() { scope_contains_with_ = true; } |
| 238 | 238 |
| 239 // Inform the scope that the corresponding code contains an eval call. | 239 // Inform the scope that the corresponding code contains an eval call. |
| 240 void RecordEvalCall() { if (!is_script_scope()) scope_calls_eval_ = true; } | 240 void RecordEvalCall() { scope_calls_eval_ = true; } |
| 241 | 241 |
| 242 // Inform the scope that the corresponding code uses "arguments". | 242 // Inform the scope that the corresponding code uses "arguments". |
| 243 void RecordArgumentsUsage() { scope_uses_arguments_ = true; } | 243 void RecordArgumentsUsage() { scope_uses_arguments_ = true; } |
| 244 | 244 |
| 245 // Inform the scope that the corresponding code uses "super". | 245 // Inform the scope that the corresponding code uses "super". |
| 246 void RecordSuperPropertyUsage() { scope_uses_super_property_ = true; } | 246 void RecordSuperPropertyUsage() { scope_uses_super_property_ = true; } |
| 247 | 247 |
| 248 // Set the language mode flag (unless disabled by a global flag). | 248 // Set the language mode flag (unless disabled by a global flag). |
| 249 void SetLanguageMode(LanguageMode language_mode) { | 249 void SetLanguageMode(LanguageMode language_mode) { |
| 250 language_mode_ = language_mode; | 250 language_mode_ = language_mode; |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 845 | 845 |
| 846 // For tracking which classes are declared consecutively. Needed for strong | 846 // For tracking which classes are declared consecutively. Needed for strong |
| 847 // mode. | 847 // mode. |
| 848 int class_declaration_group_start_; | 848 int class_declaration_group_start_; |
| 849 }; | 849 }; |
| 850 | 850 |
| 851 } // namespace internal | 851 } // namespace internal |
| 852 } // namespace v8 | 852 } // namespace v8 |
| 853 | 853 |
| 854 #endif // V8_SCOPES_H_ | 854 #endif // V8_SCOPES_H_ |
| OLD | NEW |