openllb / hlb

A developer-first language to build and test any software efficiently
https://openllb.github.io/hlb/
Apache License 2.0
109 stars 12 forks source link

Registers set via async chain of callbacks to unblock codegen #289

Closed hinshun closed 2 years ago

hinshun commented 2 years ago

BuiltinDecls no longer have access to the Register, but simply just get the current Value and must return (Value, error). This seems to be cleaner, since it doesn't really need to know about the Register.

(Register).Set still exists but only as syntactic sugar.

(Register).SetAsync is used explicitly when the value is only derived from a callback.

Should speed up any build using multiple images, and any future instruction that have asynchronous tasks (like codegen imports).

hinshun commented 2 years ago

Updated and squashed

aaronlehmann commented 2 years ago

Code LGTM; seems like there's a CI issue