Lines Matching full:function
23 …compiler is aimed to translate managed function's bytecode to native code. The compiler has an int…
24 `panda::CompilerInterface::CompileMethodSync` which starts compilation. When the function gets comp…
25 changes its entrypoint to newly generated code. Next time when the function gets called native code…
29 …mpiled code of a managed function must accept one extra argumnent: the pointer to `panda::Method` …
33 Consider a function int max(int a, int b).
34 When the compiler generates native code for this function for ARM target it must consider that
35 the function accepts 3 arguments:
40 The function must return the result in the register R0.
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…
61 `panda::Method` describes a managed function in the runtime.
66 | hotness_counter_ | A hotness counter of the managed function. |
67 | compiled_entry_point_ | Function entrypoint. |
70 …ness_counter_` reflects hotness of a managed function. The interpreter increments it each time the…
72 …ounter gets saturated (reaches the threshold) the interpreter triggers compilation of the function.
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.…
80 In the case the function is executed by the interpreter the `compiled_entry_point_` must point to a…
83 A stack frame contains data necessary to execute the function the frame belongs to.
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…
100 …tack pointer` and `frame pointer` registers to the value they have at the moment of function entry.
133 - data - arbitraty data necessary for function execution. May be omited.
135 - `panda::Method*` - a pointer to `panda::Method` which describes the called function.
136 …ter to the previous frame. The value of `frame pointer` register at the moment of function entry.
137 - return address - address to which control will be transfered after the function gets returned.
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…
149 Resolving of a function could be done by calling the corresponding runtime entrypoint.
152 Calling `int max(int a, int b)` function from compiled code on ARM architecture with arguments `2` …
158 mov r1, MAX_INT_INT_ID // MAX_INT_INT_ID - identifier of int max(int, int) function
161 // r0 contains a pointer to `panada::Method` which describes `int max(int, int)` function.
166 // 3rd step: call the function
168 // r0 contains the function result
171 ## Calling a function from compiled code: Bridge function
172 The Compiler have an entrypoints table. Each entrypoint contains a link to the Bridge Function.
173 The Bridge Functions are auto-generated for each runtime function to be called using the macro asse…
174 The Bridge Function sets up the Boundary Frame and performs the call to the actual runtime function.
178 * (callee saved regisers goes to Bridge Function stack frame, caller saved registers goes to the cu…
180 * Bridge Function address load and branch intruction
183 The bridge function does:
184 * setup the Bridge Function stack frame
185 * push the caller saved registers (except of registers holding function parameters) to the caller's…
186 * adjust Stack Pointer, and pass execution to the runtime function
189 Bridge Function stack frame:
215 …r cases the interpreter calls the function `InterpreterToCompiledCodeBridge` passing to it the res…
218 `InterpreterToCompiledCodeBridge` function does the following:
222 * Prepare the arguments according to the target calling convention. The function uses the bytecode …
223 and interpreter's frame to retreive the function's arguments.
252 If a function should be executed by the interpreter it must have `CompiledCodeToInterpreterBridge` …
321 Functions `foo` and `baz` are executed by the interpreter and the function `bar` has compiled code.
387 The function reconstructs the interpreter stack frame and calls the interpreter.
388 …ize` reconstructs interpreter stack frame and calls the interpreter for each inlined function too.
393 The function `ThrowException` does the following: