[fine] Simplify function compilation
This is simpler because we don't "discover" functions to compile as we go, we just compile all the ones we can find, and functions have pre-defined exports. This is good and useful to us as we can now refer to functions in different modules by known indices, but it *does* make me wonder what we're going to do for compiling generic specializations. The previous technique was better for that sort of thing. This is all predicated on the idea that I want to have partially-compiled modules, which I can't really say why I want it. If I'm happy to just compile things cross module in the same kind of space then it's much easier to go back to the function key way of working.
This commit is contained in:
parent
4c061fbd28
commit
ab477cd783
14 changed files with 190 additions and 214 deletions
|
|
@ -58,11 +58,6 @@ fun test() -> f64 {
|
|||
// | RightBrace:'"}"'
|
||||
//
|
||||
// @compiles-to:
|
||||
// | function << module >> (0 args, 0 locals):
|
||||
// | strings (0):
|
||||
// | code (2):
|
||||
// | 0: PushNothing
|
||||
// | 1: Return
|
||||
// | function test (0 args, 0 locals):
|
||||
// | strings (1):
|
||||
// | 0: "discarded"
|
||||
|
|
@ -75,5 +70,10 @@ fun test() -> f64 {
|
|||
// | 5: Jump(7)
|
||||
// | 6: PushFloat(45.0)
|
||||
// | 7: Return
|
||||
// | function << module >> (0 args, 0 locals):
|
||||
// | strings (0):
|
||||
// | code (2):
|
||||
// | 0: PushNothing
|
||||
// | 1: Return
|
||||
// |
|
||||
// @eval: Float(23.0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue