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 /dev-notes/primop-list.md
ViewVC logotype

Diff of /dev-notes/primop-list.md

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

revision 4961, Thu Apr 18 10:18:12 2019 UTC revision 4978, Thu Apr 25 10:31:41 2019 UTC
# Line 47  Line 47 
47    * "`vec`" -- polymorphic vectors    * "`vec`" -- polymorphic vectors
48    * "`seq`" -- sequence types (arrays and vectors)    * "`seq`" -- sequence types (arrays and vectors)
49    
50    Following the type prefix may one or more attributes, which highlight properties
51    of the operation.
52    
53  We use the attribute "`raw`" to denote direct machine operations that are not  We use the attribute "`raw`" to denote direct machine operations that are not
54  directly accesible in the Basis Library (*e.g.*, shift operations, where the basis  directly accesible in the Basis Library (*e.g.*, shift operations, where the basis
55  versions clamp the shift amount to the word size, but the raw versions do not).  versions clamp the shift amount to the word size, but the raw versions do not).
# Line 161  Line 164 
164    * `bool_not : bool -> bool`<br/>    * `bool_not : bool -> bool`<br/>
165      `P.INLNOT`      `P.INLNOT`
166    
167  Some additional candidates for inlined operations include `hd`, `tl`, `null`, `chr`, and `ord`.  Some additional candidates for inlined operations include `hd`, `tl`, `null`, `chr`,
168    and `ord`.
169    
170  If the compiler had the `option` and `order` datatypes builtin (like `bool` and `list`),  If the compiler had the `option` and `order` datatypes builtin (like `bool` and `list`),
171  then `valOf`, `isSome`, `isNone` and some of the `compare` functions could be inlined.  then `valOf`, `isSome`, `isNone` and some of the `compare` functions could also
172    be inlined.
173    
174    In the long run, however, a better way to support inlining library functions would
175    be through a reliable cross-module inliner.
176    
177    
178  #### Bytearray and bytevector operations  #### Bytearray and bytevector operations
# Line 250  Line 259 
259      `P.SUBSCRIPT_REC`      `P.SUBSCRIPT_REC`
260    
261    * `raw64Sub : 'a * int -> real64`<br/>    * `raw64Sub : 'a * int -> real64`<br/>
262      Unclear what purpose this primop serves      gets an element from a packed tuple of 64-bit reals.  The only use of
263        this function is in the implementation of the `Unsafe.Object.nth`
264        function. <br/>
265      `P.SUBSCRIPT_RAW64`      `P.SUBSCRIPT_RAW64`
266    
267    

Legend:
Removed from v.4961  
changed lines
  Added in v.4978

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