compiler.cfg.representations: emit-conversion should not be private since CSSA construction uses it

db4
Slava Pestov 2009-08-08 04:13:30 -05:00
parent 4b7ba38aab
commit 1bf8a0cac7
1 changed files with 8 additions and 8 deletions

View File

@ -17,6 +17,14 @@ IN: compiler.cfg.representations
! Virtual register representation selection. Predecessors and loops
! must be computed first.
: emit-conversion ( dst src dst-rep src-rep -- )
2array {
{ { int-rep int-rep } [ int-rep ##copy ] }
{ { double-float-rep double-float-rep } [ double-float-rep ##copy ] }
{ { double-float-rep int-rep } [ ##unbox-float ] }
{ { int-rep double-float-rep } [ int-rep next-vreg-rep ##box-float ] }
} case ;
<PRIVATE
! For every vreg, compute possible representations.
@ -86,14 +94,6 @@ SYMBOL: costs
! Insert conversions. This introduces new temporaries, so we need
! to rename opearands too.
: emit-conversion ( dst src dst-rep src-rep -- )
2array {
{ { int-rep int-rep } [ int-rep ##copy ] }
{ { double-float-rep double-float-rep } [ double-float-rep ##copy ] }
{ { double-float-rep int-rep } [ ##unbox-float ] }
{ { int-rep double-float-rep } [ int-rep next-vreg-rep ##box-float ] }
} case ;
:: emit-def-conversion ( dst preferred required -- new-dst' )
! If an instruction defines a register with representation 'required',
! but the register has preferred representation 'preferred', then