File: mdl-rtl.sml

package info (click to toggle)
mlton 20210117%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 58,464 kB
  • sloc: ansic: 27,682; sh: 4,455; asm: 3,569; lisp: 2,879; makefile: 2,347; perl: 1,169; python: 191; pascal: 68; javascript: 7
file content (98 lines) | stat: -rw-r--r-- 2,547 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
(*
 * RTL definitions 
 *)
structure MDLConstant = 
  struct
     type const = unit
     fun toString _ = ""
     fun valueOf _ = 0
     fun hash _ = 0w0
     fun == _ = false
  end

structure MDLRegion   =
  struct
     type region = unit
     val stack = () and readonly = () and memory = () 
     fun toString _ = ""
  end

structure MDLExtension =
  struct
     type ('s,'r,'f,'c) sx = unit 
     type ('s,'r,'f,'c) rx = unit 
     type ('s,'r,'f,'c) fx = unit 
     type ('s,'r,'f,'c) ccx = unit 
  end

structure MDLMLTree   =
  MLTreeF(structure Constant=MDLConstant
          structure Region=MDLRegion
          structure Extension=MDLExtension)      


structure MDLClientPseudoOps = 
  struct 
     structure AsmPseudoOps = 
     struct
         structure T = MDLMLTree
         structure PB = PseudoOpsBasisTyp
         type 'a pseudo_op = (T.labexp,'a) PB.pseudo_op
         fun toString _ = ""
         fun lexpToString _ = ""
         fun defineLabel _ = ""
         fun emitValue _ = () 
         fun sizeOf _ = 0
         val wordSize = 0
      end
      type pseudo_op = unit
      fun toString _ = ""
      fun emitValue _ = () 
      fun sizeOf _ = 0 
      fun adjustLabels _ = false
   end

structure MDLPseudoOps = 
     PseudoOps(structure Client = MDLClientPseudoOps)

structure MDLStream  = InstructionStream(MDLPseudoOps)

structure MDLMLTreeUtil = 
  MLTreeUtils(structure T = MDLMLTree
              fun hashSext _ _ = 0w0
              fun hashRext _ _ = 0w0
              fun hashFext _ _ = 0w0
              fun hashCCext _ _ = 0w0
              fun eqSext _ _ = false
              fun eqRext _ _ = false
              fun eqFext _ _ = false
              fun eqCCext _ _ = false
              fun showSext _ _ = ""
              fun showRext _ _ = ""
              fun showFext _ _ = ""
              fun showCCext _ _ = ""
             )

structure MDLMLTreeRewrite = 
  MLTreeRewrite(structure T = MDLMLTree
                fun sext _ x = x
                fun rext _ x = x
                fun fext _ x = x
                fun ccext _ x = x
               )

structure MDLMLTreeFold = 
  MLTreeFold(structure T = MDLMLTree
             fun sext _ (_,x) = x
             fun rext _ (_,_,x) = x
             fun fext _ (_,_,x) = x
             fun ccext _ (_,_,x) = x
            )

structure MDLMLTreeRTL = 
  MLTreeRTL(structure Util    = MDLMLTreeUtil
            structure Rewrite = MDLMLTreeRewrite
            structure Fold    = MDLMLTreeFold
           )

structure MDLRTLBuilder = RTLBuild(MDLMLTreeRTL)