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

Side by Side Diff: runtime/vm/scopes.h

Issue 2903993002: Remember deopt-id -> context-level mappings in var descriptors. (Closed)
Patch Set: update descriptor tests Created 3 years, 6 months 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 | « runtime/vm/parser_test.cc ('k') | runtime/vm/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 (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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 first_frame_index, 317 int first_frame_index,
318 LocalScope* context_owner, 318 LocalScope* context_owner,
319 bool* found_captured_variables); 319 bool* found_captured_variables);
320 320
321 // Creates variable info for the scope and all its nested scopes. 321 // Creates variable info for the scope and all its nested scopes.
322 // Must be called after AllocateVariables() has been called. 322 // Must be called after AllocateVariables() has been called.
323 RawLocalVarDescriptors* GetVarDescriptors(const Function& func); 323 RawLocalVarDescriptors* GetVarDescriptors(
324 const Function& func,
325 ZoneGrowableArray<intptr_t>* context_level_array);
324 326
325 // Create a ContextScope object describing all captured variables referenced 327 // Create a ContextScope object describing all captured variables referenced
326 // from this scope and belonging to outer scopes. 328 // from this scope and belonging to outer scopes.
327 RawContextScope* PreserveOuterScope(int current_context_level) const; 329 RawContextScope* PreserveOuterScope(int current_context_level) const;
328 330
329 // Mark all local variables that are accessible from this scope up to 331 // Mark all local variables that are accessible from this scope up to
330 // top_scope (included) as captured unless they are marked as forced to stack. 332 // top_scope (included) as captured unless they are marked as forced to stack.
331 void CaptureLocalVariables(LocalScope* top_scope); 333 void CaptureLocalVariables(LocalScope* top_scope);
332 334
333 // Creates a LocalScope representing the outer scope of a local function to be 335 // Creates a LocalScope representing the outer scope of a local function to be
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 // List of names referenced in this scope and its children that 376 // List of names referenced in this scope and its children that
375 // are not resolved to local variables. 377 // are not resolved to local variables.
376 GrowableArray<NameReference*> referenced_; 378 GrowableArray<NameReference*> referenced_;
377 379
378 DISALLOW_COPY_AND_ASSIGN(LocalScope); 380 DISALLOW_COPY_AND_ASSIGN(LocalScope);
379 }; 381 };
380 382
381 } // namespace dart 383 } // namespace dart
382 384
383 #endif // RUNTIME_VM_SCOPES_H_ 385 #endif // RUNTIME_VM_SCOPES_H_
OLDNEW
« no previous file with comments | « runtime/vm/parser_test.cc ('k') | runtime/vm/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698