- Integer local:
__HTLL_flocal_<func>_<var> - Array local:
__HTLL_flocal_<func>_<var>
- Integer local:
__HTLL_mlocal_<var> - Array local:
__HTLL_mlocal_<var>
- No mangling — keep original name.
- Replaced by global buffer:
__HTLL_param_<func>_<param>
- Array return: global buffer
__HTLL_ret_<func> - Integer return: stored in
rax(or a hidden global like__HTLL_ret_int_<func>)
- Before call: copy actual array arguments into
__HTLL_param_<func>_<param>. - After call: if the function returns an array, copy
__HTLL_ret_<func>into the target variable. - If function returns integer: move
raxinto the target variable.
-
No
mainkeyword → no mangling. Everything keeps its original name. Perfect for simple scripts or when you don't need functions. -
mainkeyword present → mangling applies. This happens when you define functions (since you needmainas the entry point). Locals inside functions, array parameters, return buffers — all get mangled to avoid collisions.
So the presence of main acts as a flag: "this program has structured functions, so we need name protection."