Lines Matching full:code
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
17 Panda runtime as a set of functions aimed to execute managed code. The runtime consists of several …
23 The compiler is aimed to translate managed function's bytecode to native code. The compiler has an …
25 changes its entrypoint to newly generated code. Next time when the function gets called native code…
28 Panda runtime and managed code must call functions according to the target calling convention.
29 Compiled code of a managed function must accept one extra argumnent: the pointer to `panda::Method`…
34 When the compiler generates native code for this function for ARM target it must consider that
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
57 Runtime serves compiled code via runtime entrypoints. A runtime entrypoint is a function which conf…
76 Entrypoint is a pointer to native code which can execute the function. This code must conform to th…
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 …es. But all the frames of managed code must have the structure described in [Compiled code stack f…
90 ### Compiled code stack frame
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.
287 …. When the runtime examinates a managed thread's stack the thread mustn't execute any managed code.
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…
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 …iled code must call `void Deoptimize()` runtime entrypoint to continue execution of the method in …
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 …s 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…