Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
25897 lines (22133 sloc) 610 KB
# THIS IS A GENERATED FILE! DO NOT EDIT!
# Compiled with Winxed 1.9.1
# Source file: winxedst2.winxed
# Begin generated code
.namespace [ 'Winxed'; 'Compiler' ]
.sub 'getVersion' :subid('WSubId_27') :anon
new $P1, ['FixedIntegerArray'], 3
$P1[0] = 1
$P1[1] = 9
$P1[2] = 1
.return($P1)
.end # getVersion
.sub 'getVersionString' :subid('WSubId_157') :anon
.const 'Sub' WSubId_27 = "WSubId_27"
$P1 = WSubId_27()
join $S1, ".", $P1
concat $S2, "Winxed ", $S1
.return($S2)
.end # getVersionString
.sub 'sformat' :subid('WSubId_48')
.param string __ARG_1
.param pmc __ARG_2 :slurpy
new $P1, [ 'StringBuilder' ]
$P1.'append_format'(__ARG_1, __ARG_2 :flat)
set $S1, $P1
.return($S1)
.end # sformat
.sub 'bindfirst' :subid('WSubId_1')
.param pmc __ARG_1
.param pmc __ARG_2 :slurpy
.const 'Sub' WSubId_2 = "WSubId_2"
.lex '__WLEX_1', __ARG_1
.lex '__WLEX_2', __ARG_2
newclosure $P1, WSubId_2
.return($P1)
.end # bindfirst
.sub '' :anon :subid('WSubId_2') :outer('WSubId_1')
.param pmc __ARG_3 :slurpy
find_lex $P1, '__WLEX_1'
find_lex $P2, '__WLEX_2'
.tailcall $P1($P2 :flat, __ARG_3 :flat)
.end # WSubId_2
.sub 'bindlast' :subid('WSubId_3')
.param pmc __ARG_1
.param pmc __ARG_2 :slurpy
.const 'Sub' WSubId_4 = "WSubId_4"
.lex '__WLEX_1', __ARG_1
.lex '__WLEX_2', __ARG_2
newclosure $P1, WSubId_4
.return($P1)
.end # bindlast
.sub '' :anon :subid('WSubId_4') :outer('WSubId_3')
.param pmc __ARG_3 :slurpy
find_lex $P1, '__WLEX_1'
find_lex $P2, '__WLEX_2'
.tailcall $P1(__ARG_3 :flat, $P2 :flat)
.end # WSubId_4
.sub 'bindmethod' :subid('WSubId_5')
.param string __ARG_1
.const 'Sub' WSubId_6 = "WSubId_6"
.lex '__WLEX_1', __ARG_1
newclosure $P1, WSubId_6
.return($P1)
.end # bindmethod
.sub '' :anon :subid('WSubId_6') :outer('WSubId_5')
.param pmc __ARG_2
.param pmc __ARG_3 :slurpy
find_lex $S1, '__WLEX_1'
find_lex $S2, '__WLEX_1'
.tailcall __ARG_2.$S2(__ARG_3 :flat)
.end # WSubId_6
.sub 'method_fun' :subid('WSubId_7')
.param pmc __ARG_1
.param string __ARG_2
.const 'Sub' WSubId_8 = "WSubId_8"
.lex '__WLEX_1', __ARG_1
.lex '__WLEX_2', $P1
find_method $P1, __ARG_1, __ARG_2
newclosure $P2, WSubId_8
.return($P2)
.end # method_fun
.sub '' :anon :subid('WSubId_8') :outer('WSubId_7')
.param pmc __ARG_3 :slurpy
find_lex $P1, '__WLEX_1'
find_lex $P2, '__WLEX_2'
.tailcall $P1.$P2(__ARG_3 :flat)
.end # WSubId_8
.sub 'addprefix' :subid('WSubId_9')
.param string __ARG_1
.const 'Sub' WSubId_10 = "WSubId_10"
.lex '__WLEX_1', __ARG_1
newclosure $P1, WSubId_10
.return($P1)
.end # addprefix
.sub '' :anon :subid('WSubId_10') :outer('WSubId_9')
.param string __ARG_2
find_lex $S1, '__WLEX_1'
find_lex $S2, '__WLEX_1'
concat $S3, $S2, __ARG_2
.return($S3)
.end # WSubId_10
.namespace [ 'Winxed'; 'Compiler'; 'WinxedCompilerError' ]
.sub 'WinxedCompilerError' :method
.param string __ARG_1
.param string __ARG_2
.param string __ARG_3 :optional
.param int __ARG_4 :optional
box $P1, __ARG_1
setattribute self, 'type', $P1
box $P1, __ARG_2
setattribute self, 'message', $P1
box $P1, __ARG_3
setattribute self, 'filename', $P1
box $P1, __ARG_4
setattribute self, 'line', $P1
.end # WinxedCompilerError
.sub Winxed_class_init :anon :load :init
newclass $P0, [ 'Winxed'; 'Compiler'; 'WinxedCompilerError' ]
addattribute $P0, 'type'
addattribute $P0, 'filename'
addattribute $P0, 'line'
addattribute $P0, 'message'
.end
.namespace [ 'Winxed'; 'Compiler' ]
.sub 'Warn' :subid('WSubId_45')
.param string __ARG_1
.param pmc __ARG_2 :optional
getstderr $P1
$P1.'print'("WARNING: ")
$P1.'print'(__ARG_1)
if_null __ARG_2, __label_1
$P1.'print'(" near ")
$P2 = __ARG_2.'show'()
$P1.'print'($P2)
__label_1: # endif
$P1.'print'("\n")
.end # Warn
.sub 'InternalError' :subid('WSubId_33')
.param string __ARG_1
.param pmc __ARG_2 :optional
.param int __ARG_3 :opt_flag
unless __ARG_3 goto __label_1
__ARG_2 = __ARG_2.'getstart'()
$P2 = __ARG_2.'show'()
null $S1
if_null $P2, __label_2
set $S1, $P2
__label_2:
concat $S2, __ARG_1, " near "
concat $S2, $S2, $S1
set __ARG_1, $S2
__label_1: # endif
unless __ARG_3 goto __label_4
new $P2, [ 'Winxed'; 'Compiler'; 'WinxedCompilerError' ]
$P3 = __ARG_2.'filename'()
$P4 = __ARG_2.'linenum'()
$P2.'WinxedCompilerError'("internal", __ARG_1, $P3, $P4)
set $P1, $P2
goto __label_3
__label_4:
new $P6, [ 'Winxed'; 'Compiler'; 'WinxedCompilerError' ]
$P6.'WinxedCompilerError'("internal", __ARG_1)
set $P5, $P6
set $P1, $P5
__label_3:
root_new $P2, ["parrot";"Exception"]
$P2["message"] = __ARG_1
$P2["severity"] = 2
$P2["type"] = 567
$P2["payload"] = $P1
throw $P2
.end # InternalError
.sub 'SyntaxError' :subid('WSubId_28')
.param string __ARG_1
.param pmc __ARG_2
if_null __ARG_2, __label_1
__ARG_2 = __ARG_2.'getstart'()
__label_1: # endif
if_null __ARG_2, __label_3
$P1 = __ARG_2.'linenum'()
goto __label_2
__label_3:
box $P1, -1
__label_2:
set $I1, $P1
if_null __ARG_2, __label_5
$P1 = __ARG_2.'filename'()
goto __label_4
__label_5:
box $P1, "UNKNOWN"
__label_4:
null $S1
if_null $P1, __label_6
set $S1, $P1
__label_6:
$S3 = __ARG_2.'viewable'()
concat $S2, " near ", $S3
set $S3, $I1
concat $S4, __ARG_1, " in "
concat $S4, $S4, $S1
concat $S4, $S4, " line "
concat $S4, $S4, $S3
concat $S4, $S4, $S2
new $P3, [ 'Winxed'; 'Compiler'; 'WinxedCompilerError' ]
concat $S5, __ARG_1, $S2
$P3.'WinxedCompilerError'("parser", $S5, $S1, $I1)
set $P2, $P3
root_new $P1, ["parrot";"Exception"]
$P1["message"] = $S4
$P1["severity"] = 2
$P1["type"] = 567
$P1["payload"] = $P2
throw $P1
.end # SyntaxError
.sub 'NoLeftSide' :subid('WSubId_99')
.param pmc __ARG_1
.const 'Sub' WSubId_28 = "WSubId_28"
WSubId_28("Not a left-side expression", __ARG_1)
.end # NoLeftSide
.sub 'Expected' :subid('WSubId_76')
.param string __ARG_1
.param pmc __ARG_2
.const 'Sub' WSubId_28 = "WSubId_28"
concat $S1, "Expected ", __ARG_1
WSubId_28($S1, __ARG_2)
.end # Expected
.sub 'Unexpected' :subid('WSubId_79')
.param string __ARG_1
.param pmc __ARG_2
.const 'Sub' WSubId_28 = "WSubId_28"
concat $S1, "Unexpected ", __ARG_1
WSubId_28($S1, __ARG_2)
.end # Unexpected
.sub 'ExpectedIdentifier' :subid('WSubId_30')
.param pmc __ARG_1
.const 'Sub' WSubId_28 = "WSubId_28"
WSubId_28("Expected identifier", __ARG_1)
.end # ExpectedIdentifier
.sub 'ExpectedOp' :subid('WSubId_29')
.param string __ARG_1
.param pmc __ARG_2
.const 'Sub' WSubId_28 = "WSubId_28"
concat $S1, "Expected '", __ARG_1
concat $S1, $S1, "'"
WSubId_28($S1, __ARG_2)
.end # ExpectedOp
.sub 'RequireOp' :subid('WSubId_31')
.param string __ARG_1
.param pmc __ARG_2
.const 'Sub' WSubId_29 = "WSubId_29"
$P1 = __ARG_2.'isop'(__ARG_1)
if $P1 goto __label_1
WSubId_29(__ARG_1, __ARG_2)
__label_1: # endif
.end # RequireOp
.sub 'RequireKeyword' :subid('WSubId_32')
.param string __ARG_1
.param pmc __ARG_2
.const 'Sub' WSubId_29 = "WSubId_29"
$P1 = __ARG_2.'iskeyword'(__ARG_1)
if $P1 goto __label_1
WSubId_29(__ARG_1, __ARG_2)
__label_1: # endif
.end # RequireKeyword
.sub 'RequireIdentifier' :subid('WSubId_78')
.param pmc __ARG_1
.const 'Sub' WSubId_30 = "WSubId_30"
$P1 = __ARG_1.'isidentifier'()
if $P1 goto __label_1
WSubId_30(__ARG_1)
__label_1: # endif
.end # RequireIdentifier
.sub 'ExpectOp' :subid('WSubId_93')
.param string __ARG_1
.param pmc __ARG_2
.const 'Sub' WSubId_31 = "WSubId_31"
$P1 = __ARG_2.'get'()
WSubId_31(__ARG_1, $P1)
.end # ExpectOp
.sub 'ExpectKeyword' :subid('WSubId_135')
.param string __ARG_1
.param pmc __ARG_2
.const 'Sub' WSubId_32 = "WSubId_32"
$P1 = __ARG_2.'get'()
WSubId_32(__ARG_1, $P1)
.end # ExpectKeyword
.sub 'UndefinedVariable' :subid('WSubId_102')
.param string __ARG_1
.param pmc __ARG_2
.const 'Sub' WSubId_28 = "WSubId_28"
concat $S1, "Variable '", __ARG_1
concat $S1, $S1, "' is not defined"
WSubId_28($S1, __ARG_2)
.end # UndefinedVariable
.sub 'Redeclared' :subid('WSubId_98')
.param pmc __ARG_1
.const 'Sub' WSubId_28 = "WSubId_28"
$S1 = __ARG_1.'getidentifier'()
concat $S2, "Redeclared '", $S1
concat $S2, $S2, "'"
WSubId_28($S2, __ARG_1)
.end # Redeclared
.namespace [ 'Winxed'; 'Compiler'; 'Token' ]
.sub 'Token' :method
.param string __ARG_1
.param int __ARG_2
box $P1, __ARG_1
setattribute self, 'file', $P1
box $P1, __ARG_2
setattribute self, 'line', $P1
.end # Token
.sub 'getstart' :method
.return(self)
.end # getstart
.sub 'iseof' :method
.return(0)
.end # iseof
.sub 'iscomment' :method
.return(0)
.end # iscomment
.sub 'isidentifier' :method
.return(0)
.end # isidentifier
.sub 'isint' :method
.return(0)
.end # isint
.sub 'isfloat' :method
.return(0)
.end # isfloat
.sub 'isstring' :method
.return(0)
.end # isstring
.sub 'issinglequoted' :method
.return(0)
.end # issinglequoted
.sub 'getintvalue' :method
.const 'Sub' WSubId_33 = "WSubId_33"
WSubId_33("Not a literal int", self)
.end # getintvalue
.sub 'rawstring' :method
.const 'Sub' WSubId_33 = "WSubId_33"
WSubId_33("Not a literal string", self)
.end # rawstring
.sub 'getidentifier' :method
.const 'Sub' WSubId_30 = "WSubId_30"
WSubId_30(self)
.end # getidentifier
.sub 'iskeyword' :method
.param string __ARG_1
.return(0)
.end # iskeyword
.sub 'checkkeyword' :method
.return(0)
.end # checkkeyword
.sub 'isop' :method
.param string __ARG_1
.return(0)
.end # isop
.sub 'checkop' :method
.return("")
.end # checkop
.sub 'viewable' :method
.return("(unknown)")
.end # viewable
.sub 'filename' :method
getattribute $P1, self, 'file'
.return($P1)
.end # filename
.sub 'linenum' :method
getattribute $P1, self, 'line'
.return($P1)
.end # linenum
.sub 'show' :method
$P1 = self.'viewable'()
null $S1
if_null $P1, __label_1
set $S1, $P1
__label_1:
getattribute $P1, self, 'file'
set $S2, $P1
getattribute $P2, self, 'line'
set $S3, $P2
concat $S4, $S1, " at "
concat $S4, $S4, $S2
concat $S4, $S4, " line "
concat $S4, $S4, $S3
.return($S4)
.end # show
.sub Winxed_class_init :anon :load :init
newclass $P0, [ 'Winxed'; 'Compiler'; 'Token' ]
addattribute $P0, 'file'
addattribute $P0, 'line'
.end
.namespace [ 'Winxed'; 'Compiler'; 'TokenEof' ]
.sub 'TokenEof' :method
.param string __ARG_1
self.'Token'(__ARG_1, 0)
.end # TokenEof
.sub 'iseof' :method
.return(1)
.end # iseof
.sub 'viewable' :method
.return("(End of file)")
.end # viewable
.sub Winxed_class_init :anon :load :init
newclass $P0, [ 'Winxed'; 'Compiler'; 'TokenEof' ]
get_class $P1, [ 'Winxed'; 'Compiler'; 'Token' ]
addparent $P0, $P1
.end
.namespace [ 'Winxed'; 'Compiler'; 'TokenWithVal' ]
.sub 'TokenWithVal' :method
.param string __ARG_1
.param int __ARG_2
.param string __ARG_3
self.'Token'(__ARG_1, __ARG_2)
box $P1, __ARG_3
setattribute self, 'str', $P1
.end # TokenWithVal
.sub 'get_string' :method :vtable
getattribute $P1, self, 'str'
.return($P1)
.end # get_string
.sub 'viewable' :method
getattribute $P1, self, 'str'
.return($P1)
.end # viewable
.sub Winxed_class_init :anon :load :init
newclass $P0, [ 'Winxed'; 'Compiler'; 'TokenWithVal' ]
get_class $P1, [ 'Winxed'; 'Compiler'; 'Token' ]
addparent $P0, $P1
addattribute $P0, 'str'
.end
.namespace [ 'Winxed'; 'Compiler'; 'TokenComment' ]
.sub 'TokenComment' :method
.param string __ARG_1
.param int __ARG_2
self.'Token'(__ARG_1, __ARG_2)
.end # TokenComment
.sub 'iscomment' :method
.return(1)
.end # iscomment
.sub 'viewable' :method
.return("(comment)")
.end # viewable
.sub Winxed_class_init :anon :load :init
newclass $P0, [ 'Winxed'; 'Compiler'; 'TokenComment' ]
get_class $P1, [ 'Winxed'; 'Compiler'; 'Token' ]
addparent $P0, $P1
.end
.namespace [ 'Winxed'; 'Compiler'; 'TokenOp' ]
.sub 'TokenOp' :method
.param string __ARG_1
.param int __ARG_2
.param string __ARG_3
self.'TokenWithVal'(__ARG_1, __ARG_2, __ARG_3)
.end # TokenOp
.sub 'isop' :method
.param string __ARG_1
getattribute $P1, self, 'str'
set $S1, $P1
iseq $I1, $S1, __ARG_1
.return($I1)
.end # isop
.sub 'checkop' :method
getattribute $P1, self, 'str'
set $S1, $P1
.return($S1)
.end # checkop
.sub Winxed_class_init :anon :load :init
newclass $P0, [ 'Winxed'; 'Compiler'; 'TokenOp' ]
get_class $P1, [ 'Winxed'; 'Compiler'; 'TokenWithVal' ]
addparent $P0, $P1
.end
.namespace [ 'Winxed'; 'Compiler'; 'TokenIdentifier' ]
.sub 'TokenIdentifier' :method
.param string __ARG_1
.param int __ARG_2
.param string __ARG_3
self.'TokenWithVal'(__ARG_1, __ARG_2, __ARG_3)
.end # TokenIdentifier
.sub 'isidentifier' :method
.return(1)
.end # isidentifier
.sub 'getidentifier' :method
getattribute $P1, self, 'str'
.return($P1)
.end # getidentifier
.sub 'checkkeyword' :method
getattribute $P1, self, 'str'
set $S1, $P1
.return($S1)
.end # checkkeyword
.sub 'iskeyword' :method
.param string __ARG_1
getattribute $P1, self, 'str'
set $S1, $P1
iseq $I1, $S1, __ARG_1
.return($I1)
.end # iskeyword
.sub Winxed_class_init :anon :load :init
newclass $P0, [ 'Winxed'; 'Compiler'; 'TokenIdentifier' ]
get_class $P1, [ 'Winxed'; 'Compiler'; 'TokenWithVal' ]
addparent $P0, $P1
.end
.namespace [ 'Winxed'; 'Compiler'; 'TokenString' ]
.sub 'isstring' :method
.return(1)
.end # isstring
.sub 'rawstring' :method
getattribute $P1, self, 'str'
.return($P1)
.end # rawstring
.sub Winxed_class_init :anon :load :init
newclass $P0, [ 'Winxed'; 'Compiler'; 'TokenString' ]
get_class $P1, [ 'Winxed'; 'Compiler'; 'TokenWithVal' ]
addparent $P0, $P1
.end
.namespace [ 'Winxed'; 'Compiler'; 'TokenQuoted' ]
.sub 'TokenQuoted' :method
.param string __ARG_1
.param int __ARG_2
.param string __ARG_3
self.'TokenWithVal'(__ARG_1, __ARG_2, __ARG_3)
.end # TokenQuoted
.sub 'get_string' :method :vtable
getattribute $P1, self, 'str'
set $S1, $P1
concat $S3, "\"", $S1
concat $S3, $S3, "\""
set $S2, $S3
__label_1:
.return($S2)
.end # get_string
.sub 'viewable' :method
getattribute $P1, self, 'str'
set $S1, $P1
concat $S3, "\"", $S1
concat $S3, $S3, "\""
set $S2, $S3
__label_1:
.return($S2)
.end # viewable
.sub 'getasquoted' :method
getattribute $P1, self, 'str'
.return($P1)
.end # getasquoted
.sub 'getPirString' :method
.const 'Sub' WSubId_28 = "WSubId_28"
getattribute $P1, self, 'str'
null $S1
if_null $P1, __label_1
set $S1, $P1
__label_1:
null $S2
new $P1, 'ExceptionHandler'
set_label $P1, __label_2
push_eh $P1
$P0 = new ["String"]
$P0 = $S1
$S2 = $P0."unescape"("utf8")
pop_eh
goto __label_3
__label_2:
.get_results($P2)
finalize $P2
pop_eh
WSubId_28("Invalid escape sequence in literal string", self)
__label_3:
null $I1
box $P1, $S2
if_null $P1, __label_5
iter $P3, $P1
set $P3, 0
__label_4: # for iteration
unless $P3 goto __label_5
shift $I2, $P3
le $I2, 127, __label_6
set $I1, 1
goto __label_5 # break
__label_6: # endif
goto __label_4
__label_5: # endfor
escape $S4, $S2
concat $S5, "\"", $S4
concat $S5, $S5, "\""
set $S1, $S5
__label_7:
unless $I1 goto __label_9
set $S3, "utf8:"
goto __label_8
__label_9:
set $S3, ""
__label_8:
concat $S5, $S3, $S1
.return($S5)
.end # getPirString
.sub Winxed_class_init :anon :load :init
newclass $P0, [ 'Winxed'; 'Compiler'; 'TokenQuoted' ]
get_class $P1, [ 'Winxed'; 'Compiler'; 'TokenString' ]
addparent $P0, $P1
.end
.namespace [ 'Winxed'; 'Compiler'; 'TokenSingleQuoted' ]
.sub 'TokenSingleQuoted' :method
.param string __ARG_1
.param int __ARG_2
.param string __ARG_3
self.'TokenWithVal'(__ARG_1, __ARG_2, __ARG_3)
.end # TokenSingleQuoted
.sub 'issinglequoted' :method
.return(1)
.end # issinglequoted
.sub 'get_string' :method :vtable
getattribute $P1, self, 'str'
set $S1, $P1
concat $S2, "'", $S1
concat $S2, $S2, "'"
.return($S2)
.end # get_string
.sub 'viewable' :method
getattribute $P1, self, 'str'
set $S1, $P1
concat $S2, "'", $S1
concat $S2, $S2, "'"
.return($S2)
.end # viewable
.sub 'getasquoted' :method
set $S1, ""
getattribute $P1, self, 'str'
if_null $P1, __label_2
iter $P2, $P1
set $P2, 0
__label_1: # for iteration
unless $P2 goto __label_2
shift $S2, $P2
if_null $S2, __label_3
length $I1, $S2
ne $I1, 1, __label_3
ord $I1, $S2
if $I1 == 34 goto __label_5
if $I1 == 92 goto __label_6
if $I1 == 39 goto __label_7
goto __label_3
__label_5: # case
__label_6: # case
__label_7: # case
concat $S3, "\\", $S2
set $S2, $S3
goto __label_4 # break
__label_3: # default
__label_4: # switch end
concat $S1, $S1, $S2
goto __label_1
__label_2: # endfor
.return($S1)
.end # getasquoted
.sub 'getPirString' :method
getattribute $P1, self, 'str'
null $S1
if_null $P1, __label_1
set $S1, $P1
__label_1:
set $S2, "'"
null $I1
box $P1, $S1
if_null $P1, __label_3
iter $P2, $P1
set $P2, 0
__label_2: # for iteration
unless $P2 goto __label_3
shift $I2, $P2
islt $I5, $I2, 32
if $I5 goto __label_5
isgt $I5, $I2, 127
__label_5:
unless $I5 goto __label_4
set $I1, 1
goto __label_3 # break
__label_4: # endif
goto __label_2
__label_3: # endfor
null $I3
unless $I1 goto __label_6
set $S2, "\""
set $S3, ""
box $P1, $S1
if_null $P1, __label_8
iter $P3, $P1
set $P3, 0
__label_7: # for iteration
unless $P3 goto __label_8
shift $S4, $P3
ne $S4, "\\", __label_9
concat $S3, $S3, "\\\\"
goto __label_10
__label_9: # else
ord $I4, $S4
islt $I5, $I4, 32
if $I5 goto __label_13
isgt $I5, $I4, 127
__label_13:
unless $I5 goto __label_11
le $I4, 127, __label_14
set $I3, 1
__label_14: # endif
box $P4, $I4
$P1 = $P4.'get_as_base'(16)
null $S5
if_null $P1, __label_15
set $S5, $P1
__label_15:
concat $S3, $S3, "\\x{"
concat $S3, $S3, $S5
concat $S3, $S3, "}"
goto __label_12
__label_11: # else
concat $S3, $S3, $S4
__label_12: # endif
__label_10: # endif
goto __label_7
__label_8: # endfor
set $S1, $S3
__label_6: # endif
concat $S6, $S2, $S1
concat $S6, $S6, $S2
set $S1, $S6
unless $I3 goto __label_16
concat $S6, "utf8:", $S1
set $S1, $S6
__label_16: # endif
.return($S1)
.end # getPirString
.sub Winxed_class_init :anon :load :init
newclass $P0, [ 'Winxed'; 'Compiler'; 'TokenSingleQuoted' ]
get_class $P1, [ 'Winxed'; 'Compiler'; 'TokenString' ]
addparent $P0, $P1
.end
.namespace [ 'Winxed'; 'Compiler'; 'TokenInteger' ]
.sub 'TokenInteger' :method
.param string __ARG_1
.param int __ARG_2
.param string __ARG_3
self.'TokenWithVal'(__ARG_1, __ARG_2, __ARG_3)
.end # TokenInteger
.sub 'isint' :method
.return(1)
.end # isint
.sub 'getintvalue' :method
getattribute $P1, self, 'str'
set $I1, $P1
.return($I1)
.end # getintvalue
.sub Winxed_class_init :anon :load :init
newclass $P0, [ 'Winxed'; 'Compiler'; 'TokenInteger' ]
get_class $P1, [ 'Winxed'; 'Compiler'; 'TokenWithVal' ]
addparent $P0, $P1
.end
.namespace [ 'Winxed'; 'Compiler'; 'TokenFloat' ]
.sub 'TokenFloat' :method
.param string __ARG_1
.param int __ARG_2
.param string __ARG_3
self.'TokenWithVal'(__ARG_1, __ARG_2, __ARG_3)
.end # TokenFloat
.sub 'isfloat' :method
.return(1)
.end # isfloat
.sub 'getfloatvalue' :method
getattribute $P1, self, 'str'
set $N1, $P1
.return($N1)
.end # getfloatvalue
.sub Winxed_class_init :anon :load :init
newclass $P0, [ 'Winxed'; 'Compiler'; 'TokenFloat' ]
get_class $P1, [ 'Winxed'; 'Compiler'; 'TokenWithVal' ]
addparent $P0, $P1
.end
.namespace [ 'Winxed'; 'Compiler' ]
.sub 'TokenError' :subid('WSubId_34')
.param string __ARG_1
.param pmc __ARG_2
.param int __ARG_3
getattribute $P2, __ARG_2, 'filename'
set $S1, $P2
set $S2, __ARG_3
concat $S3, __ARG_1, " in "
concat $S3, $S3, $S1
concat $S3, $S3, " line "
concat $S3, $S3, $S2
new $P4, [ 'Winxed'; 'Compiler'; 'WinxedCompilerError' ]
getattribute $P5, __ARG_2, 'filename'
$P4.'WinxedCompilerError'("tokenizer", __ARG_1, $P5, __ARG_3)
set $P3, $P4
root_new $P1, ["parrot";"Exception"]
$P1["message"] = $S3
$P1["severity"] = 2
$P1["type"] = 567
$P1["payload"] = $P3
throw $P1
.end # TokenError
.sub 'UnterminatedString' :subid('WSubId_35')
.param pmc __ARG_1
.param int __ARG_2
.const 'Sub' WSubId_34 = "WSubId_34"
WSubId_34("Unterminated string", __ARG_1, __ARG_2)
.end # UnterminatedString
.sub 'UnterminatedHeredoc' :subid('WSubId_36')
.param pmc __ARG_1
.param int __ARG_2
.const 'Sub' WSubId_34 = "WSubId_34"
WSubId_34("Unterminated heredoc", __ARG_1, __ARG_2)
.end # UnterminatedHeredoc
.sub 'UnclosedComment' :subid('WSubId_37')
.param pmc __ARG_1
.param int __ARG_2
.const 'Sub' WSubId_34 = "WSubId_34"
WSubId_34("Unclosed comment", __ARG_1, __ARG_2)
.end # UnclosedComment
.sub 'getquoted' :subid('WSubId_40')
.param pmc __ARG_1
.param string __ARG_2
.param int __ARG_3
.const 'Sub' WSubId_35 = "WSubId_35"
set $S1, ""
null $S2
$P1 = __ARG_1.'getchar'()
set $S2, $P1
__label_3: # for condition
eq $S2, "\"", __label_2
if $S2 == "" goto __label_6
if $S2 == "\n" goto __label_7
if $S2 == "\\" goto __label_8
goto __label_4
__label_6: # case
__label_7: # case
WSubId_35(__ARG_1, __ARG_3)
__label_8: # case
$P2 = __ARG_1.'getchar'()
null $S3
if_null $P2, __label_9
set $S3, $P2
__label_9:
iseq $I1, $S3, ""
if $I1 goto __label_11
iseq $I1, $S3, "\n"
__label_11:
unless $I1 goto __label_10
WSubId_35(__ARG_1, __ARG_3)
__label_10: # endif
concat $S1, $S1, $S2
concat $S1, $S1, $S3
goto __label_5 # break
__label_4: # default
concat $S1, $S1, $S2
__label_5: # switch end
__label_1: # for iteration
$P1 = __ARG_1.'getchar'()
set $S2, $P1
goto __label_3
__label_2: # for end
new $P2, [ 'Winxed'; 'Compiler'; 'TokenQuoted' ]
getattribute $P3, __ARG_1, 'filename'
$P2.'TokenQuoted'($P3, __ARG_3, $S1)
set $P1, $P2
.return($P1)
.end # getquoted
.sub 'getsinglequoted' :subid('WSubId_41')
.param pmc __ARG_1
.param string __ARG_2
.param int __ARG_3
.const 'Sub' WSubId_35 = "WSubId_35"
set $S1, ""
null $S2
$P1 = __ARG_1.'getchar'()
set $S2, $P1
__label_3: # for condition
eq $S2, "'", __label_2
iseq $I1, $S2, ""
if $I1 goto __label_5
iseq $I1, $S2, "\n"
__label_5:
unless $I1 goto __label_4
WSubId_35(__ARG_1, __ARG_3)
__label_4: # endif
concat $S1, $S1, $S2
__label_1: # for iteration
$P1 = __ARG_1.'getchar'()
set $S2, $P1
goto __label_3
__label_2: # for end
new $P2, [ 'Winxed'; 'Compiler'; 'TokenSingleQuoted' ]
getattribute $P3, __ARG_1, 'filename'
$P2.'TokenSingleQuoted'($P3, __ARG_3, $S1)
set $P1, $P2
.return($P1)
.end # getsinglequoted
.sub 'getheredoc' :subid('WSubId_42')
.param pmc __ARG_1
.param string __ARG_2
.param int __ARG_3
.const 'Sub' WSubId_36 = "WSubId_36"
set $S1, ""
null $S2
$P1 = __ARG_1.'getchar'()
set $S2, $P1
__label_3: # for condition
eq $S2, "\n", __label_2
if $S2 == "" goto __label_6
if $S2 == "\r" goto __label_7
if $S2 == "\"" goto __label_8
if $S2 == "\\" goto __label_9
goto __label_4
__label_6: # case
WSubId_36(__ARG_1, __ARG_3)
__label_7: # case
goto __label_5 # break
__label_8: # case
__label_9: # case
concat $S1, $S1, "\\"
concat $S1, $S1, $S2
goto __label_5 # break
__label_4: # default
concat $S1, $S1, $S2
__label_5: # switch end
__label_1: # for iteration
$P1 = __ARG_1.'getchar'()
set $S2, $P1
goto __label_3
__label_2: # for end
concat $S5, $S1, ":>>"
set $S1, $S5
set $S3, ""
null $S4
__label_10: # do
set $S4, ""
$P1 = __ARG_1.'getchar'()
set $S2, $P1
__label_15: # for condition
eq $S2, "\n", __label_14
if $S2 == "" goto __label_18
if $S2 == "\r" goto __label_19
if $S2 == "\"" goto __label_20
if $S2 == "\\" goto __label_21
goto __label_16
__label_18: # case
WSubId_36(__ARG_1, __ARG_3)
__label_19: # case
goto __label_17 # break
__label_20: # case
__label_21: # case
concat $S4, $S4, "\\"
concat $S4, $S4, $S2
goto __label_17 # break
__label_16: # default
concat $S4, $S4, $S2
__label_17: # switch end
__label_13: # for iteration
$P1 = __ARG_1.'getchar'()
set $S2, $P1
goto __label_15
__label_14: # for end
eq $S4, $S1, __label_22
concat $S3, $S3, $S4
concat $S3, $S3, "\\n"
__label_22: # endif
__label_12: # continue
ne $S4, $S1, __label_10
__label_11: # enddo
new $P2, [ 'Winxed'; 'Compiler'; 'TokenQuoted' ]
getattribute $P3, __ARG_1, 'filename'
$P2.'TokenQuoted'($P3, __ARG_3, $S3)
set $P1, $P2
.return($P1)
.end # getheredoc
.sub 'getident' :subid('WSubId_38')
.param pmc __ARG_1
.param string __ARG_2
.param int __ARG_3
set $S1, __ARG_2
null $S2
$P1 = __ARG_1.'getchar'()
set $S2, $P1
__label_3: # for condition
set $S3, $S2
index $I2, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$0123456789", $S3
isgt $I1, $I2, -1
__label_4:
unless $I1 goto __label_2
concat $S1, $S1, $S2
__label_1: # for iteration
$P1 = __ARG_1.'getchar'()
set $S2, $P1
goto __label_3
__label_2: # for end
__ARG_1.'ungetchar'($S2)
new $P2, [ 'Winxed'; 'Compiler'; 'TokenIdentifier' ]
getattribute $P3, __ARG_1, 'filename'
$P2.'TokenIdentifier'($P3, __ARG_3, $S1)
set $P1, $P2
.return($P1)
.end # getident
.sub 'getnumber' :subid('WSubId_46')
.param pmc __ARG_1
.param string __ARG_2
.param int __ARG_3
getattribute $P1, __ARG_1, 'filename'
$P2 = __ARG_1.'getchar'()
null $S1
if_null $P2, __label_1
set $S1, $P2
__label_1:
ne __ARG_2, "0", __label_2
iseq $I5, $S1, "x"
if $I5 goto __label_3
iseq $I5, $S1, "X"
__label_3:
unless $I5 goto __label_2
null $I1
null $I2
$P2 = __ARG_1.'getchar'()
set $S1, $P2
__label_6: # for condition
set $S3, $S1
index $I4, "0123456789abcdef0123456789ABCDEF", $S3
lt $I4, 0, __label_8
mod $I4, $I4, 16
__label_8: # endif
set $I2, $I4
__label_7:
lt $I2, 0, __label_5
mul $I5, $I1, 16
add $I1, $I5, $I2
__label_4: # for iteration
$P2 = __ARG_1.'getchar'()
set $S1, $P2
goto __label_6
__label_5: # for end
__ARG_1.'ungetchar'($S1)
new $P3, [ 'Winxed'; 'Compiler'; 'TokenInteger' ]
$P3.'TokenInteger'($P1, __ARG_3, $I1)
set $P2, $P3
.return($P2)
__label_2: # endif
set $S2, __ARG_2
__label_11: # for condition
set $S4, $S1
index $I5, "0123456789", $S4
isgt $I6, $I5, -1
__label_12:
unless $I6 goto __label_10
concat $S2, $S2, $S1
__label_9: # for iteration
$P2 = __ARG_1.'getchar'()
set $S1, $P2
goto __label_11
__label_10: # for end
null $I3
ne $S1, ".", __label_13
set $I3, 1
__label_14: # do
concat $S2, $S2, $S1
$P2 = __ARG_1.'getchar'()
set $S1, $P2
__label_16: # continue
set $S5, $S1
index $I5, "0123456789", $S5
isgt $I7, $I5, -1
__label_17:
if $I7 goto __label_14
__label_15: # enddo
__label_13: # endif
iseq $I5, $S1, "e"
if $I5 goto __label_19
iseq $I5, $S1, "E"
__label_19:
unless $I5 goto __label_18
set $I3, 1
concat $S2, $S2, "E"
$P2 = __ARG_1.'getchar'()
set $S1, $P2
iseq $I5, $S1, "+"
if $I5 goto __label_21
iseq $I5, $S1, "-"
__label_21:
unless $I5 goto __label_20
concat $S2, $S2, $S1
$P2 = __ARG_1.'getchar'()
set $S1, $P2
__label_20: # endif
__label_24: # for condition
set $S6, $S1
index $I5, "0123456789", $S6
isgt $I8, $I5, -1
__label_25:
unless $I8 goto __label_23
concat $S2, $S2, $S1
__label_22: # for iteration
$P2 = __ARG_1.'getchar'()
set $S1, $P2
goto __label_24
__label_23: # for end
__label_18: # endif
__ARG_1.'ungetchar'($S1)
unless $I3 goto __label_26
new $P3, [ 'Winxed'; 'Compiler'; 'TokenFloat' ]
$P3.'TokenFloat'($P1, __ARG_3, $S2)
set $P2, $P3
.return($P2)
goto __label_27
__label_26: # else
new $P5, [ 'Winxed'; 'Compiler'; 'TokenInteger' ]
$P5.'TokenInteger'($P1, __ARG_3, $S2)
set $P4, $P5
.return($P4)
__label_27: # endif
.end # getnumber
.sub 'getlinecomment' :subid('WSubId_43')
.param pmc __ARG_1
.param string __ARG_2
.param int __ARG_3
null $S1
__label_1: # do
$P1 = __ARG_1.'getchar'()
set $S1, $P1
__label_3: # continue
isne $I1, $S1, ""
unless $I1 goto __label_4
isne $I1, $S1, "\n"
__label_4:
if $I1 goto __label_1
__label_2: # enddo
new $P2, [ 'Winxed'; 'Compiler'; 'TokenComment' ]
getattribute $P3, __ARG_1, 'filename'
$P2.'TokenComment'($P3, __ARG_3)
set $P1, $P2
.return($P1)
.end # getlinecomment
.sub 'getcomment' :subid('WSubId_44')
.param pmc __ARG_1
.param string __ARG_2
.param int __ARG_3
.const 'Sub' WSubId_37 = "WSubId_37"
$P1 = __ARG_1.'getchar'()
null $S1
if_null $P1, __label_1
set $S1, $P1
__label_1:
__label_2: # do
__label_6: # while
eq $S1, "", __label_5
eq $S1, "*", __label_5
$P1 = __ARG_1.'getchar'()
set $S1, $P1
goto __label_6
__label_5: # endwhile
ne $S1, "", __label_7
WSubId_37(__ARG_1, __ARG_3)
__label_7: # endif
$P1 = __ARG_1.'getchar'()
set $S1, $P1
ne $S1, "", __label_8
WSubId_37(__ARG_1, __ARG_3)
__label_8: # endif
__label_4: # continue
ne $S1, "/", __label_2
__label_3: # enddo
new $P2, [ 'Winxed'; 'Compiler'; 'TokenComment' ]
getattribute $P3, __ARG_1, 'filename'
$P2.'TokenComment'($P3, __ARG_3)
set $P1, $P2
.return($P1)
.end # getcomment
.sub 'getop' :subid('WSubId_39')
.param pmc __ARG_1
.param string __ARG_2
.param int __ARG_3
set $S1, __ARG_2
new $P2, [ 'Winxed'; 'Compiler'; 'TokenOp' ]
getattribute $P3, __ARG_1, 'filename'
$P2.'TokenOp'($P3, __ARG_3, $S1)
set $P1, $P2
.return($P1)
.end # getop
.namespace [ 'Winxed'; 'Compiler'; 'Tokenizer' ]
.sub 'Tokenizer' :method
.param pmc __ARG_1
.param string __ARG_2
.param int __ARG_3
.const 'Sub' WSubId_38 = "WSubId_38"
.const 'Sub' WSubId_39 = "WSubId_39"
.const 'Sub' WSubId_40 = "WSubId_40"
.const 'Sub' WSubId_41 = "WSubId_41"
.const 'Sub' WSubId_42 = "WSubId_42"
.const 'Sub' WSubId_43 = "WSubId_43"
.const 'Sub' WSubId_44 = "WSubId_44"
not $I1, __ARG_3
new $P3, [ 'Boolean' ], $I1
setattribute self, 'warnings', $P3
setattribute self, 'h', __ARG_1
box $P2, ""
setattribute self, 'pending', $P2
root_new $P3, ['parrot';'ResizablePMCArray']
setattribute self, 'stacked', $P3
box $P2, __ARG_2
setattribute self, 'filename', $P2
box $P2, 1
setattribute self, 'line', $P2
root_new $P1, ['parrot';'Hash']
root_new $P2, ['parrot';'Hash']
$P2[""] = WSubId_38
$P2["{"] = WSubId_39
$P1["$"] = $P2
$P1["\""] = WSubId_40
$P1["'"] = WSubId_41
root_new $P3, ['parrot';'Hash']
root_new $P4, ['parrot';'Hash']
$P4[""] = WSubId_39
$P4["="] = WSubId_39
$P3["="] = $P4
$P3[":"] = WSubId_39
$P1["="] = $P3
root_new $P5, ['parrot';'Hash']
$P5["+"] = WSubId_39
$P5["="] = WSubId_39
$P1["+"] = $P5
root_new $P6, ['parrot';'Hash']
$P6["-"] = WSubId_39
$P6["="] = WSubId_39
$P1["-"] = $P6
root_new $P7, ['parrot';'Hash']
$P7["="] = WSubId_39
$P1["*"] = $P7
root_new $P8, ['parrot';'Hash']
$P8["|"] = WSubId_39
$P1["|"] = $P8
root_new $P9, ['parrot';'Hash']
$P9["&"] = WSubId_39
$P1["&"] = $P9
root_new $P10, ['parrot';'Hash']
root_new $P11, ['parrot';'Hash']
$P11[""] = WSubId_39
$P11[":"] = WSubId_42
$P10["<"] = $P11
$P10["="] = WSubId_39
$P1["<"] = $P10
root_new $P12, ['parrot';'Hash']
root_new $P13, ['parrot';'Hash']
$P13[""] = WSubId_39
$P13[">"] = WSubId_39
$P12[">"] = $P13
$P12["="] = WSubId_39
$P1[">"] = $P12
root_new $P14, ['parrot';'Hash']
root_new $P15, ['parrot';'Hash']
$P15[""] = WSubId_39
$P15["="] = WSubId_39
$P14["="] = $P15
$P1["!"] = $P14
root_new $P16, ['parrot';'Hash']
$P16["%"] = WSubId_39
$P16["="] = WSubId_39
$P1["%"] = $P16
root_new $P17, ['parrot';'Hash']
$P17["="] = WSubId_39
$P17["/"] = WSubId_43
$P17["*"] = WSubId_44
$P1["/"] = $P17
$P1["#"] = WSubId_43
setattribute self, 'select', $P1
.end # Tokenizer
.sub 'warn' :method
.param string __ARG_1
.param pmc __ARG_2 :optional
.const 'Sub' WSubId_45 = "WSubId_45"
getattribute $P1, self, 'warnings'
if_null $P1, __label_1
unless $P1 goto __label_1
WSubId_45(__ARG_1, __ARG_2)
__label_1: # endif
.end # warn
.sub 'getchar' :method
getattribute $P1, self, 'pending'
null $S1
if_null $P1, __label_1
set $S1, $P1
__label_1:
eq $S1, "", __label_2
assign $P1, ""
goto __label_3
__label_2: # else
getattribute $P2, self, 'h'
$P3 = $P2.'read'(1)
set $S1, $P3
ne $S1, "\n", __label_4
getattribute $P3, self, 'line'
inc $P3
__label_4: # endif
__label_3: # endif
.return($S1)
.end # getchar
.sub 'ungetchar' :method
.param string __ARG_1
getattribute $P1, self, 'pending'
assign $P1, __ARG_1
.end # ungetchar
.sub 'get_token' :method
.const 'Sub' WSubId_38 = "WSubId_38"
.const 'Sub' WSubId_46 = "WSubId_46"
.const 'Sub' WSubId_39 = "WSubId_39"
getattribute $P3, self, 'stacked'
if_null $P3, __label_1
unless $P3 goto __label_1
getattribute $P4, self, 'stacked'
.tailcall $P4.'pop'()
__label_1: # endif
$P3 = self.'getchar'()
null $S1
if_null $P3, __label_2
set $S1, $P3
__label_2:
__label_4: # while
set $S3, $S1
iseq $I2, $S3, " "
if $I2 goto __label_8
iseq $I2, $S3, "\n"
__label_8:
if $I2 goto __label_7
iseq $I2, $S3, "\t"
__label_7:
if $I2 goto __label_6
iseq $I2, $S3, "\r"
__label_6:
__label_5:
unless $I2 goto __label_3
$P3 = self.'getchar'()
set $S1, $P3
goto __label_4
__label_3: # endwhile
getattribute $P3, self, 'line'
set $I1, $P3
ne $S1, "", __label_9
new $P4, [ 'Winxed'; 'Compiler'; 'TokenEof' ]
getattribute $P5, self, 'filename'
$P4.'TokenEof'($P5)
set $P3, $P4
.return($P3)
__label_9: # endif
set $S4, $S1
index $I4, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_", $S4
isgt $I3, $I4, -1
__label_11:
unless $I3 goto __label_10
.tailcall WSubId_38(self, $S1, $I1)
__label_10: # endif
set $S5, $S1
index $I4, "0123456789", $S5
isgt $I5, $I4, -1
__label_13:
unless $I5 goto __label_12
.tailcall WSubId_46(self, $S1, $I1)
__label_12: # endif
set $S2, $S1
getattribute $P1, self, 'select'
$P2 = $P1[$S1]
__label_15: # while
if_null $P2, __label_14
isa $I4, $P2, "Hash"
unless $I4 goto __label_14
$P3 = self.'getchar'()
set $S1, $P3
set $P1, $P2
$P2 = $P1[$S1]
unless_null $P2, __label_16
self.'ungetchar'($S1)
$P2 = $P1[""]
goto __label_17
__label_16: # else
concat $S2, $S2, $S1
__label_17: # endif
goto __label_15
__label_14: # endwhile
if_null $P2, __label_19
$P3 = $P2(self, $S2, $I1)
goto __label_18
__label_19:
$P4 = WSubId_39(self, $S2, $I1)
set $P3, $P4
__label_18:
.return($P3)
.end # get_token
.sub 'get' :method
.param int __ARG_1 :optional
$P1 = self.'get_token'()
__label_2: # while
$P2 = $P1.'iseof'()
if $P2 goto __label_1
if __ARG_1 goto __label_1
$P3 = $P1.'iscomment'()
unless $P3 goto __label_1
$P1 = self.'get_token'()
goto __label_2
__label_1: # endwhile
.return($P1)
.end # get
.sub 'unget' :method
.param pmc __ARG_1
getattribute $P1, self, 'stacked'
push $P1, __ARG_1
.end # unget
.sub Winxed_class_init :anon :load :init
newclass $P0, [ 'Winxed'; 'Compiler'; 'Tokenizer' ]
addattribute $P0, 'warnings'
addattribute $P0, 'h'
addattribute $P0, 'pending'
addattribute $P0, 'select'
addattribute $P0, 'stacked'
addattribute $P0, 'filename'
addattribute $P0, 'line'
.end
.namespace [ 'Winxed'; 'Compiler' ]
.sub 'typetoregcheck' :subid('WSubId_136')
.param string __ARG_1
if __ARG_1 == "int" goto __label_3
if __ARG_1 == "float" goto __label_4
if __ARG_1 == "string" goto __label_5
if __ARG_1 == "var" goto __label_6
goto __label_1
__label_3: # case
.return("I")
__label_4: # case
.return("N")
__label_5: # case
.return("S")
__label_6: # case
.return("P")
__label_1: # default
.return("")
__label_2: # switch end
.end # typetoregcheck
.sub 'typetopirname' :subid('WSubId_144')
.param string __ARG_1
.const 'Sub' WSubId_33 = "WSubId_33"
if_null __ARG_1, __label_1
length $I1, __ARG_1
ne $I1, 1, __label_1
ord $I1, __ARG_1
if $I1 == 73 goto __label_3
if $I1 == 78 goto __label_4
if $I1 == 83 goto __label_5
if $I1 == 80 goto __label_6
goto __label_1
__label_3: # case
.return("int")
__label_4: # case
.return("num")
__label_5: # case
.return("string")
__label_6: # case
.return("pmc")
__label_1: # default
WSubId_33("Invalid reg type")
__label_2: # switch end
.end # typetopirname
.namespace [ 'Winxed'; 'Compiler'; 'Emit' ]
.sub 'Emit' :method
.param pmc __ARG_1
.param int __ARG_2
setattribute self, 'handle', __ARG_1
box $P1, ""
setattribute self, 'file', $P1
box $P1, 0
setattribute self, 'line', $P1
box $P1, 0
setattribute self, 'pendingf', $P1
box $P1, 0
setattribute self, 'pendingl', $P1
not $I1, __ARG_2
new $P2, [ 'Boolean' ], $I1
setattribute self, 'warnings', $P2
.end # Emit
.sub 'setDebug' :method
box $P1, 1
setattribute self, 'debug', $P1
.end # setDebug
.sub 'getDebug' :method
getattribute $P1, self, 'debug'
isnull $I1, $P1
not $I1
.return($I1)
.end # getDebug
.sub 'disable_annotations' :method
box $P1, 1
setattribute self, 'noan', $P1
.end # disable_annotations
.sub 'close' :method
null $P1
setattribute self, 'handle', $P1
.end # close
.sub 'warn' :method
.param string __ARG_1
.param pmc __ARG_2 :optional
.const 'Sub' WSubId_45 = "WSubId_45"
getattribute $P1, self, 'warnings'
if_null $P1, __label_1
unless $P1 goto __label_1
WSubId_45(__ARG_1, __ARG_2)
__label_1: # endif
.end # warn
.sub 'updateannot' :method
getattribute $P1, self, 'pendingf'
if_null $P1, __label_1
unless $P1 goto __label_1
getattribute $P2, self, 'handle'
root_new $P3, ['parrot';'ResizablePMCArray']
assign $P3, 3
$P3[0] = ".annotate 'file', '"
getattribute $P4, self, 'file'
$P3[1] = $P4
$P3[2] = "'\n"
join $S1, "", $P3
$P2.'print'($S1)
getattribute $P1, self, 'pendingf'
assign $P1, 0
__label_1: # endif
getattribute $P1, self, 'pendingl'
if_null $P1, __label_2
unless $P1 goto __label_2
getattribute $P2, self, 'handle'
root_new $P3, ['parrot';'ResizablePMCArray']
assign $P3, 3
$P3[0] = ".annotate 'line', "
getattribute $P4, self, 'line'
$P3[1] = $P4
$P3[2] = "\n"
join $S1, "", $P3
$P2.'print'($S1)
getattribute $P1, self, 'pendingl'
assign $P1, 0
__label_2: # endif
.end # updateannot
.sub 'vprint' :method
.param pmc __ARG_1
.const 'Sub' WSubId_7 = "WSubId_7"
set $P1, __ARG_1
getattribute $P4, self, 'handle'
$P2 = WSubId_7($P4, "print")
if_null $P1, __label_3
iter $P5, $P1
set $P5, 0
__label_2: # for iteration
unless $P5 goto __label_3
shift $P3, $P5
$P2($P3)
goto __label_2
__label_3: # endfor
__label_1:
.end # vprint
.sub 'print' :method
.param pmc __ARG_1 :slurpy
self.'updateannot'()
self.'vprint'(__ARG_1)
.end # print
.sub 'say' :method
.param pmc __ARG_1 :slurpy
self.'updateannot'()
self.'vprint'(__ARG_1)
getattribute $P1, self, 'handle'
$P1.'print'("\n")
.end # say
.sub 'annotate' :method
.param pmc __ARG_1
getattribute $P3, self, 'noan'
unless_null $P3, __label_1
getattribute $P1, self, 'file'
getattribute $P2, self, 'line'
getattribute $P3, __ARG_1, 'file'
null $S1
if_null $P3, __label_2
set $S1, $P3
__label_2:
getattribute $P3, __ARG_1, 'line'
set $I1, $P3
set $S2, $P1
eq $S2, $S1, __label_3
assign $P1, $S1
getattribute $P3, self, 'pendingf'
assign $P3, 1
assign $P2, 0
__label_3: # endif
set $I2, $P2
eq $I2, $I1, __label_4
assign $P2, $I1
getattribute $P3, self, 'pendingl'
assign $P3, 1
__label_4: # endif
__label_1: # endif
.end # annotate
.sub 'comment' :method
.param pmc __ARG_1 :slurpy
self.'updateannot'()
getattribute $P1, self, 'handle'
join $S1, "", __ARG_1
concat $S2, "# ", $S1
concat $S2, $S2, "\n"
$P1.'print'($S2)
.end # comment
.sub 'emitlabel' :method
.param string __ARG_1
.param string __ARG_2 :optional
getattribute $P1, self, 'handle'
$P1.'print'(" ")
$P1.'print'(__ARG_1)
$P1.'print'(":")
if_null __ARG_2, __label_1
concat $S1, " # ", __ARG_2
$P1.'print'($S1)
__label_1: # endif
$P1.'print'("\n")
.end # emitlabel
.sub 'emitgoto' :method
.param string __ARG_1
.param string __ARG_2 :optional
getattribute $P1, self, 'handle'
$P1.'print'(" goto ")
$P1.'print'(__ARG_1)
if_null __ARG_2, __label_1
concat $S1, " # ", __ARG_2
$P1.'print'($S1)
__label_1: # endif
$P1.'print'("\n")
.end # emitgoto
.sub 'emitarg1' :method
.param string __ARG_1
.param string __ARG_2
self.'say'(" ", __ARG_1, " ", __ARG_2)
.end # emitarg1
.sub 'emitarg2' :method
.param string __ARG_1
.param string __ARG_2
.param string __ARG_3
self.'say'(" ", __ARG_1, " ", __ARG_2, ", ", __ARG_3)
.end # emitarg2
.sub 'emitarg3' :method
.param string __ARG_1
.param string __ARG_2
.param string __ARG_3
.param string __ARG_4
self.'say'(" ", __ARG_1, " ", __ARG_2, ", ", __ARG_3, ", ", __ARG_4)
.end # emitarg3
.sub 'emitcompare' :method
.param string __ARG_1
.param string __ARG_2
.param string __ARG_3
.param string __ARG_4
self.'say'(" ", __ARG_1, " ", __ARG_2, ", ", __ARG_3, ", ", __ARG_4)
.end # emitcompare
.sub 'emitif' :method
.param string __ARG_1
.param string __ARG_2
self.'say'(" if ", __ARG_1, " goto ", __ARG_2)
.end # emitif
.sub 'emitunless' :method
.param string __ARG_1
.param string __ARG_2
self.'say'(" unless ", __ARG_1, " goto ", __ARG_2)
.end # emitunless
.sub 'emitif_null' :method
.param string __ARG_1
.param string __ARG_2
self.'say'(" if_null ", __ARG_1, ", ", __ARG_2)
.end # emitif_null
.sub 'emitunless_null' :method
.param string __ARG_1
.param string __ARG_2
self.'say'(" unless_null ", __ARG_1, ", ", __ARG_2)
.end # emitunless_null
.sub 'emitnull' :method
.param string __ARG_1
self.'say'(" null ", __ARG_1)
.end # emitnull
.sub 'emitinc' :method
.param string __ARG_1
self.'say'(" inc ", __ARG_1)
.end # emitinc
.sub 'emitdec' :method
.param string __ARG_1
self.'say'(" dec ", __ARG_1)
.end # emitdec
.sub 'emitset' :method
.param string __ARG_1
.param string __ARG_2
self.'say'(" set ", __ARG_1, ", ", __ARG_2)
.end # emitset
.sub 'emitassign' :method
.param string __ARG_1
.param string __ARG_2
self.'say'(" assign ", __ARG_1, ", ", __ARG_2)
.end # emitassign
.sub 'emitbox' :method
.param string __ARG_1
.param string __ARG_2
self.'say'(" box ", __ARG_1, ", ", __ARG_2)
.end # emitbox
.sub 'emitunbox' :method
.param string __ARG_1
.param string __ARG_2
self.'say'(" unbox ", __ARG_1, ", ", __ARG_2)
.end # emitunbox
.sub 'emitbinop' :method
.param string __ARG_1
.param string __ARG_2
.param string __ARG_3
.param string __ARG_4
self.'say'(" ", __ARG_1, " ", __ARG_2, ", ", __ARG_3, ", ", __ARG_4)
.end # emitbinop
.sub 'emitaddto' :method
.param string __ARG_1
.param string __ARG_2
self.'say'(" add ", __ARG_1, ", ", __ARG_2)
.end # emitaddto
.sub 'emitsubto' :method
.param string __ARG_1
.param string __ARG_2
self.'say'(" sub ", __ARG_1, ", ", __ARG_2)
.end # emitsubto
.sub 'emitadd' :method
.param string __ARG_1
.param string __ARG_2
.param string __ARG_3
self.'say'(" add ", __ARG_1, ", ", __ARG_2, ", ", __ARG_3)
.end # emitadd
.sub 'emitsub' :method
.param string __ARG_1
.param string __ARG_2
.param string __ARG_3
self.'say'(" sub ", __ARG_1, ", ", __ARG_2, ", ", __ARG_3)
.end # emitsub
.sub 'emitmul' :method
.param string __ARG_1
.param string __ARG_2
.param string __ARG_3
self.'say'(" mul ", __ARG_1, ", ", __ARG_2, ", ", __ARG_3)
.end # emitmul
.sub 'emitdiv' :method
.param string __ARG_1
.param string __ARG_2
.param string __ARG_3
self.'say'(" div ", __ARG_1, ", ", __ARG_2, ", ", __ARG_3)
.end # emitdiv
.sub 'emitconcat1' :method
.param string __ARG_1
.param string __ARG_2
self.'say'(" concat ", __ARG_1, ", ", __ARG_1, ", ", __ARG_2)
.end # emitconcat1
.sub 'emitconcat' :method
.param string __ARG_1
.param string __ARG_2
.param string __ARG_3
self.'say'(" concat ", __ARG_1, ", ", __ARG_2, ", ", __ARG_3)
.end # emitconcat
.sub 'emitprint' :method
.param string __ARG_1
self.'say'(" print ", __ARG_1)
.end # emitprint
.sub 'emitsay' :method
.param string __ARG_1
self.'say'(" say ", __ARG_1)
.end # emitsay
.sub 'emitget_hll_namespace' :method
.param string __ARG_1
.param string __ARG_2
concat $S1, ", ", __ARG_2
self.'say'(" get_hll_namespace ", __ARG_1, $S1)
.end # emitget_hll_namespace
.sub 'emitget_root_namespace' :method
.param string __ARG_1
.param string __ARG_2
concat $S1, ", ", __ARG_2
self.'say'(" get_root_namespace ", __ARG_1, $S1)
.end # emitget_root_namespace
.sub 'emitget_hll_global' :method
.param string __ARG_1
.param string __ARG_2
.param string __ARG_3 :optional
self.'print'(" get_hll_global ", __ARG_1)
if_null __ARG_3, __label_1
self.'print'(", ", __ARG_3)
__label_1: # endif
self.'say'(", '", __ARG_2, "'")
.end # emitget_hll_global
.sub 'emitget_root_global' :method
.param string __ARG_1
.param string __ARG_2
.param string __ARG_3 :optional
self.'print'(" get_root_global ", __ARG_1)
if_null __ARG_3, __label_1
self.'print'(", ", __ARG_3)
__label_1: # endif
self.'say'(", '", __ARG_2, "'")
.end # emitget_root_global
.sub 'emitfind_lex' :method
.param string __ARG_1
.param string __ARG_2
self.'say'(" find_lex ", __ARG_1, ", ", __ARG_2)
.end # emitfind_lex
.sub 'emitstore_lex' :method
.param string __ARG_1
.param string __ARG_2
self.'say'(" store_lex ", __ARG_1, ", ", __ARG_2)
.end # emitstore_lex
.sub 'emitrepeat' :method
.param string __ARG_1
.param string __ARG_2
.param string __ARG_3
self.'say'(" repeat ", __ARG_1, ", ", __ARG_2, ", ", __ARG_3)
.end # emitrepeat
.sub Winxed_class_init :anon :load :init
newclass $P0, [ 'Winxed'; 'Compiler'; 'Emit' ]
addattribute $P0, 'handle'
addattribute $P0, 'file'
addattribute $P0, 'line'
addattribute $P0, 'pendingf'
addattribute $P0, 'pendingl'
addattribute $P0, 'debug'
addattribute $P0, 'noan'
addattribute $P0, 'warnings'
.end
.namespace [ 'Winxed'; 'Compiler' ]
.sub 'integerValue' :subid('WSubId_47')
.param pmc __ARG_1
.param pmc __ARG_2
.param int __ARG_3
new $P2, [ 'Winxed'; 'Compiler'; 'IntegerLiteral' ]
$P2.'IntegerLiteral'(__ARG_1, __ARG_2, __ARG_3)
set $P1, $P2
.return($P1)
.end # integerValue
.sub 'floatValue' :subid('WSubId_100')
.param pmc __ARG_1
.param pmc __ARG_2
.param num __ARG_3
new $P2, [ 'Winxed'; 'Compiler'; 'TokenFloat' ]
getattribute $P3, __ARG_2, 'file'
getattribute $P4, __ARG_2, 'line'
$P2.'TokenFloat'($P3, $P4, __ARG_3)
set $P1, $P2
new $P3, [ 'Winxed'; 'Compiler'; 'FloatLiteral' ]
$P3.'FloatLiteral'(__ARG_1, $P1)
set $P2, $P3
.return($P2)
.end # floatValue
.sub 'stringQuotedValue' :subid('WSubId_50')
.param pmc __ARG_1
.param pmc __ARG_2
.param string __ARG_3
new $P2, [ 'Winxed'; 'Compiler'; 'TokenQuoted' ]
getattribute $P3, __ARG_2, 'file'
getattribute $P4, __ARG_2, 'line'
$P2.'TokenQuoted'($P3, $P4, __ARG_3)
set $P1, $P2
new $P3, [ 'Winxed'; 'Compiler'; 'StringLiteral' ]
$P3.'StringLiteral'(__ARG_1, $P1)
set $P2, $P3
.return($P2)
.end # stringQuotedValue
.sub 'floatAsString' :subid('WSubId_101')
.param num __ARG_1
set $S1, __ARG_1
box $P2, $S1
$P1 = $P2.'is_integer'($S1)
if_null $P1, __label_1
unless $P1 goto __label_1
concat $S1, $S1, ".0"
__label_1: # endif
.return($S1)
.end # floatAsString
.sub 'floatresult' :subid('WSubId_105')
.param string __ARG_1
.param string __ARG_2
iseq $I1, __ARG_1, "N"
unless $I1 goto __label_2
iseq $I1, __ARG_2, "N"
if $I1 goto __label_3
iseq $I1, __ARG_2, "I"
__label_3:
__label_2:
if $I1 goto __label_1
iseq $I1, __ARG_2, "N"
unless $I1 goto __label_4
iseq $I1, __ARG_1, "N"
if $I1 goto __label_5
iseq $I1, __ARG_1, "I"
__label_5:
__label_4:
__label_1:
.return($I1)
.end # floatresult
.sub 'createPredefConstInt' :subid('WSubId_155')
.param pmc __ARG_1
.param string __ARG_2
.param int __ARG_3
.const 'Sub' WSubId_47 = "WSubId_47"
new $P3, [ 'Winxed'; 'Compiler'; 'TokenIdentifier' ]
$P3.'TokenIdentifier'("__predefconst__", 0, __ARG_2)
set $P1, $P3
$P2 = __ARG_1.'createconst'($P1, "I", 4)
$P3 = WSubId_47(__ARG_1, $P1, __ARG_3)
$P2.'setvalue'($P3)
.end # createPredefConstInt
.sub 'createPredefConstString' :subid('WSubId_148')
.param pmc __ARG_1
.param string __ARG_2
.param string __ARG_3
new $P3, [ 'Winxed'; 'Compiler'; 'TokenIdentifier' ]
$P3.'TokenIdentifier'("__predefconst__", 0, __ARG_2)
set $P1, $P3
$P2 = __ARG_1.'createconst'($P1, "S", 4)
new $P4, [ 'Winxed'; 'Compiler'; 'StringLiteral' ]
new $P6, [ 'Winxed'; 'Compiler'; 'TokenQuoted' ]
$P6.'TokenQuoted'("__predefconst__", 0, __ARG_3)
set $P5, $P6
$P4.'StringLiteral'(__ARG_1, $P5)
set $P3, $P4
$P2.'setvalue'($P3)
.end # createPredefConstString
.sub 'int_from_literal_arg1' :subid('WSubId_51')
.param pmc __ARG_1
.const 'Sub' WSubId_33 = "WSubId_33"
$P2 = __ARG_1[0]
getattribute $P1, $P2, 'arg'
$P2 = $P1.'getIntegerValue'()
set $I1, $P2
set $I2, $I1
__label_1:
.return($I2)
.end # int_from_literal_arg1
.sub 'string_from_literal_arg1' :subid('WSubId_49')
.param pmc __ARG_1
.const 'Sub' WSubId_33 = "WSubId_33"
$P2 = __ARG_1[0]
getattribute $P1, $P2, 'arg'
$P2 = $P1.'getStringValue'()
null $S1
if_null $P2, __label_2
set $S1, $P2
__label_2:
set $S2, $S1
__label_1:
.return($S2)
.end # string_from_literal_arg1
.namespace [ 'Winxed'; 'Compiler'; 'Builtin_frombody' ]
.sub 'Builtin_frombody' :method
.param string __ARG_1
.param string __ARG_2
.const 'Sub' WSubId_33 = "WSubId_33"
length $I3, __ARG_2
sub $I2, $I3, 1
substr $S1, __ARG_2, $I2, 1
ne $S1, "\n", __label_1
substr __ARG_2, __ARG_2, 0, $I2
__label_1: # endif
split $P1, "\n", __ARG_2
join $S1, "\n ", $P1
concat $S2, " ", $S1
set __ARG_2, $S2
box $P1, __ARG_2
setattribute self, 'body', $P1
box $P1, __ARG_1
setattribute self, 'typeresult', $P1
.end # Builtin_frombody
.sub 'invoke' :method :vtable
.param pmc __ARG_1
.param pmc __ARG_2
.param pmc __ARG_3
.param string __ARG_4
.param pmc __ARG_5
.const 'Sub' WSubId_28 = "WSubId_28"
.const 'Sub' WSubId_33 = "WSubId_33"
.const 'Sub' WSubId_48 = "WSubId_48"
getattribute $P1, self, 'typeresult'
null $S1
if_null $P1, __label_1
set $S1, $P1
__label_1:
ne $S1, "v", __label_2
if_null __ARG_4, __label_4
eq __ARG_4, "", __label_4
WSubId_28("using return value from void builtin", __ARG_3)
__label_4: # endif
goto __label_3
__label_2: # else
isnull $I1, __ARG_4
if $I1 goto __label_6
iseq $I1, __ARG_4, ""
__label_6:
unless $I1 goto __label_5
WSubId_33("Bad result in non void builtin")
__label_5: # endif
__label_3: # endif
__ARG_1.'annotate'(__ARG_3)
getattribute $P2, self, 'body'
$P1 = WSubId_48($P2, __ARG_4, __ARG_5 :flat)
__ARG_1.'say'($P1)
.end # invoke
.sub Winxed_class_init :anon :load :init
newclass $P0, [ 'Winxed'; 'Compiler'; 'Builtin_frombody' ]
addattribute $P0, 'body'
addattribute $P0, 'typeresult'
.end
.namespace [ 'Winxed'; 'Compiler'; 'BuiltinBase' ]
.sub 'BuiltinBase' :method
.param string __ARG_1
.param pmc __ARG_2
.param string __ARG_3
.param string __ARG_4
.param string __ARG_5
.param string __ARG_6
.param string __ARG_7
.const 'Sub' WSubId_33 = "WSubId_33"
box $P1, __ARG_1
setattribute self, 'name', $P1
if_null __ARG_2, __label_1
isa $I2, __ARG_2, "String"
unless $I2 goto __label_1
new $P3, [ 'Winxed'; 'Compiler'; 'Builtin_frombody' ]
$P3.'Builtin_frombody'(__ARG_3, __ARG_2)
set $P2, $P3
setattribute self, 'body', $P2
goto __label_2
__label_1: # else
setattribute self, 'body', __ARG_2
__label_2: # endif
box $P1, __ARG_3
setattribute self, 'typeresult', $P1
null $I1
if_null __ARG_4, __label_3
box $P1, __ARG_4
setattribute self, 'type0', $P1
if_null __ARG_4, __label_4
length $I2, __ARG_4
ne $I2, 1, __label_4
ord $I2, __ARG_4
if $I2 == 42 goto __label_6
if $I2 == 33 goto __label_7
goto __label_4
__label_6: # case
set $I1, -1
goto __label_5 # break
__label_7: # case
set $I1, -2
if_null __ARG_5, __label_8
concat $S1, "Invalid builtin '", __ARG_1
concat $S1, $S1, "'"
WSubId_33($S1)
__label_8: # endif
goto __label_5 # break
__label_4: # default
set $I1, 1
if_null __ARG_5, __label_9
box $P1, __ARG_5
setattribute self, 'type1', $P1
inc $I1
__label_9: # endif
if_null __ARG_6, __label_10
box $P1, __ARG_6
setattribute self, 'type2', $P1
inc $I1
__label_10: # endif
if_null __ARG_7, __label_11
box $P1, __ARG_7
setattribute self, 'type3', $P1
inc $I1
__label_11: # endif
__label_5: # switch end
__label_3: # endif
box $P1, $I1
setattribute self, 'nparams', $P1
.end # BuiltinBase
.sub 'isreplaceexpr' :method
.return(0)
.end # isreplaceexpr
.sub 'iscompileevaluable' :method
.return(0)
.end # iscompileevaluable
.sub 'name' :method
getattribute $P1, self, 'name'
set $S1, $P1
.return($S1)
.end # name
.sub 'result' :method
getattribute $P1, self, 'typeresult'
.return($P1)
.end # result
.sub 'params' :method
getattribute $P1, self, 'nparams'
.return($P1)
.end # params
.sub 'paramtype' :method
.param int __ARG_1
.const 'Sub' WSubId_33 = "WSubId_33"
null $S1
if __ARG_1 == 0 goto __label_3
if __ARG_1 == 1 goto __label_4
if __ARG_1 == 2 goto __label_5
if __ARG_1 == 3 goto __label_6
goto __label_1
__label_3: # case
getattribute $P1, self, 'type0'
set $S1, $P1
goto __label_2 # break
__label_4: # case
getattribute $P2, self, 'type1'
set $S1, $P2
goto __label_2 # break
__label_5: # case
getattribute $P3, self, 'type2'
set $S1, $P3
goto __label_2 # break
__label_6: # case
getattribute $P4, self, 'type3'
set $S1, $P4
goto __label_2 # break
__label_1: # default
WSubId_33("Invalid builtin arg")
__label_2: # switch end
.return($S1)
.end # paramtype
.sub 'expand' :method
.param pmc __ARG_1
.param pmc __ARG_2
.param pmc __ARG_3
.param string __ARG_4
.param pmc __ARG_5
getattribute $P2, self, 'name'
null $S1
if_null $P2, __label_1
set $S1, $P2
__label_1:
$P2 = __ARG_1.'getDebug'()
if_null $P2, __label_2
unless $P2 goto __label_2
eq $S1, "__ASSERT__", __label_3
__ARG_1.'comment'("builtin ", $S1)
__label_3: # endif
__label_2: # endif
getattribute $P2, self, 'typeresult'
null $S2
if_null $P2, __label_4
set $S2, $P2
__label_4:
eq $S2, "v", __label_5
ne __ARG_4, "", __label_5
$P2 = __ARG_2.'tempreg'($S2)
set __ARG_4, $P2
__label_5: # endif
getattribute $P1, self, 'body'
$P1(__ARG_1, __ARG_2, __ARG_3, __ARG_4, __ARG_5)
.end # expand
.sub Winxed_class_init :anon :load :init
newclass $P0, [ 'Winxed'; 'Compiler'; 'BuiltinBase' ]
addattribute $P0, 'name'
addattribute $P0, 'body'
addattribute $P0, 'typeresult'
addattribute $P0, 'type0'
addattribute $P0, 'type1'
addattribute $P0, 'type2'
addattribute $P0, 'type3'
addattribute $P0, 'nparams'
.end
.namespace [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
.sub 'BuiltinFunction' :method
.param string __ARG_1
.param pmc __ARG_2
.param string __ARG_3
.param string __ARG_4 :optional
.param string __ARG_5 :optional
.param string __ARG_6 :optional
.param string __ARG_7 :optional
self.'BuiltinBase'(__ARG_1, __ARG_2, __ARG_3, __ARG_4, __ARG_5, __ARG_6, __ARG_7)
.end # BuiltinFunction
.sub Winxed_class_init :anon :load :init
newclass $P0, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
get_class $P1, [ 'Winxed'; 'Compiler'; 'BuiltinBase' ]
addparent $P0, $P1
.end
.namespace [ 'Winxed'; 'Compiler'; 'BuiltinFunctionEval' ]
.sub 'BuiltinFunctionEval' :method
.param string __ARG_1
.param pmc __ARG_2
.param pmc __ARG_3
.param string __ARG_4
.param string __ARG_5 :optional
.param string __ARG_6 :optional
.param string __ARG_7 :optional
.param string __ARG_8 :optional
self.'BuiltinBase'(__ARG_1, __ARG_3, __ARG_4, __ARG_5, __ARG_6, __ARG_7, __ARG_8)
setattribute self, 'evalfun', __ARG_2
.end # BuiltinFunctionEval
.sub 'iscompileevaluable' :method
.return(1)
.end # iscompileevaluable
.sub Winxed_class_init :anon :load :init
newclass $P0, [ 'Winxed'; 'Compiler'; 'BuiltinFunctionEval' ]
get_class $P1, [ 'Winxed'; 'Compiler'; 'BuiltinBase' ]
addparent $P0, $P1
addattribute $P0, 'evalfun'
.end
.namespace [ 'Winxed'; 'Compiler'; 'BuiltinExpr' ]
.sub 'BuiltinExpr' :method
.param string __ARG_1
.param pmc __ARG_2
.param string __ARG_3
.param string __ARG_4 :optional
.param string __ARG_5 :optional
.param string __ARG_6 :optional
.param string __ARG_7 :optional
null $P1
self.'BuiltinBase'(__ARG_1, $P1, __ARG_3, __ARG_4, __ARG_5, __ARG_6, __ARG_7)
setattribute self, 'exprfun', __ARG_2
.end # BuiltinExpr
.sub 'isreplaceexpr' :method
.return(1)
.end # isreplaceexpr
.sub 'replaceexpr' :method
.param pmc __ARG_1
.param pmc __ARG_2
.param pmc __ARG_3
getattribute $P1, self, 'exprfun'
.tailcall $P1(__ARG_1, __ARG_2, __ARG_3)
.end # replaceexpr
.sub Winxed_class_init :anon :load :init
newclass $P0, [ 'Winxed'; 'Compiler'; 'BuiltinExpr' ]
get_class $P1, [ 'Winxed'; 'Compiler'; 'BuiltinBase' ]
addparent $P0, $P1
addattribute $P0, 'exprfun'
.end
.namespace [ 'Winxed'; 'Compiler' ]
.sub 'Builtin_say' :subid('WSubId_69')
.param pmc __ARG_1
.param pmc __ARG_2
.param pmc __ARG_3
.param string __ARG_4
.param pmc __ARG_5
__ARG_1.'annotate'(__ARG_3)
elements $I3, __ARG_5
sub $I1, $I3, 1
lt $I1, 0, __label_1
null $I2
__label_5: # for condition
ge $I2, $I1, __label_4
$P1 = __ARG_5[$I2]
__ARG_1.'emitprint'($P1)
__label_3: # for iteration
inc $I2
goto __label_5
__label_4: # for end
$P1 = __ARG_5[$I1]
__ARG_1.'emitsay'($P1)
goto __label_2
__label_1: # else
__ARG_1.'emitsay'("''")
__label_2: # endif
.end # Builtin_say
.sub 'Builtin_cry' :subid('WSubId_70')
.param pmc __ARG_1
.param pmc __ARG_2
.param pmc __ARG_3
.param string __ARG_4
.param pmc __ARG_5
.const 'Sub' WSubId_48 = "WSubId_48"
.const 'Sub' WSubId_9 = "WSubId_9"
__ARG_1.'annotate'(__ARG_3)
set $P1, __ARG_5
root_new $P2, ['parrot';'ResizablePMCArray']
$P3 = WSubId_9(" print $P0, ")
if_null $P1, __label_3
iter $P7, $P1
set $P7, 0
__label_2: # for iteration
unless $P7 goto __label_3
shift $P4, $P7
$P8 = $P3($P4)
push $P2, $P8
goto __label_2
__label_3: # endfor
set $P6, $P2
__label_1:
set $P5, $P6
join $S1, "\n", $P5
$P5 = WSubId_48(" getstderr $P0\n%0\n print $P0, \"\\n\"\n", $S1)
__ARG_1.'say'($P5)
.end # Builtin_cry
.sub 'Builtin_print' :subid('WSubId_68')
.param pmc __ARG_1
.param pmc __ARG_2
.param pmc __ARG_3
.param string __ARG_4
.param pmc __ARG_5
.const 'Sub' WSubId_7 = "WSubId_7"
__ARG_1.'annotate'(__ARG_3)
set $P1, __ARG_5
$P2 = WSubId_7(__ARG_1, "emitprint")
if_null $P1, __label_3
iter $P4, $P1
set $P4, 0
__label_2: # for iteration
unless $P4 goto __label_3
shift $P3, $P4
$P2($P3)
goto __label_2
__label_3: # endfor
__label_1:
.end # Builtin_print
.sub 'Builtin_abs' :subid('WSubId_67')
.param pmc __ARG_1
.param pmc __ARG_2
.param pmc __ARG_3
.param string __ARG_4
.param pmc __ARG_5
$P1 = __ARG_5[0]
$P2 = $P1.'emit_get'(__ARG_1)
null $S1
if_null $P2, __label_1
set $S1, $P2
__label_1:
$P2 = $P1.'checkresult'()
set $S3, $P2
ne $S3, "S", __label_2
$P3 = __ARG_2.'tempreg'("N")
null $S2
if_null $P3, __label_4
set $S2, $P3
__label_4:
__ARG_1.'annotate'(__ARG_3)
__ARG_1.'emitset'($S2, $S1)
__ARG_1.'emitarg2'("abs", $S2, $S2)
__ARG_1.'emitset'(__ARG_4, $S2)
goto __label_3
__label_2: # else
__ARG_1.'annotate'(__ARG_3)
__ARG_1.'emitarg2'("abs", __ARG_4, $S1)
__label_3: # endif
.end # Builtin_abs
.sub 'Builtin_ASSERT' :subid('WSubId_71')
.param pmc __ARG_1
.param pmc __ARG_2
.param pmc __ARG_3
.param string __ARG_4
.param pmc __ARG_5
.const 'Sub' WSubId_48 = "WSubId_48"
$P3 = __ARG_1.'getDebug'()
if_null $P3, __label_1
unless $P3 goto __label_1
__ARG_1.'annotate'(__ARG_3)
$P3 = __ARG_2.'genlabel'()
null $S1
if_null $P3, __label_2
set $S1, $P3
__label_2:
$P1 = __ARG_5[0]
$P2 = $P1.'emit_getint'(__ARG_1)
__ARG_1.'emitif'($P2, $S1)
$P4 = __ARG_3.'filename'()
$P5 = __ARG_3.'linenum'()
$P3 = WSubId_48(" getstderr $P0\n print $P0, \"Assertion failed at '%0' line \"\n print $P0, %1\n print $P0, \"\\n\"\n exit 1\n", $P4, $P5)
__ARG_1.'print'($P3)
__ARG_1.'emitlabel'($S1)
__label_1: # endif
.end # Builtin_ASSERT
.sub 'Builtin_invoke' :subid('WSubId_72')
.param pmc __ARG_1
.param pmc __ARG_2
.param pmc __ARG_3
.param string __ARG_4
.param pmc __ARG_5
.const 'Sub' WSubId_28 = "WSubId_28"
$P1 = __ARG_5[0]
isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'CallExpr' ]
if $I1 goto __label_1
WSubId_28("invoke argument must be callable", __ARG_3)
__label_1: # endif
concat $S1, "(", __ARG_4
concat $S1, $S1, " :call_sig)"
$P1.'emit'(__ARG_1, $S1)
.end # Builtin_invoke
.sub 'builtineval_length' :subid('WSubId_57')
.param pmc __ARG_1
.param pmc __ARG_2
.param pmc __ARG_3
.const 'Sub' WSubId_49 = "WSubId_49"
.const 'Sub' WSubId_47 = "WSubId_47"
$P1 = WSubId_49(__ARG_3)
null $S1
if_null $P1, __label_1
set $S1, $P1
__label_1:
length $I1, $S1
.tailcall WSubId_47(__ARG_1, __ARG_2, $I1)
.end # builtineval_length
.sub 'builtineval_bytelength' :subid('WSubId_58')
.param pmc __ARG_1
.param pmc __ARG_2
.param pmc __ARG_3
.const 'Sub' WSubId_49 = "WSubId_49"
.const 'Sub' WSubId_47 = "WSubId_47"
$P1 = WSubId_49(__ARG_3)
null $S1
if_null $P1, __label_1
set $S1, $P1
__label_1:
bytelength $I1, $S1
.tailcall WSubId_47(__ARG_1, __ARG_2, $I1)
.end # builtineval_bytelength
.sub 'builtineval_ord' :subid('WSubId_60')
.param pmc __ARG_1
.param pmc __ARG_2
.param pmc __ARG_3
.const 'Sub' WSubId_47 = "WSubId_47"
elements $I1, __ARG_3
$P5 = __ARG_3[0]
getattribute $P1, $P5, 'arg'
set $P3, $P1
$P5 = $P3.'getStringValue'()
null $S2
if_null $P5, __label_2
set $S2, $P5
__label_2:
set $S1, $S2
__label_1:
null $I2
le $I1, 1, __label_3
$P5 = __ARG_3[1]
getattribute $P2, $P5, 'arg'
set $P4, $P2
$P5 = $P4.'getIntegerValue'()
set $I3, $P5
set $I2, $I3
__label_4:
__label_3: # endif
ord $I4, $S1, $I2
.tailcall WSubId_47(__ARG_1, __ARG_2, $I4)
.end # builtineval_ord
.sub 'builtineval_chr' :subid('WSubId_59')
.param pmc __ARG_1
.param pmc __ARG_2
.param pmc __ARG_3
.const 'Sub' WSubId_50 = "WSubId_50"
.const 'Sub' WSubId_51 = "WSubId_51"
$P1 = WSubId_51(__ARG_3)
set $I1, $P1
chr $S0, $I1
find_encoding $I0, "utf8"
trans_encoding $S1, $S0, $I0
.tailcall WSubId_50(__ARG_1, __ARG_2, $S1)
.end # builtineval_chr
.sub 'builtineval_substr' :subid('WSubId_61')
.param pmc __ARG_1
.param pmc __ARG_2
.param pmc __ARG_3
.const 'Sub' WSubId_50 = "WSubId_50"
elements $I1, __ARG_3
$P7 = __ARG_3[0]
getattribute $P1, $P7, 'arg'
$P7 = __ARG_3[1]
getattribute $P2, $P7, 'arg'
set $P4, $P1
$P7 = $P4.'getStringValue'()
null $S3
if_null $P7, __label_2
set $S3, $P7
__label_2:
set $S1, $S3
__label_1:
set $P5, $P2
$P7 = $P5.'getIntegerValue'()
set $I4, $P7
set $I2, $I4
__label_3:
null $S2
le $I1, 2, __label_4
$P7 = __ARG_3[2]
getattribute $P3, $P7, 'arg'
set $P6, $P3
$P7 = $P6.'getIntegerValue'()
set $I5, $P7
set $I3, $I5
__label_6:
substr $S2, $S1, $I2, $I3
goto __label_5
__label_4: # else
substr $S2, $S1, $I2
__label_5: # endif
.tailcall WSubId_50(__ARG_1, __ARG_2, $S2)
.end # builtineval_substr
.sub 'builtineval_indexof' :subid('WSubId_62')
.param pmc __ARG_1
.param pmc __ARG_2
.param pmc __ARG_3
.const 'Sub' WSubId_47 = "WSubId_47"
$P5 = __ARG_3[0]
getattribute $P1, $P5, 'arg'
$P5 = __ARG_3[1]
getattribute $P2, $P5, 'arg'
set $P3, $P1
$P5 = $P3.'getStringValue'()
null $S3
if_null $P5, __label_2
set $S3, $P5
__label_2:
set $S1, $S3
__label_1:
set $P4, $P2
$P5 = $P4.'getStringValue'()
null $S4
if_null $P5, __label_4
set $S4, $P5
__label_4:
set $S2, $S4
__label_3:
index $I1, $S1, $S2
.tailcall WSubId_47(__ARG_1, __ARG_2, $I1)
.end # builtineval_indexof
.sub 'builtineval_indexof_pos' :subid('WSubId_63')
.param pmc __ARG_1
.param pmc __ARG_2
.param pmc __ARG_3
.const 'Sub' WSubId_47 = "WSubId_47"
$P7 = __ARG_3[0]
getattribute $P1, $P7, 'arg'
$P7 = __ARG_3[1]
getattribute $P2, $P7, 'arg'
$P7 = __ARG_3[2]
getattribute $P3, $P7, 'arg'
set $P4, $P1
$P7 = $P4.'getStringValue'()
null $S3
if_null $P7, __label_2
set $S3, $P7
__label_2:
set $S1, $S3
__label_1:
set $P5, $P2
$P7 = $P5.'getStringValue'()
null $S4
if_null $P7, __label_4
set $S4, $P7
__label_4:
set $S2, $S4
__label_3:
$P7 = __ARG_3[2]
getattribute $P6, $P7, 'arg'
$P7 = $P6.'getIntegerValue'()
set $I2, $P7
set $I1, $I2
__label_5:
index $I3, $S1, $S2, $I1
.tailcall WSubId_47(__ARG_1, __ARG_2, $I3)
.end # builtineval_indexof_pos
.sub 'builtineval_upcase' :subid('WSubId_65')
.param pmc __ARG_1
.param pmc __ARG_2
.param pmc __ARG_3
.const 'Sub' WSubId_50 = "WSubId_50"
.const 'Sub' WSubId_49 = "WSubId_49"
$P1 = WSubId_49(__ARG_3)
set $S2, $P1
upcase $S1, $S2
.tailcall WSubId_50(__ARG_1, __ARG_2, $S1)
.end # builtineval_upcase
.sub 'builtineval_downcase' :subid('WSubId_66')
.param pmc __ARG_1
.param pmc __ARG_2
.param pmc __ARG_3
.const 'Sub' WSubId_50 = "WSubId_50"
.const 'Sub' WSubId_49 = "WSubId_49"
$P1 = WSubId_49(__ARG_3)
set $S2, $P1
downcase $S1, $S2
.tailcall WSubId_50(__ARG_1, __ARG_2, $S1)
.end # builtineval_downcase
.sub 'builtineval_escape' :subid('WSubId_64')
.param pmc __ARG_1
.param pmc __ARG_2
.param pmc __ARG_3
.const 'Sub' WSubId_50 = "WSubId_50"
.const 'Sub' WSubId_49 = "WSubId_49"
$P1 = WSubId_49(__ARG_3)
set $S3, $P1
escape $S2, $S3
escape $S1, $S2
.tailcall WSubId_50(__ARG_1, __ARG_2, $S1)
.end # builtineval_escape
.sub 'builtin_sleep' :subid('WSubId_56')
.param pmc __ARG_1
.param pmc __ARG_2
.param pmc __ARG_3
.param string __ARG_4
.param pmc __ARG_5
$P1 = __ARG_5[0]
null $S1
$P2 = $P1.'checkresult'()
null $S2
if_null $P2, __label_1
set $S2, $P2
__label_1:
if_null $S2, __label_2
length $I1, $S2
ne $I1, 1, __label_2
ord $I1, $S2
if $I1 == 73 goto __label_4
if $I1 == 78 goto __label_5
goto __label_2
__label_4: # case
$P2 = $P1.'emit_getint'(__ARG_1)
set $S1, $P2
goto __label_3 # break
__label_5: # case
$P3 = $P1.'emit_get'(__ARG_1)
set $S1, $P3
goto __label_3 # break
__label_2: # default
$P4 = $P1.'isnull'()
if_null $P4, __label_6
unless $P4 goto __label_6
set $S1, "0"
goto __label_7
__label_6: # else
$P5 = $P1.'emit_get'(__ARG_1)
null $S3
if_null $P5, __label_8
set $S3, $P5
__label_8:
set $S1, "$N0"
__ARG_1.'annotate'(__ARG_3)
__ARG_1.'emitset'($S1, $S3)
__label_7: # endif
__label_3: # switch end
__ARG_1.'annotate'(__ARG_3)
__ARG_1.'emitarg1'("sleep", $S1)
.end # builtin_sleep
.sub 'getbuiltins' :subid('WSubId_156')
.param pmc __ARG_1
.const 'Sub' WSubId_52 = "WSubId_52"
.const 'Sub' WSubId_53 = "WSubId_53"
.const 'Sub' WSubId_54 = "WSubId_54"
.const 'Sub' WSubId_55 = "WSubId_55"
.const 'Sub' WSubId_56 = "WSubId_56"
.const 'Sub' WSubId_57 = "WSubId_57"
.const 'Sub' WSubId_58 = "WSubId_58"
.const 'Sub' WSubId_59 = "WSubId_59"
.const 'Sub' WSubId_60 = "WSubId_60"
.const 'Sub' WSubId_61 = "WSubId_61"
.const 'Sub' WSubId_62 = "WSubId_62"
.const 'Sub' WSubId_63 = "WSubId_63"
.const 'Sub' WSubId_64 = "WSubId_64"
.const 'Sub' WSubId_65 = "WSubId_65"
.const 'Sub' WSubId_66 = "WSubId_66"
.const 'Sub' WSubId_67 = "WSubId_67"
.const 'Sub' WSubId_68 = "WSubId_68"
.const 'Sub' WSubId_69 = "WSubId_69"
.const 'Sub' WSubId_70 = "WSubId_70"
.const 'Sub' WSubId_71 = "WSubId_71"
.const 'Sub' WSubId_72 = "WSubId_72"
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinExpr' ]
$P2.'BuiltinExpr'("int", WSubId_52, "S", "!")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinExpr' ]
$P2.'BuiltinExpr'("float", WSubId_53, "S", "!")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinExpr' ]
$P2.'BuiltinExpr'("string", WSubId_54, "S", "!")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinExpr' ]
$P2.'BuiltinExpr'("var", WSubId_55, "P", "!")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("die", "die %1", "v", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("exit", "exit %1", "v", "I")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("time", "time %0", "I")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("floattime", "time %0", "N")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("sleep", WSubId_56, "v", "!")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("spawnw", "spawnw %0, %1", "I", "P")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("getstdin", "getstdin %0", "P")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("getstdout", "getstdout %0", "P")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("getstderr", "getstderr %0", "P")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("open", "root_new %0, [\"parrot\";\"FileHandle\"]\n%0.\"open\"(%1)\n", "P", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("open", "root_new %0, [\"parrot\";\"FileHandle\"]\n%0.\"open\"(%1,%2)\n", "P", "S", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("Error", "root_new %0, [\"parrot\";\"Exception\"]\n%0[\"message\"] = %1\n", "P", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("Error", "root_new %0, [\"parrot\";\"Exception\"]\n%0[\"message\"] = %1\n%0[\"severity\"] = %2\n", "P", "S", "I")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("Error", "root_new %0, [\"parrot\";\"Exception\"]\n%0[\"message\"] = %1\n%0[\"severity\"] = %2\n%0[\"type\"] = %3\n", "P", "S", "I", "I")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("Error", "root_new %0, [\"parrot\";\"Exception\"]\n%0[\"message\"] = %1\n%0[\"severity\"] = %2\n%0[\"type\"] = %3\n%0[\"payload\"] = %4\n", "P", "S", "I", "I", "P")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("elements", "elements %0, %1", "I", "P")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunctionEval' ]
$P2.'BuiltinFunctionEval'("length", WSubId_57, "length %0, %1", "I", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunctionEval' ]
$P2.'BuiltinFunctionEval'("bytelength", WSubId_58, "bytelength %0, %1", "I", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunctionEval' ]
$P2.'BuiltinFunctionEval'("chr", WSubId_59, "chr $S0, %1\nfind_encoding $I0, \"utf8\"\ntrans_encoding %0, $S0, $I0\n", "S", "I")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunctionEval' ]
$P2.'BuiltinFunctionEval'("ord", WSubId_60, "ord %0, %1", "I", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunctionEval' ]
$P2.'BuiltinFunctionEval'("ord", WSubId_60, "ord %0, %1, %2", "I", "S", "I")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunctionEval' ]
$P2.'BuiltinFunctionEval'("substr", WSubId_61, "substr %0, %1, %2", "S", "S", "I")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunctionEval' ]
$P2.'BuiltinFunctionEval'("substr", WSubId_61, "substr %0, %1, %2, %3", "S", "S", "I", "I")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("replace", "replace %0, %1, %2, %3, %4", "S", "S", "I", "I", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunctionEval' ]
$P2.'BuiltinFunctionEval'("indexof", WSubId_62, "index %0, %1, %2", "I", "S", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunctionEval' ]
$P2.'BuiltinFunctionEval'("indexof", WSubId_63, "index %0, %1, %2, %3", "I", "S", "S", "I")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("join", "join %0, %1, %2", "S", "S", "P")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunctionEval' ]
$P2.'BuiltinFunctionEval'("escape", WSubId_64, "escape %0, %1", "S", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("unescape", "$P0 = new [\"String\"]\n$P0 = %1\n%0 = $P0.\"unescape\"(\"utf8\")\n", "S", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("unescape", "$P0 = new [\"String\"]\n$P0 = %1\n%0 = $P0.\"unescape\"(%2)\n", "S", "S", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("trans_encoding", "find_encoding $I0, %2\ntrans_encoding %0, %1, $I0\n", "S", "S", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("encoding_name", "encoding $I0, %1\nencodingname %0, $I0\n", "S", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunctionEval' ]
$P2.'BuiltinFunctionEval'("upcase", WSubId_65, "upcase %0, %1", "S", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunctionEval' ]
$P2.'BuiltinFunctionEval'("downcase", WSubId_66, "downcase %0, %1", "S", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("titlecase", "titlecase %0, %1", "S", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("split", "split %0, %1, %2", "P", "S", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("chomp", "$P0 = get_root_global [\"parrot\";\"String\";\"Utils\"], \"chomp\"\n%0 = $P0(%1)\n", "S", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("chomp", "$P0 = get_root_global [\"parrot\";\"String\";\"Utils\"], \"chomp\"\n%0 = $P0(%1, %2)\n", "S", "S", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("push", "push %1, %2", "v", "P", "?")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("unshift", "unshift %1, %2", "v", "P", "?")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("pop_var", "pop %0, %1", "P", "P")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("shift_var", "shift %0, %1", "P", "P")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("pop_int", "pop %0, %1", "I", "P")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("shift_int", "shift %0, %1", "I", "P")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("pop_float", "pop %0, %1", "N", "P")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("shift_float", "shift %0, %1", "N", "P")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("pop_string", "pop %0, %1", "S", "P")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("shift_string", "shift %0, %1", "S", "P")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("abs", WSubId_67, ":", "!")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("sqrt", "sqrt %0, %1", "N", "N")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("pow", "pow %0, %1, %2", "N", "N", "N")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("exp", "exp %0, %1", "N", "N")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("ln", "ln %0, %1", "N", "N")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("sin", "sin %0, %1", "N", "N")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("cos", "cos %0, %1", "N", "N")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("tan", "tan %0, %1", "N", "N")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("asin", "asin %0, %1", "N", "N")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("acos", "acos %0, %1", "N", "N")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("atan", "atan %0, %1", "N", "N")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("atan", "atan %0, %1, %2", "N", "N", "N")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("sinh", "sinh %0, %1", "N", "N")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("cosh", "cosh %0, %1", "N", "N")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("tanh", "tanh %0, %1", "N", "N")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("getinterp", "getinterp %0", "P")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("getcontext", "get_context %0", "P")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("get_context", "get_context %0", "P")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("get_class", "get_class %0, %1", "P", "p")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("typeof", "typeof %0, %1", "P", "P")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("getattribute", "getattribute %0, %1, %2", "P", "P", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("getattribute", "getattribute %0, %1, %2, %3", "P", "P", "P", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("setattribute", "setattribute %1, %2, %3, %4", "v", "P", "P", "S", "P")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("find_method", "find_method %0, %1, %2", "P", "P", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("callmethodwithargs", "%0 = %1.%2(%3 :flat)", "P", "P", "P", "P")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("clone", "clone %0, %1", "P", "P")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("compreg", "compreg %0, %1", "P", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("compreg", "compreg %1, %2", "v", "S", "P")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("load_language", "load_language %1\ncompreg %0, %1\n", "P", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("load_language", "load_language %1\ncompreg %0, %2\n", "P", "S", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("loadlib", "loadlib %0, %1", "P", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("load_bytecode", "load_bytecode %1", "v", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("load_packfile", "load_bytecode %0, %1", "P", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("dlfunc", "dlfunc %0, %1, %2, %3", "P", "P", "S", "S")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("sprintf", "sprintf %0, %1, %2", "S", "S", "P")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("print", WSubId_68, "v", "*")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("say", WSubId_69, "v", "*")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("cry", WSubId_70, "v", "*")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("__ASSERT__", WSubId_71, "v", "!")
set $P1, $P2
__ARG_1.'add'($P1)
new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ]
$P2.'BuiltinFunction'("invoke", WSubId_72, "P", "!")
set $P1, $P2
__ARG_1.'add'($P1)
.end # getbuiltins
.sub 'parseDotted' :subid('WSubId_94')
.param pmc __ARG_1
root_new $P1, ['parrot';'ResizablePMCArray']
$P2 = __ARG_1.'get'()
$P3 = $P2.'isidentifier'()
if_null $P3, __label_1
unless $P3 goto __label_1
push $P1, $P2
__label_3: # while
$P2 = __ARG_1.'get'()
$P3 = $P2.'isop'(".")
if_null $P3, __label_2
unless $P3 goto __label_2
$P2 = __ARG_1.'get'()
push $P1, $P2
goto __label_3
__label_2: # endwhile
__label_1: # endif
__ARG_1.'unget'($P2)
.return($P1)
.end # parseDotted
.sub 'parseList' :subid('WSubId_73')
.param pmc __ARG_1
.param pmc __ARG_2
.param pmc __ARG_3
.param string __ARG_4 :optional
.const 'Sub' WSubId_28 = "