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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 | 408 |
409 // The ModuleDescriptor for this scope; only for module scopes. | 409 // The ModuleDescriptor for this scope; only for module scopes. |
410 ModuleDescriptor* module() const { return module_descriptor_; } | 410 ModuleDescriptor* module() const { return module_descriptor_; } |
411 | 411 |
412 // --------------------------------------------------------------------------- | 412 // --------------------------------------------------------------------------- |
413 // Variable allocation. | 413 // Variable allocation. |
414 | 414 |
415 // Collect stack and context allocated local variables in this scope. Note | 415 // Collect stack and context allocated local variables in this scope. Note |
416 // that the function variable - if present - is not collected and should be | 416 // that the function variable - if present - is not collected and should be |
417 // handled separately. | 417 // handled separately. |
418 void CollectStackAndContextLocals(ZoneList<Variable*>* stack_locals, | 418 void CollectStackAndContextLocals( |
419 ZoneList<Variable*>* context_locals); | 419 ZoneList<Variable*>* stack_locals, ZoneList<Variable*>* context_locals, |
| 420 ZoneList<Variable*>* strong_mode_free_variables = nullptr); |
420 | 421 |
421 // Current number of var or const locals. | 422 // Current number of var or const locals. |
422 int num_var_or_const() { return num_var_or_const_; } | 423 int num_var_or_const() { return num_var_or_const_; } |
423 | 424 |
424 // Result of variable allocation. | 425 // Result of variable allocation. |
425 int num_stack_slots() const { return num_stack_slots_; } | 426 int num_stack_slots() const { return num_stack_slots_; } |
426 int num_heap_slots() const { return num_heap_slots_; } | 427 int num_heap_slots() const { return num_heap_slots_; } |
427 | 428 |
428 int StackLocalCount() const; | 429 int StackLocalCount() const; |
429 int ContextLocalCount() const; | 430 int ContextLocalCount() const; |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 | 728 |
728 AstValueFactory* ast_value_factory_; | 729 AstValueFactory* ast_value_factory_; |
729 Zone* zone_; | 730 Zone* zone_; |
730 | 731 |
731 PendingCompilationErrorHandler pending_error_handler_; | 732 PendingCompilationErrorHandler pending_error_handler_; |
732 }; | 733 }; |
733 | 734 |
734 } } // namespace v8::internal | 735 } } // namespace v8::internal |
735 | 736 |
736 #endif // V8_SCOPES_H_ | 737 #endif // V8_SCOPES_H_ |
OLD | NEW |