-
Notifications
You must be signed in to change notification settings - Fork 701
Description
Pending #520, the binary format should be updated to match the design.
The difference between the current format and AstSemantics.md is as follows:
In the binary format, there is a single function declaration table with a single index space for functions, including imported functions. An entry in this table can be either: named or unnamed, either: an imported function or a defined function, either: exported or not exported.
Consequences of this:
call_functioncan index both imported and defined functions.- imported functions can appear in the indirect function table.
- imported functions can be immediately re-exported
In the AstSemantics.md, there are imported functions and defined functions. The two index spaces are separate and there are separate call_function and call_import operators.
Consequences of this:
call_functionandcall_importindex separate tables.- imports cannot appear in the indirect function table.
- imported functions cannot be immediately re-exported
So this issue proposes updating the binary format to match the AstSemantics, introducing an import table and an export table. If there aren't any strong objections I will start working on implementing it and wait to describe it when we make more progress on #520.