Re: Phix syntax
- Posted by petelomax Dec 22, 2020
- 836 views
irv said...
compiling itself fails:
True. Do this:
-- {integer maxp, integer minp, string sig} = get_routine_info(setfn) -- if maxp>=2 and minp<=2 and sig[1..2] = "PO" then call_proc(setfn,{s,v}) -- (this,v) return -- end if -- {integer maxp, integer minp, string sig} = get_routine_info(getfn) -- if maxp>=1 and minp<=1 and sig[1..2] = "FO" then return call_func(getfn,{s}) -- (this) -- end if
It will then trust to luck a bit, that you haven't given it a procedure get_field or a function set_field. Mind you, it'll crash if needed anyway.
I'll have to probably should figure out some way to turn that off during compilation (it's stomping on the symbol table!) but back on at runtime.
EDIT: I've now successfully disabled get_routine_info() during compilation, which needed removal of the long-broken instruction scheduler, which was about time and like 2000+ edits...