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/ml-nlffi-lib/c.sig
ViewVC logotype

Diff of /sml/trunk/src/ml-nlffi-lib/c.sig

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

revision 835, Wed May 23 18:30:31 2001 UTC revision 836, Fri May 25 19:28:51 2001 UTC
# Line 38  Line 38 
38    
39      (* things to be substituted for 't *)      (* things to be substituted for 't *)
40      type ('t, 'f, 'c) ptr               (* pointer to ('t, 'f, 'c) obj *)      type ('t, 'f, 'c) ptr               (* pointer to ('t, 'f, 'c) obj *)
41      type ('t, 'f, 'n) arr               (* 'n-sized array with 't elements *)      type ('t, 'n) arr                   (* 'n-sized array with 't elements *)
42    
43      (* light-weight alternative *)      (* light-weight alternative *)
44      type ('t, 'f, 'c) ptr'      type ('t, 'f, 'c) ptr'
# Line 276  Line 276 
276          (* constructing new RTI from existing RTI *)          (* constructing new RTI from existing RTI *)
277          val pointer : ('t, 'f) typ -> (('t, 'f, rw) ptr, 'f) typ          val pointer : ('t, 'f) typ -> (('t, 'f, rw) ptr, 'f) typ
278          val target  : (('t, 'f, 'c) ptr, 'f) typ -> ('t, 'f) typ          val target  : (('t, 'f, 'c) ptr, 'f) typ -> ('t, 'f) typ
279          val arr     : ('t, 'f) typ * 'n Dim.dim -> (('t, 'f, 'n) arr, 'f) typ          val arr     : ('t, 'f) typ * 'n Dim.dim -> (('t, 'n) arr, 'f) typ
280          val elem    : (('t, 'f, 'n) arr, 'f) typ -> ('t, 'f) typ          val elem    : (('t, 'n) arr, 'f) typ -> ('t, 'f) typ
281          val ro      : (('t, 'f, 'c) ptr, 'f) typ -> (('t, 'f, ro) ptr, 'f) typ          val ro      : (('t, 'f, 'c) ptr, 'f) typ -> (('t, 'f, ro) ptr, 'f) typ
282    
283          (* calculating the size of an object given its RTI *)          (* calculating the size of an object given its RTI *)
284          val sizeof : ('t, 'f) typ -> 't S.size          val sizeof : ('t, 'f) typ -> 't S.size
285    
286          (* dimension of array type *)          (* dimension of array type *)
287          val dim : (('t, 'f, 'n) arr, 'f) typ -> 'n Dim.dim          val dim : (('t, 'n) arr, 'f) typ -> 'n Dim.dim
288    
289          (* RTI for simple things *)          (* RTI for simple things *)
290          val schar  : schar_typ          val schar  : schar_typ
# Line 503  Line 503 
503           * since we have RTI, we can actually make this safe:  we raise           * since we have RTI, we can actually make this safe:  we raise
504           * General.Subscript for out-of-bounds access;           * General.Subscript for out-of-bounds access;
505           * for unchecked access, go through arr_decay and ptr_sub *)           * for unchecked access, go through arr_decay and ptr_sub *)
506          val sub : (('t, 'f, 'n) arr, 'f, 'c) obj * int -> ('t, 'f, 'c) obj          val sub : (('t, 'n) arr, 'f, 'c) obj * int -> ('t, 'f, 'c) obj
507    
508          (* alt; needs explicit type (for array) *)          (* alt; needs explicit type (for array) *)
509          val sub' : (('t, 'f, 'n) arr, 'f) T.typ ->          val sub' : (('t, 'n) arr, 'f) T.typ ->
510                     (('t, 'f, 'n) arr, 'f, 'c) obj' * int -> ('t, 'f, 'c) obj'                     (('t, 'n) arr, 'f, 'c) obj' * int -> ('t, 'f, 'c) obj'
511    
512          (* let an array object decay, yielding pointer to first element *)          (* let an array object decay, yielding pointer to first element *)
513          val decay : (('t, 'f, 'n) arr, 'f, 'c) obj -> ('t, 'f, 'c) ptr          val decay : (('t, 'n) arr, 'f, 'c) obj -> ('t, 'f, 'c) ptr
514    
515          (* alt *)          (* alt *)
516          val decay' : (('t, 'f, 'n) arr, 'f, 'c) obj' -> ('t, 'f, 'c) ptr'          val decay' : (('t, 'n) arr, 'f, 'c) obj' -> ('t, 'f, 'c) ptr'
517    
518          (* reconstruct an array object from the pointer to its first element *)          (* reconstruct an array object from the pointer to its first element *)
519          val reconstruct :          val reconstruct :
520              ('t, 'f, 'c) ptr * 'n Dim.dim -> (('t, 'f, 'n) arr, 'f, 'c) obj              ('t, 'f, 'c) ptr * 'n Dim.dim -> (('t, 'n) arr, 'f, 'c) obj
521    
522          (* alt *)          (* alt *)
523          val reconstruct' :          val reconstruct' :
524              ('t, 'f, 'c) ptr' * 'n Dim.dim -> (('t, 'f, 'n) arr, 'f, 'c) obj'              ('t, 'f, 'c) ptr' * 'n Dim.dim -> (('t, 'n) arr, 'f, 'c) obj'
525    
526          (* dimension of array object *)          (* dimension of array object *)
527          val dim : (('t, 'f, 'n) arr, 'f, 'c) obj -> 'n Dim.dim          val dim : (('t, 'n) arr, 'f, 'c) obj -> 'n Dim.dim
528      end      end
529    
530      (* allocating new objects *)      (* allocating new objects *)

Legend:
Removed from v.835  
changed lines
  Added in v.836

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