-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprog_backup.ir
137 lines (88 loc) · 3.27 KB
/
prog_backup.ir
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
(TypeDef StringX (ss )
(extends )
(defun getToken (abc)
??? )
(defun dump ()
??? )
(defun getStatus ()
??? )
)
(defun main ()
(SelectApply getToken "qqqqqqqq1" null)
(SelectApply dump "qqqqqqqq1"))
(ModuleDef NilX ()
(extends ListX )
(defun isEmpty ()
"true" )
(defun head ()
Throw )
(defun tail ()
Throw )
)
(TypeDef :=: (head tl )
(extends ListX )
(defun tail ()
tl )
(defun isEmpty ()
"false" )
)
(defun main (args )
(begin
(ValDef xx (Apply :=: (Apply :=: NilX 2 ) 1 ) )
(Apply println xx ) ) )
(Signature LLVMGetGlobalContext () -> LLVMContextRef)
(defun LLVMGetGlobalContext () => ??? )
(Signature LLVMModuleCreateWithName (ConstCharPtr ) -> LLVMModuleRef)
(defun LLVMModuleCreateWithName (moduleID ) => ??? )
(Signature LLVMSetTarget (LLVMModuleRef ConstCharPtr ) -> EmptyTree)
(defun LLVMSetTarget (mod triple ) => ??? )
(Signature main () -> Unit)
(defun main () =>
(begin
(println "hello dotty!" )
(ValDef ctx (LLVMGetGlobalContext ) )
(ValDef mod (LLVMModuleCreateWithName "debug.ll" ) )
(LLVMSetTarget mod "x86_64-apple-macosx10.10.0" ) ) )
(Signature LLVMGetGlobalContext () -> LLVMOpaqueContext)
(Signature LLVMModuleCreateWithName (ConstCharPtr ) -> LLVMOpaqueModule)
(Signature LLVMSetTarget (LLVMOpaqueModule ConstCharPtr ) -> EmptyTree)
(Signature LLVMArrayType (LLVMTypeRef Unsigned ) -> LLVMTypeRef)
(defun main (args )
(ValDef ctx (LLVMGetGlobalContext ) )
(ValDef mod (LLVMModuleCreateWithName "debug.ll" ) )
(LLVMSetTarget mod "x86_64-apple-macosx10.10.0" )
(ValDef Int8Type (LLVMInt8Type ) )
(ValDef ArrayTy_0 (LLVMArrayType Int8Type 9 ) )
(ValDef PointerTy_1 (LLVMPointerType ArrayTy_0 0 ) )
(ValDef ArrayTy_2 (LLVMArrayType Int8Type 27 ) )
(ValDef PointerTy_3 (LLVMPointerType ArrayTy_2 0 ) )
"return"
)
//= ==================
(Signature LLVMGetGlobalContext () -> LLVMOpaqueContext)
(Signature LLVMModuleCreateWithName (String ) -> LLVMOpaqueModule)
(Signature LLVMSetTarget (LLVMOpaqueModule String ) -> EmptyTree)
(Signature LLVMInt8Type () -> LLVMOpaqueType)
(Signature LLVMInt32Type () -> LLVMOpaqueType)
(Signature LLVMArrayType (LLVMOpaqueType Int ) -> LLVMOpaqueType)
(Signature LLVMPointerType (LLVMOpaqueType Int ) -> LLVMOpaqueType)
(Signature LLVMFunctionType (LLVMOpaqueType (Array LLVMTypeRef) Int LLVMBool ) -> LLVMOpaqueType)
(Signature createArrayTypeRef (Int ) -> (Array LLVMTypeRef) )
(Signature LLVMTrue () -> LLVMBool)
(Signature LLVMFalse () -> LLVMBool)
(Signature LLVMDumpModule (LLVMOpaqueModule) -> EmptyTree)
(defun main1 ()
(ValDef LLVMCCallConv 0 )
(ValDef ctx (LLVMGetGlobalContext ) )
(ValDef mod (LLVMModuleCreateWithName "debug.ll" ) )
(LLVMSetTarget mod "x86_64-apple-macosx10.10.0" )
(ValDef Int8Type (LLVMInt8Type ) )
(ValDef Int32Type (LLVMInt32Type ) )
(ValDef ArrayTy_0 (LLVMArrayType Int8Type 7 ) )
(ValDef PointerTy_1 (LLVMPointerType ArrayTy_0 0 ) )
(ValDef args_count13 0 )
(ValDef FuncTy_2_args (createArrayTypeRef args_count13 ) )
(ValDef FuncTy_2 (LLVMFunctionType Int32Type FuncTy_2_args args_count13 (LLVMFalse) ) )
(LLVMDumpModule mod)
(newString "sss")
)