Discussion
Loading...

Discussion

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Leonard Ritter
@lritter@mastodon.gamedev.place  ·  activity timestamp 3 weeks ago

the first test succeeds, but i have early typechecking in the parser that needs to be put into a second pass.

too late for that today, more tomorrow.

#devlog #LRDL

*** execution plan:
test_inline.lrdl:11:1: case
|   then a 67:f32
|   then a 68:f32
|   then a 69:f32
|   then a 70:f32
|   then a 71:f32
set a f32
test_inline.lrdl:13:1: case
|   a x%0
|   merge
|   |   test_inline.lrdl:5:1: case
|   |   |   sub_f32_f32 x%0 69:f32 %1
|   |   |   div_f32_f32 %1 12:f32 %2
|   |   |   powf 2:f32 %2 %3
|   |   |   mul_f32_f32 440:f32 %3 %4
|   then z %4
set z f32

*** z
 391.995
 415.305
 440
 466.164
 493.883
*** execution plan: test_inline.lrdl:11:1: case | then a 67:f32 | then a 68:f32 | then a 69:f32 | then a 70:f32 | then a 71:f32 set a f32 test_inline.lrdl:13:1: case | a x%0 | merge | | test_inline.lrdl:5:1: case | | | sub_f32_f32 x%0 69:f32 %1 | | | div_f32_f32 %1 12:f32 %2 | | | powf 2:f32 %2 %3 | | | mul_f32_f32 440:f32 %3 %4 | then z %4 set z f32 *** z 391.995 415.305 440 466.164 493.883
*** execution plan: test_inline.lrdl:11:1: case | then a 67:f32 | then a 68:f32 | then a 69:f32 | then a 70:f32 | then a 71:f32 set a f32 test_inline.lrdl:13:1: case | a x%0 | merge | | test_inline.lrdl:5:1: case | | | sub_f32_f32 x%0 69:f32 %1 | | | div_f32_f32 %1 12:f32 %2 | | | powf 2:f32 %2 %3 | | | mul_f32_f32 440:f32 %3 %4 | then z %4 set z f32 *** z 391.995 415.305 440 466.164 493.883

extern powf f32 f32 -> f32

inline mtof f32 f32
case
    then mtof m (mul 440.0 (powf 2.0 (div (sub m 69.0) 12.0)))

set a f32
set z f32

then a :: 67.0 68.0 69.0 70.0 71.0

case
    a x
    then z (mtof x)

dump z
extern powf f32 f32 -> f32 inline mtof f32 f32 case then mtof m (mul 440.0 (powf 2.0 (div (sub m 69.0) 12.0))) set a f32 set z f32 then a :: 67.0 68.0 69.0 70.0 71.0 case a x then z (mtof x) dump z
extern powf f32 f32 -> f32 inline mtof f32 f32 case then mtof m (mul 440.0 (powf 2.0 (div (sub m 69.0) 12.0))) set a f32 set z f32 then a :: 67.0 68.0 69.0 70.0 71.0 case a x then z (mtof x) dump z
  • Copy link
  • Flag this post
  • Block
Leonard Ritter
@lritter@mastodon.gamedev.place replied  ·  activity timestamp 3 weeks ago

this turned into a bigger refactor. the parser needs to work without knowing anything about types, and that's presently not true. it's not impossible to change, but - requires a lot of furniture rearrangement.

#devlog #LRDL

  • Copy link
  • Flag this comment
  • Block
Leonard Ritter
@lritter@mastodon.gamedev.place replied  ·  activity timestamp 3 weeks ago

only just managed to get the parser to work again. now the typechecking begins.

#devlog #LRDL

  • Copy link
  • Flag this comment
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.1-alpha.8 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login