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

SCM Repository

[smlnj] Annotation of /sml/branches/SMLNJ/src/compiler/TopLevel/main/compbasic.sml
ViewVC logotype

Annotation of /sml/branches/SMLNJ/src/compiler/TopLevel/main/compbasic.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 93 - (view) (download)

1 : monnier 16 (* COPYRIGHT (c) 1996 Bell Laboratories *)
2 :     (* compbasic.sml *)
3 :    
4 :     structure CompBasic : COMPBASIC =
5 :     struct
6 :    
7 :     type source = Source.inputSource
8 :     type ast = Ast.dec
9 :     type absyn = Absyn.dec
10 :     type flint = FLINT.prog
11 :     type csegments = {c0 : Word8Vector.vector,
12 :     cn : Word8Vector.vector list,
13 :     name : string option ref}
14 :     type object = Unsafe.Object.object
15 :     type executable = object Vector.vector -> object
16 :    
17 :     type compInfo = {mkStamp: unit -> Stamps.stamp,
18 :     mkLvar: Symbol.symbol option -> Access.lvar,
19 :     coreEnv: StaticEnv.staticEnv,
20 :     anyErrors: bool ref,
21 :     error: ErrorMsg.errorFn,
22 :     errorMatch: SourceMap.region -> string,
23 :     transform: absyn -> absyn,
24 :     sourceName : string}
25 :    
26 :     fun mkCompInfo(source: source, coreEnv: StaticEnv.staticEnv,
27 :     transform : absyn -> absyn,
28 :     mkMkStamp : unit -> (unit -> Stamps.stamp)) : compInfo =
29 :     let val {error,errorMatch,anyErrors} = ErrorMsg.errors source
30 :     val _ = LambdaVar.clear()
31 :     in {mkStamp = mkMkStamp(),
32 :     mkLvar = (fn NONE => LambdaVar.mkLvar ()
33 :     | SOME sym => LambdaVar.namedLvar sym),
34 :     error = error,
35 :     errorMatch = errorMatch,
36 :     anyErrors = anyErrors,
37 :     coreEnv = coreEnv,
38 :     transform = transform,
39 :     sourceName = #fileOpened source}
40 :     end
41 :    
42 :     fun anyErrors ({anyErrors=ref b,...} : compInfo) = b
43 :    
44 :     end (* structure CompBasic *)
45 : monnier 93
46 :     (*
47 :     * $Log: compbasic.sml,v $
48 :     * Revision 1.1.1.1 1998/04/08 18:39:15 george
49 :     * Version 110.5
50 :     *
51 :     *)

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