SCM Repository
[diderot] Diff of /branches/lamont/src/compiler/c-util/world.sml
Diff of /branches/lamont/src/compiler/c-util/world.sml
Parent Directory
|
Revision Log
|
Patch
9 |
(* create the declaration for the world type *) |
(* create the declaration for the world type *) |
10 |
val genStruct : TargetUtil.target_desc * (CLang.ty * string) list -> CLang.decl |
val genStruct : TargetUtil.target_desc * (CLang.ty * string) list -> CLang.decl |
11 |
|
|
12 |
|
(* generate code to register an error message *) |
13 |
|
val errorMsgAdd : CLang.exp -> CLang.stm |
14 |
|
|
15 |
end = struct |
end = struct |
16 |
|
|
17 |
structure CL = CLang |
structure CL = CLang |
19 |
(* WORLD_STRUCT_PREFIX componenets (see Diderot/world.h) *) |
(* WORLD_STRUCT_PREFIX componenets (see Diderot/world.h) *) |
20 |
val prefix = [ |
val prefix = [ |
21 |
(CL.T_Ptr(CL.T_Named "const char"), "name"), |
(CL.T_Ptr(CL.T_Named "const char"), "name"), |
22 |
(CL.charPtr, "err"), |
(CL.T_Ptr(CL.T_Named "biffMsg"), "errors"), |
23 |
(CL.boolTy, "verboseFlg"), |
(CL.boolTy, "verboseFlg"), |
24 |
(CL.boolTy, "isArray"), |
(CL.boolTy, "isArray"), |
25 |
(CL.uint32, "nStrandTys"), |
(CL.uint32, "nStrandTys"), |
35 |
prefix @ tgtFields, |
prefix @ tgtFields, |
36 |
NONE) |
NONE) |
37 |
|
|
38 |
|
fun errorMsgAdd msg = |
39 |
|
CL.mkCall("biffMsgAdd", [CL.mkIndirect(CL.mkVar "wrld", "errors"), msg]) |
40 |
|
|
41 |
end |
end |
|
Legend:
Removed from v.1850 |
|
changed lines |
|
Added in v.2049 |
|
|