SCM Repository
[diderot] Diff of /branches/pure-cfg/src/compiler/mid-to-low/mid-to-low.sml
Diff of /branches/pure-cfg/src/compiler/mid-to-low/mid-to-low.sml
Parent Directory
|
Revision Log
|
Patch
159 |
in |
in |
160 |
(m', stms) |
(m', stms) |
161 |
end |
end |
162 |
val evalCode = let |
val evalCode = (case coeffs |
163 |
val a0::r = coeffs |
of [a0] => (* constant function *) |
164 |
|
[(result, DstIL.VAR a0)] |
165 |
|
| a0::r => let |
166 |
val (m, stms) = eval (1, r) |
val (m, stms) = eval (1, r) |
167 |
in |
in |
168 |
List.rev ((result, DstIL.OP(DstOp.Add ty, [a0, m]))::stms) |
List.rev ((result, DstIL.OP(DstOp.Add ty, [a0, m]))::stms) |
169 |
end |
end |
170 |
|
(* end case *)) |
171 |
in |
in |
172 |
coeffVecs @ evalCode |
coeffVecs @ evalCode |
173 |
end |
end |
|
Legend:
Removed from v.744 |
|
changed lines |
|
Added in v.745 |
|
|