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

SCM Repository

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

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

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

revision 3959, Mon Jun 13 14:54:10 2016 UTC revision 3963, Mon Jun 13 17:49:00 2016 UTC
# Line 281  Line 281 
281        | trMultiAssign (env, lhs, rhs) = raise Fail "bogus multi-assignment"        | trMultiAssign (env, lhs, rhs) = raise Fail "bogus multi-assignment"
282    
283      fun trPrintStm (outS, tys, args) = let      fun trPrintStm (outS, tys, args) = let
284            fun mkExp (lhs, [], []) = CL.mkBinOp(lhs, CL.#<<, CL.mkVar "std::end")            fun mkExp (lhs, [], []) = CL.mkBinOp(lhs, CL.#<<, CL.mkVar "std::flush")
285              | mkExp (lhs, ty::tys, e::es) = let              | mkExp (lhs, ty::tys, e::es) = let
286                (* if necessary, wrap the argument so that the correct "<<" instance is used *)                (* if necessary, wrap the argument so that the correct "<<" instance is used *)
287                  val e = (case ty                  val e = (case ty
# Line 373  Line 373 
373                    | IR.S_Print(tys, args) => let                    | IR.S_Print(tys, args) => let
374                        val args = List.map (fn e => trExp(env, e)) args                        val args = List.map (fn e => trExp(env, e)) args
375                        val stm = trPrintStm (                        val stm = trPrintStm (
376                              CL.mkIndirect(worldVar env, "_output"),                              CL.mkIndirectDispatch(worldVar env, "output", []),
377                              tys, args)                              tys, args)
378                        in                        in
379                          (env, stm::stms)                          (env, stm::stms)

Legend:
Removed from v.3959  
changed lines
  Added in v.3963

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