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/trunk/src/cm/main/symval.sml
ViewVC logotype

Diff of /sml/trunk/src/cm/main/symval.sml

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

revision 353, Thu Jun 24 09:43:28 1999 UTC revision 386, Thu Jul 22 07:35:50 1999 UTC
# Line 13  Line 13 
13      val empty : env      val empty : env
14    
15      val default : { arch: string,      val default : { arch: string,
                     extra_arch: string option,  
16                      big: bool,                      big: bool,
17                      size: int,                      size: int,
18                      os: SMLofNJ.SysInfo.os_kind,                      os: SMLofNJ.SysInfo.os_kind,
# Line 29  Line 28 
28    
29      val empty = StringMap.empty      val empty = StringMap.empty
30    
31      fun default { arch, extra_arch, big, size, os, version } = let      fun default { arch, big, size, os, version } = let
32          fun mk_arch_sym a = "ARCH_" ^ a          val arch_sym = "ARCH_" ^ arch
         val arch_sym = mk_arch_sym arch  
33          val endian_sym = if big then "BIG_ENDIAN" else "LITTLE_ENDIAN"          val endian_sym = if big then "BIG_ENDIAN" else "LITTLE_ENDIAN"
34          val size_sym = "SIZE_" ^ Int.toString size          val size_sym = "SIZE_" ^ Int.toString size
35          val os_sym = case os of          val os_sym = case os of
# Line 48  Line 46 
46          val major_sym = "SMLNJ_VERSION"          val major_sym = "SMLNJ_VERSION"
47          val minor_sym = "SMLNJ_MINOR_VERSION"          val minor_sym = "SMLNJ_MINOR_VERSION"
48    
49          val almost_alldefs = [(arch_sym, 1),          val alldefs = [(arch_sym, 1),
50                                (endian_sym, 1),                                (endian_sym, 1),
51                                (size_sym, 1),                                (size_sym, 1),
52                                (os_sym, 1),                                (os_sym, 1),
53                                (major_sym, major),                                (major_sym, major),
54                                (minor_sym, minor),                                (minor_sym, minor),
55                                ("NEW_CM", 1)]                                ("NEW_CM", 1)]
   
         val alldefs =  
             case extra_arch of  
                 NONE => almost_alldefs  
               | SOME a => (mk_arch_sym a, 1) :: almost_alldefs  
56      in      in
57          foldl StringMap.insert' empty alldefs          foldl StringMap.insert' empty alldefs
58      end      end

Legend:
Removed from v.353  
changed lines
  Added in v.386

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