Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/MLRISC/instructions/stream.sig
ViewVC logotype

Annotation of /sml/trunk/src/MLRISC/instructions/stream.sig

Parent Directory Parent Directory | Revision Log Revision Log


Revision 909 - (view) (download) (as text)

1 : monnier 409 (*
2 :     * This is a generic instruction stream datatype.
3 :     * Components such as assemblers, machine code emitters, instruction
4 :     * selection modules communicate with each via this interface.
5 :     *
6 :     * -- Allen
7 :     *)
8 :    
9 :     signature INSTRUCTION_STREAM =
10 :     sig
11 :    
12 :     structure P : PSEUDO_OPS
13 :    
14 : george 909 datatype ('a,'b,'c,'d) stream =
15 : monnier 409 STREAM of
16 : leunga 744 { beginCluster: int -> unit, (* start new compilation unit *)
17 : george 909 endCluster : 'b -> 'd, (* end compilation unit *)
18 :     emit : 'a -> unit, (* emit instruction *)
19 :     pseudoOp : P.pseudo_op -> unit, (* emit a pseudo op *)
20 :     defineLabel : Label.label -> unit, (* define a local label *)
21 :     entryLabel : Label.label -> unit, (* define an external label *)
22 :     comment : string -> unit, (* emit comment *)
23 :     annotation : Annotations.annotation -> unit, (* add annotation *)
24 : leunga 815 getAnnotations: unit -> Annotations.propList ref, (* get annotations*)
25 : leunga 744 exitBlock : 'c -> unit (* mark the end of a procedure *)
26 : monnier 429 }
27 : monnier 409
28 : monnier 429 (* Note:
29 :     o Each compilation unit should be wrapped between beginCluster/endCluster.
30 :    
31 :     o The method annotation adds an annotation to the current basic block,
32 :     not to the current instruction.
33 :    
34 :     o The method comment add a comment to the current basic block.
35 :     Usually comment(msg) is the same as
36 :     annotation(BasicAnnotations.COMMENT msg).
37 :     *)
38 :    
39 : monnier 409 end

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