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/memory/memory-dummy.sml
ViewVC logotype

Diff of /sml/trunk/src/ml-nlffi-lib/memory/memory-dummy.sml

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

revision 975, Wed Oct 31 20:22:44 2001 UTC revision 1015, Tue Jan 15 21:46:00 2002 UTC
# Line 8  Line 8 
8   * author: Matthias Blume (blume@research.bell-labs.com)   * author: Matthias Blume (blume@research.bell-labs.com)
9   *)   *)
10  structure CMemory : CMEMORY = struct  structure CMemory : CMEMORY = struct
11        exception OutOfMemory
12    
13      type addr = Word32.word      type addr = Word32.word
14      val null = 0w0 : addr      val null = 0w0 : addr
15      fun isNull a = a = null      fun isNull a = a = null
# Line 17  Line 19 
19      fun compare (a1, a2) = Word32.compare (a1, a2)      fun compare (a1, a2) = Word32.compare (a1, a2)
20      fun a1 -- a2 = Word32.toIntX (a1 - a2)      fun a1 -- a2 = Word32.toIntX (a1 - a2)
21      fun bcopy { from: addr, to: addr, bytes: word } = ()      fun bcopy { from: addr, to: addr, bytes: word } = ()
22      fun alloc (bytes: word) = NONE : addr option      fun alloc (bytes: word) : addr = raise OutOfMemory
23      fun free (a: addr) = ()      fun free (a: addr) = ()
24    
25      (* most of these types are represented using a bigger size      (* most of these types are represented using a bigger size
# Line 86  Line 88 
88    
89      fun sext (value, mask) =      fun sext (value, mask) =
90          int_u2s (if andb (value, mask) = 0w0 then value else orb (value, mask))          int_u2s (if andb (value, mask) = 0w0 then value else orb (value, mask))
91    
92        fun p2i x = x
93        fun i2p x = x
94  end  end

Legend:
Removed from v.975  
changed lines
  Added in v.1015

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