@blackeggs@infosec.exchange
Not a compiler person but isn't the thing with the Virtual Stack of stack machine operands (VarStates) the same idea as "delayed code generation"?
https://piumarta.com/doc/dcg-1992.pdf
https://people.inf.ethz.ch/wirth/CompilerConstruction/CompilerConstruction2.pdf
https://www.reddit.com/r/ProgrammingLanguages/comments/lk4913/bytecode_for_a_register_machine/gnk5y4m/
@blackeggs@infosec.exchange
@pervognsen@mastodon.social Thought u might find this interesting. Not an expert but it kinda looks like V8's wasm compiler is using the "Delayed Code Generation" technique you've mentioned in the past? Been a while since I looked at this but see the section on the "virtual stack".
https://v8.dev/blog/liftoff
https://github.com/v8/v8/blob/70572dc5de0f6136b914b3093c14f445fae4a49a/src/wasm/baseline/liftoff-varstate.h#L15
https://github.com/v8/v8/blob/70572dc5de0f6136b914b3093c14f445fae4a49a/src/wasm/baseline/x64/liftoff-assembler-x64-inl.h#L134