Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 536 // Variable allocation. | 536 // Variable allocation. |
| 537 void AllocateStackSlot(Variable* var); | 537 void AllocateStackSlot(Variable* var); |
| 538 void AllocateHeapSlot(Variable* var); | 538 void AllocateHeapSlot(Variable* var); |
| 539 void AllocateParameterLocals(); | 539 void AllocateParameterLocals(); |
| 540 void AllocateNonParameterLocal(Variable* var); | 540 void AllocateNonParameterLocal(Variable* var); |
| 541 void AllocateNonParameterLocals(); | 541 void AllocateNonParameterLocals(); |
| 542 void AllocateVariablesRecursively(); | 542 void AllocateVariablesRecursively(); |
| 543 | 543 |
| 544 private: | 544 private: |
| 545 // Construct a scope based on the scope info. | 545 // Construct a scope based on the scope info. |
| 546 Scope(Scope* inner_scope, ScopeType type, Handle<ScopeInfo> scope_info); | 546 Scope(Scope* inner_scope, |
| 547 ScopeType type, | |
| 548 Handle<ScopeInfo> scope_info, | |
| 549 bool has_context_with_extension = false); | |
|
Kevin Millikin (Chromium)
2012/02/02 08:36:13
Please no: default parameters are bad, boolean-val
| |
| 547 | 550 |
| 548 // Construct a catch scope with a binding for the name. | 551 // Construct a catch scope with a binding for the name. |
| 549 Scope(Scope* inner_scope, Handle<String> catch_variable_name); | 552 Scope(Scope* inner_scope, Handle<String> catch_variable_name); |
| 550 | 553 |
| 551 void AddInnerScope(Scope* inner_scope) { | 554 void AddInnerScope(Scope* inner_scope) { |
| 552 if (inner_scope != NULL) { | 555 if (inner_scope != NULL) { |
| 553 inner_scopes_.Add(inner_scope); | 556 inner_scopes_.Add(inner_scope); |
| 554 inner_scope->outer_scope_ = this; | 557 inner_scope->outer_scope_ = this; |
| 555 } | 558 } |
| 556 } | 559 } |
| 557 | 560 |
| 558 void SetDefaults(ScopeType type, | 561 void SetDefaults(ScopeType type, |
| 559 Scope* outer_scope, | 562 Scope* outer_scope, |
| 560 Handle<ScopeInfo> scope_info); | 563 Handle<ScopeInfo> scope_info); |
| 561 }; | 564 }; |
| 562 | 565 |
| 563 } } // namespace v8::internal | 566 } } // namespace v8::internal |
| 564 | 567 |
| 565 #endif // V8_SCOPES_H_ | 568 #endif // V8_SCOPES_H_ |
| OLD | NEW |