Lines Matching full:frame
50 … StackFrameKind | A kind of the current stack frame (compiled code or interpreter stack fra…
82 ## Stack frame
83 A stack frame contains data necessary to execute the function the frame belongs to.
84 … code must have the structure described in [Compiled code stack frame](#compiled-code-stack-frame).
86 ### Interpreter stack frame argument
87 …ter stack frame is decribed by `panda::Frame` class. The class has fields to store virtual registe…
88 …a linked list. The field `panda::Frame::prev_` contains a pointer to the previous interpreter (or …
90 ### Compiled code stack frame argument
91 Each compiled function is responsible to reserve stack frame for its purpose and then release it wh…
92 Generaly compiled function builds the stack frame in prolog and releases it in epilog. If a compile…
93 the stack frame it can omit its creation.
94 …`stack pointer` register must point to a valid stack frame (newly created stack frame of stack fra…
95 `frame pointer` register must point to correct place in the frame before the following operations:
100 Release of the stack frame could be done by restoring values of `stack pointer` and `frame pointer`…
102 … continuous in the stack i.e. the callee's stack frame must immediately follow the caller's stack …
104 A compiled code stack frame must have the following structure:
126 D +----------------------+ <- Frame pointer
127 E | Frame pointer |
132 Stack frame elements:
134 - properties - define properties of the frame, f.e. whether it is OSR frame or not.
136 - frame pointer - pointer to the previous frame. The value of `frame pointer` register at the momen…
139 There are two special registers: `stack pointer` and `frame pointer`.
141 `frame pointer` register contains a pointer to the place in the stack where the return address is s…
174 The Bridge Function sets up the Boundary Frame and performs the call to the actual runtime function.
178 … saved regisers goes to Bridge Function stack frame, caller saved registers goes to the current st…
184 * setup the Bridge Function stack frame
185 …aller saved registers (except of registers holding function parameters) to the caller's stack frame
189 Bridge Function stack frame:
194 HEADER | Frame pointer |
208 + 16-byte alignment pad to the next frame +
216 the call instruction, the interpreter's frame and the pointer to `panda::ManagedThread`.
219 * Build a boundary stack frame.
221 * Change stack frame kind in `panda::ManagedThread::stack_frame_kind_` to compiled code stack frame…
223 and interpreter's frame to retreive the function's arguments.
225 * After the return save the result to the interpreter stack frame.
226 * Change stack frame kind in `panda::ManagedThread::stack_frame_kind_` back to interpreter stack fr…
227 * Drop the boundary stack frame.
229 …ompiledCodeBridge`'s boundary stack frame is necessary to link the interpreter's frame with the co…
236 n c +----------------+ <- frame pointer
239 r f | frame |
247 The structure of boundary frame is the same as a stack frame of compiled code.
248 Instead of pointer to `panda::Method` the frame contains constant `INTERPRETER_TO_COMPILED_CODE_BRI…
249 Frame pointer points to the previous interpreter frame.
254 * Change stack frame kind in `panda::ManagedThread::stack_frame_kind_` to interpreter stack frame.
255 * Creates a boundary stack frame which contains room for interpreter frame.
256 * Fill in the interpreter frame by the arguments passed to `CompiledCodeToInterpreterBridge` in the…
259 * Drop the boundary stack frame.
260 * Change stack frame kind in `panda::ManagedThread::stack_frame_kind_` back to compiled code stack …
262 …InterpreterBridge`'s boundary stack frame is necessary to link the compiled code's frame with the …
266 s | interpreter's | -+ `panda::Frame::prev_`
267 b t | frame | |
268 o a +----------------+ <+ frame pointer
269 u c | frame pointer |
281 The structure of boundary frame is the same as a stack frame of compiled code.
282 Instead of a pointer to `panda::Method` the frame contains constant `COMPILED_CODE_TO_INTERPRETER_B…
283 Frame pointer points to the previous frame in compiled code stack frame.
284 The field `panda::Frame::prev_` must point to the boundary frame pointer.
288 Stack unwinding always starts from the top frame. Its kind could be determined from `panda::Managed…
289 to the top frame could be determined depends on the kind of the top stack frame:
290 * The top stack frame is an interpreter stack frame. Address of the interpreter's frame could be re…
291 * The top stack frame is a compiled code stack frame. `frame pointer` register contains the address…
293 Having a pointer to the top stack frame, its kind and structure the runtime can move to the next fr…
294 Moving to the next frame is done according to the table below:
296 | Kind of the current stack frame | How to get a pointer to the next stack frame | Kind of the prev…
298 …ter stack frame | Read `panda::Frame::prev_` field | Interpreter stack frame o…
299 …ILED_CODE_BRIDGE boundary stack frame | Read `pointer to the interpreter frame` from the stack | I…
300 …ODE_TO_INTERPRETER_BRIDGE boundary stack frame | Read `frame pointer` from the stack | Compiled co…
301 … Compiled code stack frame | Read `frame pointer` | Compiled code stack frame or INTERPRETER_TO_CO…
303 …raverse all the managed stack frames moving from one frame to the previous frame and changing fram…
308 during handling a compiled code stack frame it uses meta information generated by the compiler (See…
309 … any callee-saved registers on the stack. Before moving to the next stack frame the runtime must r…
325 E | native frame |
332 u t | stack frame | |
334 d c | frame pointer | -+
347 r | frame pointer | -+
357 r f | frame | |
363 E | native frame | |
372 | frame |
377 … of the top stack frame by reading `panda::ManagedThread::stack_frame_kind_` (the top stack frame …
378 …nagedThread::GetCurrentFrame()` method must return the pointer to `baz`'s interpreter stack frame.
379 …previous frame the runtime reads the field `panda::Frame::prev_` which must point to `COMPILED_COD…
380 …at to get `bar`'s stack frame the runtime must read `frame pointer` and the kind of the next frame…
381 …ntime has a pointer to `bar`'s compiled code stack frame. To go to the next frame runtime reads `f…
382 …DE_BRIDGE` boundary stack frame. To reach `foo`'s interpreter stack frame the runtime reads `point…
387 The function reconstructs the interpreter stack frame and calls the interpreter.
388 …functions (inlined functions) `Deoptimize` reconstructs interpreter stack frame and calls the inte…
396 …rames to find the corresponding exception handler by going from one stack frame to the previous an…
398 If the corresponding catch handler is found in the current stack frame the runtime jumps to the han…
400 If a INTERPRETER_TO_COMPILED_CODE_BRIDGE boundary stack frame is reached the runtime returns to the…
402 …e the return address to the boundary frame. The return address is stored in the following compiled…
403 2. Set the pointer to the boundary frame into stack pointer, assign the return address determined a…
405 …h handler in the current frame then the runtime restores values of callee-saved registers and move…
409 Finding a catch handler in a compiled code stack frame is performed according meta information gene…