Inline subprimitives in optimizing compiler

db4
Slava Pestov 2008-11-03 01:18:54 -06:00
parent 44a2499c17
commit f253e74942
2 changed files with 4 additions and 2 deletions

View File

@ -22,7 +22,7 @@ M: ##stack-frame compute-stack-frame*
stack-frame>> stack-frame [ max-stack-frame ] change ;
M: ##call compute-stack-frame*
drop frame-required? on ;
word>> sub-primitive>> [ frame-required? on ] unless ;
M: _gc compute-stack-frame*
drop frame-required? on ;

View File

@ -82,7 +82,9 @@ M: ##inc-d generate-insn n>> %inc-d ;
M: ##inc-r generate-insn n>> %inc-r ;
M: ##call generate-insn word>> [ add-call ] [ %call ] bi ;
M: ##call generate-insn
word>> dup sub-primitive>>
[ first % ] [ [ add-call ] [ %call ] bi ] ?if ;
M: ##jump generate-insn word>> [ add-call ] [ %jump-label ] bi ;