We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b88ccc4 + a5634ab commit a916f86Copy full SHA for a916f86
source/backends/lua.d
@@ -912,10 +912,9 @@ class BackendLua : CompilerBackend {
912
scopeSize += var.Size();
913
914
if (var.type.hasDeinit) {
915
- output ~= format("lea rax, [rsp + %d\n]", var.offset);
916
- output ~= "mov [r15], rax\n";
917
- output ~= "add r15, 8\n";
918
- output ~= format("call __type_deinit_%s\n", Sanitise(var.type.name));
+ output ~= format("mem[dsp] = vsp + %d\n", var.offset);
+ output ~= "dsp = dsp + 1\n";
+ output ~= format("type_deinit_%s()\n", var.type.name.Sanitise());
919
}
920
921
output ~= format("vsp = vsp + %d\n", scopeSize);
0 commit comments