Skip to content

Commit

Permalink
update distutils bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
Whiteknight committed Mar 1, 2011
1 parent 1d04bc7 commit 38bc497
Showing 1 changed file with 45 additions and 29 deletions.
74 changes: 45 additions & 29 deletions src/winxed/DistutilsSt1.pir
Original file line number Diff line number Diff line change
Expand Up @@ -91,77 +91,83 @@ __label_2: # endfor
.annotate 'line', 33
# Body
# {
.annotate 'line', 34
.annotate 'line', 35
# var winxed_files: $P1
$P1 = __ARG_1["pir_winxed"]
.annotate 'line', 35
unless_null $P1, __label_0
.annotate 'line', 36
unless_null $P1, __label_0
.annotate 'line', 37
.return()
__label_0: # endif
.annotate 'line', 37
.annotate 'line', 38
# int num_files: $I1
# predefined elements
elements $I1, $P1
.annotate 'line', 38
get_hll_global $P2, 'unlink'
.annotate 'line', 39
get_hll_global $P2, 'unlink'
.annotate 'line', 40
iter $P3, $P1
set $P3, 0
__label_1: # for iteration
unless $P3 goto __label_2
shift $S1, $P3
# {
.annotate 'line', 40
.annotate 'line', 41
# int e: $I2
null $I2
.annotate 'line', 41
.annotate 'line', 42
# pirop stat
stat $I2, $S1, 0
.annotate 'line', 42
unless $I2 goto __label_3
.annotate 'line', 43
unless $I2 goto __label_3
# {
.annotate 'line', 44
concat $S2, "unlink ", $S1
# predefined say
say $S2
.annotate 'line', 45
$P2($S1)
# }
__label_3: # endif
# }
goto __label_1
__label_2: # endfor
# }
.annotate 'line', 45
.annotate 'line', 48

.end # clean_winxed


.sub 'get_pir_file_name'
.param string __ARG_1

.annotate 'line', 47
.annotate 'line', 50
# Body
# {
.annotate 'line', 48
.annotate 'line', 52
# int index: $I1
null $I1
.annotate 'line', 49
.annotate 'line', 53
# pirop index
index $I1, __ARG_1, ".winxed"
.annotate 'line', 50
.annotate 'line', 54
ne $I1, -1, __label_0
.annotate 'line', 51
.annotate 'line', 55
concat $S2, __ARG_1, " is not a winxed file"
# predefined die
die $S2
__label_0: # endif
.annotate 'line', 52
.annotate 'line', 56
# string pir_file: $S1
null $S1
.annotate 'line', 53
.annotate 'line', 57
# pirop substr
substr $S1, __ARG_1, 0, $I1
.annotate 'line', 54
.annotate 'line', 58
concat $S2, $S1, ".pir"
.return($S2)
# }
.annotate 'line', 55
.annotate 'line', 59

.end # get_pir_file_name

Expand All @@ -170,25 +176,35 @@ concat $S2, $S1, ".pir"
.param string __ARG_1
.param string __ARG_2

.annotate 'line', 57
.annotate 'line', 61
# Body
# {
.annotate 'line', 59
.annotate 'line', 63
# string cmd: $S1
concat $S1, "winxed -c ", __ARG_1
.annotate 'line', 60
concat $S1, "winxed -o ", __ARG_2
concat $S1, $S1, " -c "
concat $S1, $S1, __ARG_1
.annotate 'line', 64
# int result: $I1
null $I1
.annotate 'line', 61
.annotate 'line', 65
# predefined say
say $S1
.annotate 'line', 62
.annotate 'line', 66
# pirop spawnw
spawnw $I1, $S1
.annotate 'line', 63
.return($I1)
.annotate 'line', 67
eq $I1, 0, __label_0
.annotate 'line', 68
set $S3, $I1
concat $S2, "exit status: ", $S3
concat $S4, $S2, "\ncommand: "
concat $S4, $S4, $S1
# predefined die
die $S4
__label_0: # endif
# }
.annotate 'line', 64
.annotate 'line', 69

.end # compile_to_pir

Expand Down

0 comments on commit 38bc497

Please sign in to comment.