• Home
  • Raw
  • Download

Lines Matching full:function

22 `panda::CompilerInterface::CompileMethodSync` for compilation. When a function is compiled, the com…
23 its entrypoint to the native code generated. When the function is called next time, the native code…
27 …ompiled code of a managed function must accept one extra argument: the pointer to `panda::Method` …
31 Consider a function int max(int a, int b).
32 When the compiler generates native code for this function for ARM target it must consider that
33 the function accepts 3 arguments:
38 The function must return the result in the register R0.
52 must contain a valid pointer to `panda::ManagedThread` on entry to each compiled function.
55 Runtime serves compiled code via runtime entrypoints. A runtime entrypoint is a function which conf…
59 `panda::Method` describes a managed function in the runtime.
64 | hotness_counter_ | A hotness counter of the managed function. |
65 | compiled_entry_point_ | Function entrypoint. |
68 …ness_counter_` reflects hotness of a managed function. The interpreter increments it each time the…
70 …unter gets saturated (reaches the threshold), the interpreter triggers compilation of the function.
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.
78 If the function is executed by the interpreter, the `compiled_entry_point_` must point to a runtime…
81 A stack frame contains data necessary to execute the function the frame belongs to.
89 Each compiled function is responsible for reserving stack frame for its purpose and then release it…
90 Generally compiled function builds the stack frame in prolog and releases it in epilog. If a compil…
98 …tack pointer` and `frame pointer` registers to the value they have at the moment of function entry.
131 - data - arbitrary data necessary for function execution. It is optional.
133 - `panda::Method*` - pointer to `panda::Method`, which describes the called function.
134 … to the previous frame. The value of `frame pointer` is registered at the moment of function entry.
135 - return address - address to which control will be transferred after the function gets returned.
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 …
147 Resolving of a function could be done by calling the corresponding runtime entrypoint.
150 Calling `int max(int a, int b)` function from compiled code on ARM architecture with arguments `2` …
156 mov r1, MAX_INT_INT_ID // MAX_INT_INT_ID - identifier of int max(int, int) function
159 // r0 contains a pointer to `panda::Method` which describes `int max(int, int)` function.
164 // Step 3: Call the function
166 // r0 contains the function result
169 ## Calling a function from compiled code: Bridge function
170 The compiler has an entrypoints table. Each entrypoint contains a link to the bridge function.
171 The bridge function is auto-generated for each runtime function to be called using the macro assemb…
172 The bridge function sets up the Boundary Frame and performs the call to the actual runtime function.
176 * (callee saved registers goes to bridge function stack frame, and caller saved registers goes to t…
178 * Loads bridge function address and branch instruction.
181 The bridge function does the following:
182 * Setups the bridge function stack frame.
183 * Pushes the caller saved registers (except of registers holding function parameters) to the caller…
184 * Adjusts the Stack Pointer, and pass execution to the runtime function.
187 Bridge function stack frame:
213 …her cases, the interpreter calls the function `InterpreterToCompiledCodeBridge` to pass the resolv…
216 `InterpreterToCompiledCodeBridge` function does the following:
220 * Prepares the arguments according to the target calling convention. The function uses the bytecode…
221 and interpreter's frame to retrieve the function's arguments.
250 If a function needs be executed by the interpreter, it must have `CompiledCodeToInterpreterBridge` …
319 Functions `foo` and `baz` are executed by the interpreter and the function `bar` has compiled code.
385 The function reconstructs the interpreter stack frame and calls the interpreter.
386 …mize` reconstructs interpreter stack frame and calls the interpreter for each inlined function too.
391 The function `ThrowException` does the following: