• Home
  • Raw
  • Download

Lines Matching full:compiled

1 # Interaction of compiled code and the runtime
5 During execution compiled code and Panda runtime should interact with each other. This document des…
8 * The structure of compiled code stack frames and stack traversing
9 * Transition from the interpeter to compiled code and vise versa
24 …nterface::CompileMethodSync` which starts compilation. When the function gets compiled the compiler
29 Compiled code of a managed function must accept one extra argumnent: the pointer to `panda::Method`…
43 `panda::ManagedThread` has the following fields that compiled code may use:
50 | stack_frame_kind_ | StackFrameKind | A kind of the current stack frame (compiled code o…
52 ## Access to `panda::ManagedThread` from compiled code
54 must contains a valid pointer to `panda::ManagedThread` on entry to each compiled function.
57 Runtime serves compiled code via runtime entrypoints. A runtime entrypoint is a function which conf…
78 The managed function could have compiled code or it could be executed by the interpreter.
79 In the case the function has compiled code the `compiled_entry_point_` must point to compiled code.…
84 …mes of managed code must have the structure described in [Compiled code stack frame](#compiled-cod…
88 …ld `panda::Frame::prev_` contains a pointer to the previous interpreter (or compiled bridge) frame.
90 ### Compiled code stack frame
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…
94 When compiled code is executing the `stack pointer` register must point to a valid stack frame (new…
102 Compiled code stack frames of caller and callee must be continuous in the stack i.e. the callee's s…
104 A compiled code stack frame must have the following structure:
146 ## Calling a function from compiled code
147 To call a managed function compiled code must resolve it (i.e. retreive a pointer to callee's `pand…
152 Calling `int max(int a, int b)` function from compiled code on ARM architecture with arguments `2` …
171 ## Calling a function from compiled code: Bridge function
176 To do a runtime call from compiled code the Compiler generates:
211 ## Transition from the interpreter to compiled code
221 * Change stack frame kind in `panda::ManagedThread::stack_frame_kind_` to compiled code stack frame…
229 …boundary stack frame is necessary to link the interpreter's frame with the compiled code's frame.
247 The structure of boundary frame is the same as a stack frame of compiled code.
251 ## Transition from compiled code to the interpreter
260 * Change stack frame kind in `panda::ManagedThread::stack_frame_kind_` back to compiled code stack …
262 `CompiledCodeToInterpreterBridge`'s boundary stack frame is necessary to link the compiled code's f…
281 The structure of boundary frame is the same as a stack frame of compiled code.
283 Frame pointer points to the previous frame in compiled code stack frame.
291 * The top stack frame is a compiled code stack frame. `frame pointer` register contains the address…
300 …TER_BRIDGE boundary stack frame | Read `frame pointer` from the stack | Compiled code stack frame |
301 | Compiled code stack frame | Read `frame pointer` | Compiled code stack frame or INTERPRETER_TO_CO…
307 * Compiled code could be combined from several managed functions (inlined functions). If the runtim…
308 during handling a compiled code stack frame it uses meta information generated by the compiler (See…
309 * Compiled code may save any callee-saved registers on the stack. Before moving to the next stack f…
319 (interpreted) (compiled) (interpreted)
321 Functions `foo` and `baz` are executed by the interpreter and the function `bar` has compiled code.
380 …he runtime must read `frame pointer` and the kind of the next frame will be compiled code's frame.
381 At this step the runtime has a pointer to `bar`'s compiled code stack frame. To go to the next fram…
385 There is may be a situation when compiled code cannot continue execution for some reason.
386 …es compiled code must call `void Deoptimize()` runtime entrypoint to continue execution of the met…
388 When compiled code is combined from several managed functions (inlined functions) `Deoptimize` reco…
392 Throwing an exeption from compiled code is performed by calling a runtime entrypoint `void ThrowExc…
396 * Unwind compiled code stack frames to find the corresponding exception handler by going from one s…
402 …ss to the boundary frame. The return address is stored in the following compiled code stack frame.…
409 Finding a catch handler in a compiled code stack frame is performed according meta information gene…