aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
authorLuuk de Gram <luuk@degram.dev>2022-01-19 19:17:34 +0100
committerLuuk de Gram <luuk@degram.dev>2022-01-19 22:29:36 +0100
commitb9fe6a93ff51ecb5ce770c78f463c38a0620de49 (patch)
treea155cb583568eb2136dfb8fd42ff40b9c41245f1 /src/codegen
parent1fe1e4d29207de8c972fcc1b61266fbaddb07d63 (diff)
downloadzig-b9fe6a93ff51ecb5ce770c78f463c38a0620de49.tar.gz
zig-b9fe6a93ff51ecb5ce770c78f463c38a0620de49.zip
wasm: Re-use genTypedValue for constants
When a constant will be passed by reference, such as a struct, we will call into genTypedValue to lower the constant to bytes and store them into the `rodata` section. We will then return the address of this constant as a `WValue`. This change means we will have all constants lowered during compilation time, and no longer have to sacrifice runtime to lower them onto the stack.
Diffstat (limited to 'src/codegen')
0 files changed, 0 insertions, 0 deletions