SCM Repository
View of /branches/lamont/src/compiler/c-util/world.sml
Parent Directory
|
Revision Log
Revision 2081 -
(download)
(annotate)
Mon Nov 5 23:26:06 2012 UTC (8 years, 3 months ago) by lamonts
File size: 1257 byte(s)
Mon Nov 5 23:26:06 2012 UTC (8 years, 3 months ago) by lamonts
File size: 1257 byte(s)
Creating new developmented branch based on vis12
(* world.sml * * COPYRIGHT (c) 2012 The Diderot Project (http://diderot-language.cs.uchicago.edu) * All rights reserved. *) structure World : sig (* create the declaration for the world type *) val genStruct : TargetUtil.target_desc * (CLang.ty * string) list -> CLang.decl (* generate code to register an error message *) val errorMsgAdd : CLang.exp -> CLang.stm end = struct structure CL = CLang (* WORLD_STRUCT_PREFIX componenets (see Diderot/world.h) *) val prefix = [ (CL.T_Ptr(CL.T_Named "const char"), "name"), (CL.T_Ptr(CL.T_Named "biffMsg"), "errors"), (CL.boolTy, "verboseFlg"), (CL.boolTy, "isArray"), (CL.uint32, "nStrandTys"), (CL.T_Ptr(CL.T_Named "Strand_t"), "strandDesc"), (CL.uint32, "nAxes"), (CL.T_Ptr CL.uint32, "base"), (CL.T_Ptr CL.uint32, "size"), (CL.uint32, "numStrands") ] fun genStruct (tgt : TargetUtil.target_desc, tgtFields) = CL.D_StructDef( SOME(#namespace tgt ^ "struct_world"), prefix @ tgtFields, NONE) fun errorMsgAdd msg = CL.mkCall("biffMsgAdd", [CL.mkIndirect(CL.mkVar "wrld", "errors"), msg]) end
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |