#include <scopes.h>
Definition at line 287 of file scopes.h.
◆ LocalVarDescriptorsBuilder()
dart::LocalVarDescriptorsBuilder::LocalVarDescriptorsBuilder |
( |
| ) |
|
|
inline |
◆ Add()
void dart::LocalVarDescriptorsBuilder::Add |
( |
const VarDesc & |
var_desc | ) |
|
|
inline |
Definition at line 297 of file scopes.h.
297{ vars_.Add(var_desc); }
◆ AddAll()
Definition at line 631 of file scopes.cc.
632 {
633 for (intptr_t
i = 0, n = var_descs.Length();
i < n; ++
i) {
636 var_descs.GetInfo(
i, &
desc.info);
638 }
639}
void Add(const VarDesc &var_desc)
◆ AddDeoptIdToContextLevelMappings()
void dart::LocalVarDescriptorsBuilder::AddDeoptIdToContextLevelMappings |
( |
ZoneGrowableArray< intptr_t > * |
context_level_array | ) |
|
Definition at line 641 of file scopes.cc.
642 {
643
644
645
646 for (intptr_t start = 0;
start < context_level_array->
length();) {
647 intptr_t start_deopt_id = (*context_level_array)[
start];
648 intptr_t start_context_level = (*context_level_array)[
start + 1];
650 intptr_t end_deopt_id = start_deopt_id;
651 for (intptr_t peek = start + 2; peek < context_level_array->
length();
652 peek += 2) {
653 intptr_t peek_deopt_id = (*context_level_array)[peek];
654 intptr_t peek_context_level = (*context_level_array)[peek + 1];
655
656 ASSERT(peek_deopt_id > end_deopt_id);
657 if (peek_context_level != start_context_level) break;
659 end_deopt_id = peek_deopt_id;
660 }
661
665 desc.info.scope_id = 0;
666
669 desc.info.set_index(start_context_level);
671
673 }
674}
static const String & Empty()
static TokenPosition Deserialize(int32_t value)
◆ Done()
LocalVarDescriptorsPtr dart::LocalVarDescriptorsBuilder::Done |
( |
| ) |
|
Definition at line 676 of file scopes.cc.
676 {
677 if (vars_.is_empty()) {
678 return Object::empty_var_descriptors().ptr();
679 }
680 const LocalVarDescriptors& var_desc =
682 for (
int i = 0;
i < vars_.length();
i++) {
683 var_desc.SetVar(
i, *(vars_[
i].
name), &vars_[
i].
info);
684 }
685 return var_desc.ptr();
686}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static LocalVarDescriptorsPtr New(intptr_t num_variables)
The documentation for this class was generated from the following files:
- third_party/dart-lang/sdk/runtime/vm/scopes.h
- third_party/dart-lang/sdk/runtime/vm/scopes.cc