Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/low-to-tree/low-to-tree.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/low-to-tree/low-to-tree.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3861, Sun May 15 14:33:03 2016 UTC revision 3862, Sun May 15 15:44:30 2016 UTC
# Line 371  Line 371 
371                        (* take arguments from args to build a vector value of width w; pad as                        (* take arguments from args to build a vector value of width w; pad as
372                         * necessary.                         * necessary.
373                         *)                         *)
374                          fun take (0, args, es) = T.E_Vec(List.rev es) :: mkVecs (args, ws)                          fun take (0, args, es) = T.E_Vec(w, List.rev es) :: mkVecs (args, ws)
375                            | take (i, [], es) = if #padded layout andalso null ws                            | take (i, [], es) = if #padded layout andalso null ws
376                                then let                                then [T.E_Vec(w, List.rev es)]
                                 val zero = T.E_Lit(Literal.Real(RealLit.zero false))  
                                 in  
                                   [T.E_Vec(List.rev(List.tabulate(i, fn _ => zero)))]  
                                 end  
377                                else raise Fail "too few arguments for CONS"                                else raise Fail "too few arguments for CONS"
378                            | take (i, arg::args, es) = take (i-1, args, scalarArg env arg :: es)                            | take (i, arg::args, es) = take (i-1, args, scalarArg env arg :: es)
379                          in                          in

Legend:
Removed from v.3861  
changed lines
  Added in v.3862

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0