Skip to content
This repository
Browse code

update distutils bootstrap

  • Loading branch information...
commit 38bc497537bd33f8aa558fc5352f9794ee9d2d93 1 parent 1d04bc7
Andrew Whitworth authored March 01, 2011

Showing 1 changed file with 45 additions and 29 deletions. Show diff stats Hide diff stats

  1. 74  src/winxed/DistutilsSt1.pir
74  src/winxed/DistutilsSt1.pir
@@ -91,43 +91,49 @@ __label_2: # endfor
91 91
 .annotate 'line', 33
92 92
 # Body
93 93
 # {
94  
-.annotate 'line', 34
  94
+.annotate 'line', 35
95 95
 # var winxed_files: $P1
96 96
 $P1 = __ARG_1["pir_winxed"]
97  
-.annotate 'line', 35
98  
-unless_null $P1, __label_0
99 97
 .annotate 'line', 36
  98
+unless_null $P1, __label_0
  99
+.annotate 'line', 37
100 100
 .return()
101 101
 __label_0: # endif
102  
-.annotate 'line', 37
  102
+.annotate 'line', 38
103 103
 # int num_files: $I1
104 104
 # predefined elements
105 105
 elements $I1, $P1
106  
-.annotate 'line', 38
107  
-get_hll_global $P2, 'unlink'
108 106
 .annotate 'line', 39
  107
+get_hll_global $P2, 'unlink'
  108
+.annotate 'line', 40
109 109
 iter $P3, $P1
110 110
 set $P3, 0
111 111
 __label_1: # for iteration
112 112
 unless $P3 goto __label_2
113 113
 shift $S1, $P3
114 114
 # {
115  
-.annotate 'line', 40
  115
+.annotate 'line', 41
116 116
 # int e: $I2
117 117
 null $I2
118  
-.annotate 'line', 41
  118
+.annotate 'line', 42
119 119
 # pirop stat
120 120
 stat $I2, $S1, 0
121  
-.annotate 'line', 42
122  
-unless $I2 goto __label_3
123 121
 .annotate 'line', 43
  122
+unless $I2 goto __label_3
  123
+# {
  124
+.annotate 'line', 44
  125
+concat $S2, "unlink ", $S1
  126
+# predefined say
  127
+say $S2
  128
+.annotate 'line', 45
124 129
 $P2($S1)
  130
+# }
125 131
 __label_3: # endif
126 132
 # }
127 133
 goto __label_1
128 134
 __label_2: # endfor
129 135
 # }
130  
-.annotate 'line', 45
  136
+.annotate 'line', 48
131 137
 
132 138
 .end # clean_winxed
133 139
 
@@ -135,33 +141,33 @@ __label_2: # endfor
135 141
 .sub 'get_pir_file_name'
136 142
 .param string __ARG_1
137 143
 
138  
-.annotate 'line', 47
  144
+.annotate 'line', 50
139 145
 # Body
140 146
 # {
141  
-.annotate 'line', 48
  147
+.annotate 'line', 52
142 148
 # int index: $I1
143 149
 null $I1
144  
-.annotate 'line', 49
  150
+.annotate 'line', 53
145 151
 # pirop index
146 152
 index $I1, __ARG_1, ".winxed"
147  
-.annotate 'line', 50
  153
+.annotate 'line', 54
148 154
 ne $I1, -1, __label_0
149  
-.annotate 'line', 51
  155
+.annotate 'line', 55
150 156
 concat $S2, __ARG_1, " is not a winxed file"
151 157
 # predefined die
152 158
 die $S2
153 159
 __label_0: # endif
154  
-.annotate 'line', 52
  160
+.annotate 'line', 56
155 161
 # string pir_file: $S1
156 162
 null $S1
157  
-.annotate 'line', 53
  163
+.annotate 'line', 57
158 164
 # pirop substr
159 165
 substr $S1, __ARG_1, 0, $I1
160  
-.annotate 'line', 54
  166
+.annotate 'line', 58
161 167
 concat $S2, $S1, ".pir"
162 168
 .return($S2)
163 169
 # }
164  
-.annotate 'line', 55
  170
+.annotate 'line', 59
165 171
 
166 172
 .end # get_pir_file_name
167 173
 
@@ -170,25 +176,35 @@ concat $S2, $S1, ".pir"
170 176
 .param string __ARG_1
171 177
 .param string __ARG_2
172 178
 
173  
-.annotate 'line', 57
  179
+.annotate 'line', 61
174 180
 # Body
175 181
 # {
176  
-.annotate 'line', 59
  182
+.annotate 'line', 63
177 183
 # string cmd: $S1
178  
-concat $S1, "winxed -c ", __ARG_1
179  
-.annotate 'line', 60
  184
+concat $S1, "winxed -o ", __ARG_2
  185
+concat $S1, $S1, " -c "
  186
+concat $S1, $S1, __ARG_1
  187
+.annotate 'line', 64
180 188
 # int result: $I1
181 189
 null $I1
182  
-.annotate 'line', 61
  190
+.annotate 'line', 65
183 191
 # predefined say
184 192
 say $S1
185  
-.annotate 'line', 62
  193
+.annotate 'line', 66
186 194
 # pirop spawnw
187 195
 spawnw $I1, $S1
188  
-.annotate 'line', 63
189  
-.return($I1)
  196
+.annotate 'line', 67
  197
+eq $I1, 0, __label_0
  198
+.annotate 'line', 68
  199
+set $S3, $I1
  200
+concat $S2, "exit status: ", $S3
  201
+concat $S4, $S2, "\ncommand: "
  202
+concat $S4, $S4, $S1
  203
+# predefined die
  204
+die $S4
  205
+__label_0: # endif
190 206
 # }
191  
-.annotate 'line', 64
  207
+.annotate 'line', 69
192 208
 
193 209
 .end # compile_to_pir
194 210
 

0 notes on commit 38bc497

Please sign in to comment.
Something went wrong with that request. Please try again.