Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/branches/primop-branch-3/compiler/Elaborator/elaborate/elabmod.sml
ViewVC logotype

Diff of /sml/branches/primop-branch-3/compiler/Elaborator/elaborate/elabmod.sml

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

revision 2407, Fri Apr 13 04:27:56 2007 UTC revision 2408, Mon Apr 16 06:10:46 2007 UTC
# Line 326  Line 326 
326   *                                                                         *   *                                                                         *
327   * Recompute all the dynamic accesses in an environment, suppress doubles  *   * Recompute all the dynamic accesses in an environment, suppress doubles  *
328   * and allocate slots. Components are ordered so that slot allocation is   *   * and allocate slots. Components are ordered so that slot allocation is   *
329   * independant from the way elaboration is done.                           *   * independent from the way elaboration is done.                           *
330   *                                                                         *   *                                                                         *
331   * Should use Env.fold or Env.map?                                         *   * Should use Env.fold or Env.map?                                         *
332   *                                                                         *   *                                                                         *
# Line 472  Line 472 
472                end                end
473    
474            | _ => (elements, entEnv, entDecl, trans, slotCount, fctflag)            | _ => (elements, entEnv, entDecl, trans, slotCount, fctflag)
475                     (* [GK 4/15/07] This consolidate is somehow
476          val binders = SE.sort (SE.consolidate env)                      messing the elements order ... it is supposed
477                        to just eliminate EMPTY bindings.
478                        SE.foldOverElems seems to fix this problem. We can
479                        now compute the elements (specs) in the correct
480                        order on the consolidated list. *)
481            val envSymInOrder = SE.symbols env
482            val cenv = SE.consolidate env
483          val (elements, entEnv, entDecl, trans, _, fctflag) =          val (elements, entEnv, entDecl, trans, _, fctflag) =
484            List.foldl transBind (nil, EE.empty, [], [], 0, false) binders            SE.foldOverElems(transBind,(nil, EE.empty, [], [], 0, false),cenv,
485                               envSymInOrder)
486       in (rev elements, entEnv, rev entDecl, rev trans, fctflag)       in (rev elements, entEnv, rev entDecl, rev trans, fctflag)
487      end      end
488    
# Line 592  Line 598 
598              in M.STR {sign=sign, rlzn=strRlzn, access=dacc,              in M.STR {sign=sign, rlzn=strRlzn, access=dacc,
599                        prim=prim}                        prim=prim}
600              end              end
601              val _ = debugPrint("BaseStr after resStr  - symbols: ", ED.ppSymList,
602                                 ED.envSymbols env')
603            val resDec =            val resDec =
604              let val body = A.LETstr(absDecl, A.STRstr(locations))              let val body = A.LETstr(absDecl, A.STRstr(locations))
605               in A.STRdec [A.STRB {name=tempStrId, str=resStr, def=body}]               in A.STRdec [A.STRB {name=tempStrId, str=resStr, def=body}]

Legend:
Removed from v.2407  
changed lines
  Added in v.2408

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