• Home
  • Raw
  • Download

Lines Matching full:code

1 # Interaction of compiled code and the runtime
5 Compiled code and Panda runtime interact with each other during execution. This document describes …
8 * Structure of compiled code stack frames and stack traversing
9 * Transition from the interpreter to compiled code and vice versa
15 Panda runtime is a set of functions used to execute managed code. The runtime consists of several m…
21 The compiler translates bytecodes of managed functions to native code. The compiler provides
23 its entrypoint to the native code generated. When the function is called next time, the native code
26 Panda runtime and managed code must call functions according to the target calling convention.
27 Compiled code of a managed function must accept one extra argument: the pointer to `panda::Method` …
32 When the compiler generates native code for this function for ARM target it must consider that
41 `panda::ManagedThread` has the following fields that compiled code may use:
48 | stack_frame_kind_ | StackFrameKind | A kind of the current stack frame (compiled code o…
50 ## Access to `panda::ManagedThread` from compiled code
55 Runtime serves compiled code via runtime entrypoints. A runtime entrypoint is a function which conf…
74 Entrypoint is a pointer to native code which can execute the function. This code must conform to th…
76 The managed function may have compiled code or be executed by the interpreter.
77 If the function has compiled code the `compiled_entry_point_` must point to compiled code.
82 …es. But all the frames of managed code must have the structure described in [Compiled code stack f…
88 ### Compiled code stack frame
92 When compiled code is being executed the `stack pointer` register must point to a valid stack frame…
100 Compiled code stack frames of caller and callee must be continuous in the stack i.e. the callee's s…
102 A compiled code stack frame must have the following structure:
144 ## Calling a function from compiled code
145 To call a managed function, the compiled code must resolve it (i.e. retrieve a pointer to callee's …
150 Calling `int max(int a, int b)` function from compiled code on ARM architecture with arguments `2` …
169 ## Calling a function from compiled code: Bridge function
174 To do a runtime call from compiled code the compiler generates:
209 ## Transition from the interpreter to compiled code
219 * Changes stack frame kind in `panda::ManagedThread::stack_frame_kind_` to compiled code stack fram…
227 …s boundary stack frame is necessary to link the interpreter's frame with the compiled code's frame.
245 The structure of boundary frame is the same as a stack frame of compiled code.
249 ## Transition from compiled code to the interpreter
258 * Changes stack frame kind in `panda::ManagedThread::stack_frame_kind_` back to compiled code stack…
260 `CompiledCodeToInterpreterBridge`'s boundary stack frame is necessary to link the compiled code's f…
279 The structure of boundary frame is the same as a stack frame of compiled code.
281 Frame pointer points to the previous frame in compiled code stack frame.
285 …me. When the runtime examines a managed thread's stack, the thread cannot execute any managed code.
289 * If the top stack frame is a compiled code stack frame, `frame pointer` register contains the addr…
298 …TER_BRIDGE boundary stack frame | Read `frame pointer` from the stack | Compiled code stack frame |
299 | Compiled code stack frame | Read `frame pointer` | Compiled code stack frame or INTERPRETER_TO_CO…
305 * Compiled code could be combined from several managed functions (inlined functions). If the runtim…
306 during handling a compiled code stack frame, it uses meta information generated by the compiler.
307 * Compiled code may save any callee-saved registers on the stack. Before moving to the next stack f…
319 Functions `foo` and `baz` are executed by the interpreter and the function `bar` has compiled code.
378 …the runtime must read `frame pointer` and the kind of the next frame will be compiled code's frame.
379 At this step the runtime has a pointer to `bar`'s compiled code stack frame. To go to the next fram…
383 There may be a situation when compiled code cannot continue execution for some reason.
384 …iled code must call `void Deoptimize()` runtime entrypoint to continue execution of the method in …
386 When compiled code is combined from several managed functions (inlined functions) `Deoptimize` reco…
390 Throwing an exception from compiled code is performed by calling the runtime entrypoint `void Throw…
394 * Unwinds compiled code stack frames to find the corresponding exception handler by going from one …
400 …ess to the boundary frame. The return address is stored in the following compiled code stack frame.
407 Finding a catch handler in a compiled code stack frame is performed according meta information gene…