OLD | NEW |
---|---|
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef RUNTIME_VM_SCOPES_H_ | 5 #ifndef RUNTIME_VM_SCOPES_H_ |
6 #define RUNTIME_VM_SCOPES_H_ | 6 #define RUNTIME_VM_SCOPES_H_ |
7 | 7 |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "platform/globals.h" | 9 #include "platform/globals.h" |
10 #include "vm/allocation.h" | 10 #include "vm/allocation.h" |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
307 // Allocate both captured and non-captured variables declared in this scope | 307 // Allocate both captured and non-captured variables declared in this scope |
308 // and in its children scopes of the same function level. Allocating means | 308 // and in its children scopes of the same function level. Allocating means |
309 // assigning a frame slot index or a context slot index. | 309 // assigning a frame slot index or a context slot index. |
310 // Parameters to be allocated in the frame must all appear in the top scope | 310 // Parameters to be allocated in the frame must all appear in the top scope |
311 // and not in its children (we do not yet handle register parameters). | 311 // and not in its children (we do not yet handle register parameters). |
312 // Locals must be listed after parameters in top scope and in its children. | 312 // Locals must be listed after parameters in top scope and in its children. |
313 // Two locals in different sibling scopes may share the same frame slot. | 313 // Two locals in different sibling scopes may share the same frame slot. |
314 // Return the index of the next available frame slot. | 314 // Return the index of the next available frame slot. |
315 int AllocateVariables(int first_parameter_index, | 315 int AllocateVariables(int first_parameter_index, |
316 int num_parameters, | 316 int num_parameters, |
317 int type_args_slot, | |
Vyacheslav Egorov (Google)
2017/06/20 15:21:41
why is this not a boolean like:
bool needs_type_a
regis
2017/06/21 04:39:04
Removed, per your suggestion in scopes.cc.
| |
317 int first_frame_index, | 318 int first_frame_index, |
318 LocalScope* context_owner, | 319 LocalScope* context_owner, |
319 bool* found_captured_variables); | 320 bool* found_captured_variables); |
320 | 321 |
321 // Creates variable info for the scope and all its nested scopes. | 322 // Creates variable info for the scope and all its nested scopes. |
322 // Must be called after AllocateVariables() has been called. | 323 // Must be called after AllocateVariables() has been called. |
323 RawLocalVarDescriptors* GetVarDescriptors( | 324 RawLocalVarDescriptors* GetVarDescriptors( |
324 const Function& func, | 325 const Function& func, |
325 ZoneGrowableArray<intptr_t>* context_level_array); | 326 ZoneGrowableArray<intptr_t>* context_level_array); |
326 | 327 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
376 // List of names referenced in this scope and its children that | 377 // List of names referenced in this scope and its children that |
377 // are not resolved to local variables. | 378 // are not resolved to local variables. |
378 GrowableArray<NameReference*> referenced_; | 379 GrowableArray<NameReference*> referenced_; |
379 | 380 |
380 DISALLOW_COPY_AND_ASSIGN(LocalScope); | 381 DISALLOW_COPY_AND_ASSIGN(LocalScope); |
381 }; | 382 }; |
382 | 383 |
383 } // namespace dart | 384 } // namespace dart |
384 | 385 |
385 #endif // RUNTIME_VM_SCOPES_H_ | 386 #endif // RUNTIME_VM_SCOPES_H_ |
OLD | NEW |