Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
dart::FrameLayout Struct Reference

#include <frame_layout.h>

Public Member Functions

intptr_t saved_below_pc () const
 
intptr_t FrameSlotForVariable (const LocalVariable *variable) const
 
intptr_t FrameSlotForVariableIndex (intptr_t index) const
 
intptr_t VariableIndexForFrameSlot (intptr_t frame_slot) const
 

Static Public Member Functions

static void Init ()
 

Public Attributes

intptr_t first_object_from_fp
 
intptr_t last_fixed_object_from_fp
 
intptr_t param_end_from_fp
 
intptr_t last_param_from_entry_sp
 
intptr_t first_local_from_fp
 
intptr_t dart_fixed_frame_size
 
intptr_t saved_caller_pp_from_fp
 
intptr_t saved_caller_fp_from_fp
 
intptr_t saved_caller_pc_from_fp
 
intptr_t code_from_fp
 
intptr_t exit_link_slot_from_entry_fp
 

Detailed Description

Definition at line 22 of file frame_layout.h.

Member Function Documentation

◆ FrameSlotForVariable()

intptr_t dart::FrameLayout::FrameSlotForVariable ( const LocalVariable variable) const

Definition at line 83 of file stack_frame.cc.

84 {
85 ASSERT(!variable->is_captured());
86 return this->FrameSlotForVariableIndex(variable->index().value());
87}
#define ASSERT(E)
intptr_t FrameSlotForVariableIndex(intptr_t index) const
Definition: stack_frame.cc:89

◆ FrameSlotForVariableIndex()

intptr_t dart::FrameLayout::FrameSlotForVariableIndex ( intptr_t  index) const

Definition at line 89 of file stack_frame.cc.

89 {
90 // Variable indices are:
91 // [1, 2, ..., M] for the M parameters.
92 // [0, -1, -2, ... -(N-1)] for the N [LocalVariable]s
93 // See (runtime/vm/scopes.h)
94 return variable_index <= 0 ? (variable_index + first_local_from_fp)
95 : (variable_index + param_end_from_fp);
96}
intptr_t param_end_from_fp
Definition: frame_layout.h:30
intptr_t first_local_from_fp
Definition: frame_layout.h:37

◆ Init()

void dart::FrameLayout::Init ( )
static

Definition at line 98 of file stack_frame.cc.

98 {
99 // By default we use frames with CODE_REG/PP in the frame.
102
103 if (FLAG_precompiled_mode) {
105 }
106#if defined(DART_PRECOMPILED_RUNTIME)
107 if (FLAG_precompiled_mode) {
110 }
111#endif
112}
FrameLayout frame_layout
Definition: stack_frame.cc:76
const FrameLayout default_frame_layout
Definition: stack_frame.cc:43
FrameLayout runtime_frame_layout
Definition: stack_frame.cc:81
const FrameLayout invalid_frame_layout
Definition: stack_frame.cc:29
const FrameLayout bare_instructions_frame_layout
Definition: stack_frame.cc:56

◆ saved_below_pc()

intptr_t dart::FrameLayout::saved_below_pc ( ) const
inline

Definition at line 58 of file frame_layout.h.

58{ return -first_local_from_fp; }

◆ VariableIndexForFrameSlot()

intptr_t dart::FrameLayout::VariableIndexForFrameSlot ( intptr_t  frame_slot) const
inline

Definition at line 70 of file frame_layout.h.

70 {
71 if (frame_slot <= first_local_from_fp) {
72 return frame_slot - first_local_from_fp;
73 } else {
74 ASSERT(frame_slot > param_end_from_fp);
75 return frame_slot - param_end_from_fp;
76 }
77 }

Member Data Documentation

◆ code_from_fp

intptr_t dart::FrameLayout::code_from_fp

Definition at line 52 of file frame_layout.h.

◆ dart_fixed_frame_size

intptr_t dart::FrameLayout::dart_fixed_frame_size

Definition at line 40 of file frame_layout.h.

◆ exit_link_slot_from_entry_fp

intptr_t dart::FrameLayout::exit_link_slot_from_entry_fp

Definition at line 55 of file frame_layout.h.

◆ first_local_from_fp

intptr_t dart::FrameLayout::first_local_from_fp

Definition at line 37 of file frame_layout.h.

◆ first_object_from_fp

intptr_t dart::FrameLayout::first_object_from_fp

Definition at line 24 of file frame_layout.h.

◆ last_fixed_object_from_fp

intptr_t dart::FrameLayout::last_fixed_object_from_fp

Definition at line 27 of file frame_layout.h.

◆ last_param_from_entry_sp

intptr_t dart::FrameLayout::last_param_from_entry_sp

Definition at line 34 of file frame_layout.h.

◆ param_end_from_fp

intptr_t dart::FrameLayout::param_end_from_fp

Definition at line 30 of file frame_layout.h.

◆ saved_caller_fp_from_fp

intptr_t dart::FrameLayout::saved_caller_fp_from_fp

Definition at line 46 of file frame_layout.h.

◆ saved_caller_pc_from_fp

intptr_t dart::FrameLayout::saved_caller_pc_from_fp

Definition at line 49 of file frame_layout.h.

◆ saved_caller_pp_from_fp

intptr_t dart::FrameLayout::saved_caller_pp_from_fp

Definition at line 43 of file frame_layout.h.


The documentation for this struct was generated from the following files: