Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /branches/vis12/src/compiler/c-util/world.sml
ViewVC logotype

View of /branches/vis12/src/compiler/c-util/world.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1850 - (download) (annotate)
Mon Apr 16 22:11:09 2012 UTC (7 years, 4 months ago) by jhr
File size: 1043 byte(s)
  cleanup some FIXMEs
(* 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

  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.charPtr,			"err"),
            (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)

  end

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