# THIS IS A GENERATED FILE! DO NOT EDIT! # Compiled with Winxed 1.10.-1 # Source file: winxedst2.winxed # Begin generated code .namespace [ 'Winxed'; 'Compiler' ] .sub 'getVersion' :subid('getVersion') :anon new $P1, ['FixedIntegerArray'], 3 $P1[0] = 1 $P1[1] = 10 $P1[2] = -1 .return($P1) .end # getVersion .sub 'getVersionString' :subid('getVersionString') :anon .const 'Sub' getVersion = "getVersion" $P1 = getVersion() join $S1, ".", $P1 concat $S2, "Winxed ", $S1 .return($S2) .end # getVersionString .sub 'sformat' :subid('sformat') .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('bindfirst') .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('bindfirst') .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('bindlast') .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('bindlast') .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('bindmethod') .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('bindmethod') .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('method_fun') .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('method_fun') .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('Warn') .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('InternalError') .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('SyntaxError') .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' SyntaxError = "SyntaxError" SyntaxError("Not a left-side expression", __ARG_1) .end # NoLeftSide .sub 'Expected' :subid('Expected') .param string __ARG_1 .param pmc __ARG_2 .const 'Sub' SyntaxError = "SyntaxError" concat $S1, "Expected ", __ARG_1 SyntaxError($S1, __ARG_2) .end # Expected .sub 'Unexpected' :subid('WSubId_80') .param string __ARG_1 .param pmc __ARG_2 .const 'Sub' SyntaxError = "SyntaxError" concat $S1, "Unexpected ", __ARG_1 SyntaxError($S1, __ARG_2) .end # Unexpected .sub 'ExpectedIdentifier' :subid('bindlast0') .param pmc __ARG_1 .const 'Sub' SyntaxError = "SyntaxError" SyntaxError("Expected identifier", __ARG_1) .end # ExpectedIdentifier .sub 'ExpectedOp' :subid('WSubId_29') .param string __ARG_1 .param pmc __ARG_2 .const 'Sub' SyntaxError = "SyntaxError" concat $S1, "Expected '", __ARG_1 concat $S1, $S1, "'" SyntaxError($S1, __ARG_2) .end # ExpectedOp .sub 'RequireOp' :subid('bindlast1') .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('bindlast2') .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('RequireIdentifier') .param pmc __ARG_1 .const 'Sub' bindlast0 = "bindlast0" $P1 = __ARG_1.'isidentifier'() if $P1 goto __label_1 bindlast0(__ARG_1) __label_1: # endif .end # RequireIdentifier .sub 'ExpectOp' :subid('ExpectOp') .param string __ARG_1 .param pmc __ARG_2 .const 'Sub' bindlast1 = "bindlast1" $P1 = __ARG_2.'get'() bindlast1(__ARG_1, $P1) .end # ExpectOp .sub 'ExpectKeyword' :subid('WSubId_135') .param string __ARG_1 .param pmc __ARG_2 .const 'Sub' bindlast2 = "bindlast2" $P1 = __ARG_2.'get'() bindlast2(__ARG_1, $P1) .end # ExpectKeyword .sub 'UndefinedVariable' :subid('WSubId_102') .param string __ARG_1 .param pmc __ARG_2 .const 'Sub' SyntaxError = "SyntaxError" concat $S1, "Variable '", __ARG_1 concat $S1, $S1, "' is not defined" SyntaxError($S1, __ARG_2) .end # UndefinedVariable .sub 'Redeclared' :subid('WSubId_98') .param pmc __ARG_1 .const 'Sub' SyntaxError = "SyntaxError" $S1 = __ARG_1.'getidentifier'() concat $S2, "Redeclared '", $S1 concat $S2, $S2, "'" SyntaxError($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' InternalError = "InternalError" InternalError("Not a literal int", self) .end # getintvalue .sub 'rawstring' :method .const 'Sub' InternalError = "InternalError" InternalError("Not a literal string", self) .end # rawstring .sub 'getidentifier' :method .const 'Sub' bindlast0 = "bindlast0" bindlast0(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 .return($S2) .end # get_string .sub 'viewable' :method getattribute $P1, self, 'str' set $S1, $P1 concat $S3, "\"", $S1 concat $S3, $S3, "\"" set $S2, $S3 .return($S2) .end # viewable .sub 'getasquoted' :method getattribute $P1, self, 'str' .return($P1) .end # getasquoted .sub 'getPirString' :method .const 'Sub' SyntaxError = "SyntaxError" 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 SyntaxError("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 $S3, $S2 concat $S5, "\"", $S3 concat $S5, $S5, "\"" set $S1, $S5 unless $I1 goto __label_8 set $S4, "utf8:" goto __label_7 __label_8: set $S4, "" __label_7: concat $S5, $S4, $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('bindlast4') .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('bindlast5') .param pmc __ARG_1 .param int __ARG_2 .const 'Sub' bindlast4 = "bindlast4" bindlast4("Unterminated string", __ARG_1, __ARG_2) .end # UnterminatedString .sub 'UnterminatedHeredoc' :subid('bindlast6') .param pmc __ARG_1 .param int __ARG_2 .const 'Sub' bindlast4 = "bindlast4" bindlast4("Unterminated heredoc", __ARG_1, __ARG_2) .end # UnterminatedHeredoc .sub 'UnclosedComment' :subid('bindlast7') .param pmc __ARG_1 .param int __ARG_2 .const 'Sub' bindlast4 = "bindlast4" bindlast4("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' bindlast5 = "bindlast5" 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 bindlast5(__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 bindlast5(__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' bindlast5 = "bindlast5" 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 bindlast5(__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' bindlast6 = "bindlast6" 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 bindlast6(__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 bindlast6(__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('bindlast8') .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 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 $S2, $S1 index $I3, "0123456789abcdef0123456789ABCDEF", $S2 lt $I3, 0, __label_7 mod $I3, $I3, 16 __label_7: # endif set $I2, $I3 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 $S3, __ARG_2 __label_10: # for condition set $S4, $S1 index $I5, "0123456789", $S4 isgt $I6, $I5, -1 unless $I6 goto __label_9 concat $S3, $S3, $S1 __label_8: # for iteration $P2 = __ARG_1.'getchar'() set $S1, $P2 goto __label_10 __label_9: # for end null $I4 ne $S1, ".", __label_11 set $I4, 1 __label_12: # do concat $S3, $S3, $S1 $P2 = __ARG_1.'getchar'() set $S1, $P2 __label_14: # continue set $S5, $S1 index $I5, "0123456789", $S5 isgt $I7, $I5, -1 if $I7 goto __label_12 __label_13: # enddo __label_11: # endif iseq $I5, $S1, "e" if $I5 goto __label_16 iseq $I5, $S1, "E" __label_16: unless $I5 goto __label_15 set $I4, 1 concat $S3, $S3, "E" $P2 = __ARG_1.'getchar'() set $S1, $P2 iseq $I5, $S1, "+" if $I5 goto __label_18 iseq $I5, $S1, "-" __label_18: unless $I5 goto __label_17 concat $S3, $S3, $S1 $P2 = __ARG_1.'getchar'() set $S1, $P2 __label_17: # endif __label_21: # for condition set $S6, $S1 index $I5, "0123456789", $S6 isgt $I8, $I5, -1 unless $I8 goto __label_20 concat $S3, $S3, $S1 __label_19: # for iteration $P2 = __ARG_1.'getchar'() set $S1, $P2 goto __label_21 __label_20: # for end __label_15: # endif __ARG_1.'ungetchar'($S1) unless $I4 goto __label_22 new $P3, [ 'Winxed'; 'Compiler'; 'TokenFloat' ] $P3.'TokenFloat'($P1, __ARG_3, $S3) set $P2, $P3 .return($P2) goto __label_23 __label_22: # else new $P5, [ 'Winxed'; 'Compiler'; 'TokenInteger' ] $P5.'TokenInteger'($P1, __ARG_3, $S3) set $P4, $P5 .return($P4) __label_23: # 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' bindlast7 = "bindlast7" $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 bindlast7(__ARG_1, __ARG_3) __label_7: # endif $P1 = __ARG_1.'getchar'() set $S1, $P1 ne $S1, "", __label_8 bindlast7(__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('bindlast9') .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' bindlast8 = "bindlast8" .const 'Sub' bindlast9 = "bindlast9" .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[""] = bindlast8 $P2["{"] = bindlast9 $P1["$"] = $P2 $P1["\""] = WSubId_40 $P1["'"] = WSubId_41 root_new $P3, ['parrot';'Hash'] root_new $P4, ['parrot';'Hash'] $P4[""] = bindlast9 $P4["="] = bindlast9 $P3["="] = $P4 $P3[":"] = bindlast9 $P1["="] = $P3 root_new $P5, ['parrot';'Hash'] $P5["+"] = bindlast9 $P5["="] = bindlast9 $P1["+"] = $P5 root_new $P6, ['parrot';'Hash'] $P6["-"] = bindlast9 $P6["="] = bindlast9 $P1["-"] = $P6 root_new $P7, ['parrot';'Hash'] $P7["="] = bindlast9 $P1["*"] = $P7 root_new $P8, ['parrot';'Hash'] $P8["|"] = bindlast9 $P1["|"] = $P8 root_new $P9, ['parrot';'Hash'] $P9["&"] = bindlast9 $P1["&"] = $P9 root_new $P10, ['parrot';'Hash'] root_new $P11, ['parrot';'Hash'] $P11[""] = bindlast9 $P11[":"] = WSubId_42 $P10["<"] = $P11 $P10["="] = bindlast9 $P1["<"] = $P10 root_new $P12, ['parrot';'Hash'] root_new $P13, ['parrot';'Hash'] $P13[""] = bindlast9 $P13[">"] = bindlast9 $P12[">"] = $P13 $P12["="] = bindlast9 $P1[">"] = $P12 root_new $P14, ['parrot';'Hash'] root_new $P15, ['parrot';'Hash'] $P15[""] = bindlast9 $P15["="] = bindlast9 $P14["="] = $P15 $P1["!"] = $P14 root_new $P16, ['parrot';'Hash'] $P16["%"] = bindlast9 $P16["="] = bindlast9 $P1["%"] = $P16 root_new $P17, ['parrot';'Hash'] $P17["="] = bindlast9 $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' Warn = "Warn" getattribute $P1, self, 'warnings' if_null $P1, __label_1 unless $P1 goto __label_1 Warn(__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' bindlast8 = "bindlast8" .const 'Sub' WSubId_46 = "WSubId_46" .const 'Sub' bindlast9 = "bindlast9" 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 $S2, $S1 iseq $I2, $S2, " " if $I2 goto __label_7 iseq $I2, $S2, "\n" __label_7: if $I2 goto __label_6 iseq $I2, $S2, "\t" __label_6: if $I2 goto __label_5 iseq $I2, $S2, "\r" __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_8 new $P4, [ 'Winxed'; 'Compiler'; 'TokenEof' ] getattribute $P5, self, 'filename' $P4.'TokenEof'($P5) set $P3, $P4 .return($P3) __label_8: # endif set $S3, $S1 index $I4, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_", $S3 isgt $I3, $I4, -1 unless $I3 goto __label_9 .tailcall bindlast8(self, $S1, $I1) __label_9: # endif set $S4, $S1 index $I4, "0123456789", $S4 isgt $I5, $I4, -1 unless $I5 goto __label_10 .tailcall WSubId_46(self, $S1, $I1) __label_10: # endif set $S5, $S1 getattribute $P1, self, 'select' $P2 = $P1[$S1] __label_12: # while if_null $P2, __label_11 isa $I4, $P2, "Hash" unless $I4 goto __label_11 $P3 = self.'getchar'() set $S1, $P3 set $P1, $P2 $P2 = $P1[$S1] unless_null $P2, __label_13 self.'ungetchar'($S1) $P2 = $P1[""] goto __label_14 __label_13: # else concat $S5, $S5, $S1 __label_14: # endif goto __label_12 __label_11: # endwhile if_null $P2, __label_16 $P3 = $P2(self, $S5, $I1) goto __label_15 __label_16: $P4 = bindlast9(self, $S5, $I1) set $P3, $P4 __label_15: .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' InternalError = "InternalError" 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 InternalError("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' Warn = "Warn" getattribute $P1, self, 'warnings' if_null $P1, __label_1 unless $P1 goto __label_1 Warn(__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' method_fun = "method_fun" set $P1, __ARG_1 getattribute $P4, self, 'handle' $P2 = method_fun($P4, "print") if_null $P1, __label_2 iter $P5, $P1 set $P5, 0 __label_1: # for iteration unless $P5 goto __label_2 shift $P3, $P5 $P2($P3) goto __label_1 __label_2: # endfor .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('integerValue') .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('bindmethod0') .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('floatAsString') .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_156') .param pmc __ARG_1 .param string __ARG_2 .param int __ARG_3 .const 'Sub' integerValue = "integerValue" new $P3, [ 'Winxed'; 'Compiler'; 'TokenIdentifier' ] $P3.'TokenIdentifier'("__predefconst__", 0, __ARG_2) set $P1, $P3 $P2 = __ARG_1.'createconst'($P1, "I", 4) $P3 = integerValue(__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('bindmethod1') .param pmc __ARG_1 .const 'Sub' InternalError = "InternalError" $P2 = __ARG_1[0] getattribute $P1, $P2, 'arg' $P2 = $P1.'getIntegerValue'() set $I1, $P2 set $I2, $I1 .return($I2) .end # int_from_literal_arg1 .sub 'string_from_literal_arg1' :subid('WSubId_49') .param pmc __ARG_1 .const 'Sub' InternalError = "InternalError" $P2 = __ARG_1[0] getattribute $P1, $P2, 'arg' $P2 = $P1.'getStringValue'() null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: set $S2, $S1 .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' InternalError = "InternalError" 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' SyntaxError = "SyntaxError" .const 'Sub' InternalError = "InternalError" .const 'Sub' sformat = "sformat" 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 SyntaxError("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 InternalError("Bad result in non void builtin") __label_5: # endif __label_3: # endif __ARG_1.'annotate'(__ARG_3) getattribute $P2, self, 'body' $P1 = sformat($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' InternalError = "InternalError" 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, "'" InternalError($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' InternalError = "InternalError" 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 InternalError("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('Builtin_say') .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('Builtin_cry') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param string __ARG_4 .param pmc __ARG_5 .const 'Sub' sformat = "sformat" .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_2 iter $P7, $P1 set $P7, 0 __label_1: # for iteration unless $P7 goto __label_2 shift $P4, $P7 $P8 = $P3($P4) push $P2, $P8 goto __label_1 __label_2: # endfor set $P6, $P2 set $P5, $P6 join $S1, "\n", $P5 $P5 = sformat(" 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' method_fun = "method_fun" __ARG_1.'annotate'(__ARG_3) set $P1, __ARG_5 $P2 = method_fun(__ARG_1, "emitprint") if_null $P1, __label_2 iter $P4, $P1 set $P4, 0 __label_1: # for iteration unless $P4 goto __label_2 shift $P3, $P4 $P2($P3) goto __label_1 __label_2: # endfor .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('Builtin_ASSERT') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param string __ARG_4 .param pmc __ARG_5 .const 'Sub' sformat = "sformat" $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 = sformat(" 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('Builtin_invoke') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param string __ARG_4 .param pmc __ARG_5 .const 'Sub' SyntaxError = "SyntaxError" $P1 = __ARG_5[0] isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'CallExpr' ] if $I1 goto __label_1 SyntaxError("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('bindmethod7') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' WSubId_49 = "WSubId_49" .const 'Sub' integerValue = "integerValue" $P1 = WSubId_49(__ARG_3) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: length $I1, $S1 .tailcall integerValue(__ARG_1, __ARG_2, $I1) .end # builtineval_length .sub 'builtineval_bytelength' :subid('bindmethod8') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' WSubId_49 = "WSubId_49" .const 'Sub' integerValue = "integerValue" $P1 = WSubId_49(__ARG_3) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: bytelength $I1, $S1 .tailcall integerValue(__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' integerValue = "integerValue" elements $I1, __ARG_3 $P5 = __ARG_3[0] getattribute $P1, $P5, 'arg' set $P2, $P1 $P5 = $P2.'getStringValue'() null $S2 if_null $P5, __label_1 set $S2, $P5 __label_1: set $S1, $S2 null $I2 le $I1, 1, __label_2 $P5 = __ARG_3[1] getattribute $P3, $P5, 'arg' set $P4, $P3 $P5 = $P4.'getIntegerValue'() set $I3, $P5 set $I2, $I3 __label_2: # endif ord $I4, $S1, $I2 .tailcall integerValue(__ARG_1, __ARG_2, $I4) .end # builtineval_ord .sub 'builtineval_chr' :subid('bindmethod9') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' bindmethod0 = "bindmethod0" .const 'Sub' bindmethod1 = "bindmethod1" $P1 = bindmethod1(__ARG_3) set $I1, $P1 chr $S0, $I1 find_encoding $I0, "utf8" trans_encoding $S1, $S0, $I0 .tailcall bindmethod0(__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' bindmethod0 = "bindmethod0" elements $I1, __ARG_3 $P7 = __ARG_3[0] getattribute $P1, $P7, 'arg' $P7 = __ARG_3[1] getattribute $P2, $P7, 'arg' set $P3, $P1 $P7 = $P3.'getStringValue'() null $S2 if_null $P7, __label_1 set $S2, $P7 __label_1: set $S1, $S2 set $P4, $P2 $P7 = $P4.'getIntegerValue'() set $I3, $P7 set $I2, $I3 null $S3 le $I1, 2, __label_2 $P7 = __ARG_3[2] getattribute $P5, $P7, 'arg' set $P6, $P5 $P7 = $P6.'getIntegerValue'() set $I5, $P7 set $I4, $I5 substr $S3, $S1, $I2, $I4 goto __label_3 __label_2: # else substr $S3, $S1, $I2 __label_3: # endif .tailcall bindmethod0(__ARG_1, __ARG_2, $S3) .end # builtineval_substr .sub 'builtineval_indexof' :subid('WSubId_62') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' integerValue = "integerValue" $P5 = __ARG_3[0] getattribute $P1, $P5, 'arg' $P5 = __ARG_3[1] getattribute $P2, $P5, 'arg' set $P3, $P1 $P5 = $P3.'getStringValue'() null $S2 if_null $P5, __label_1 set $S2, $P5 __label_1: set $S1, $S2 set $P4, $P2 $P5 = $P4.'getStringValue'() null $S4 if_null $P5, __label_2 set $S4, $P5 __label_2: set $S3, $S4 index $I1, $S1, $S3 .tailcall integerValue(__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' integerValue = "integerValue" $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 $S2 if_null $P7, __label_1 set $S2, $P7 __label_1: set $S1, $S2 set $P5, $P2 $P7 = $P5.'getStringValue'() null $S4 if_null $P7, __label_2 set $S4, $P7 __label_2: set $S3, $S4 $P7 = __ARG_3[2] getattribute $P6, $P7, 'arg' $P7 = $P6.'getIntegerValue'() set $I2, $P7 set $I1, $I2 index $I3, $S1, $S3, $I1 .tailcall integerValue(__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' bindmethod0 = "bindmethod0" .const 'Sub' WSubId_49 = "WSubId_49" $P1 = WSubId_49(__ARG_3) set $S2, $P1 upcase $S1, $S2 .tailcall bindmethod0(__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' bindmethod0 = "bindmethod0" .const 'Sub' WSubId_49 = "WSubId_49" $P1 = WSubId_49(__ARG_3) set $S2, $P1 downcase $S1, $S2 .tailcall bindmethod0(__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' bindmethod0 = "bindmethod0" .const 'Sub' WSubId_49 = "WSubId_49" $P1 = WSubId_49(__ARG_3) set $S3, $P1 escape $S2, $S3 escape $S1, $S2 .tailcall bindmethod0(__ARG_1, __ARG_2, $S1) .end # builtineval_escape .sub 'builtin_sleep' :subid('bindmethod6') .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_157') .param pmc __ARG_1 .const 'Sub' bindmethod2 = "bindmethod2" .const 'Sub' bindmethod3 = "bindmethod3" .const 'Sub' bindmethod4 = "bindmethod4" .const 'Sub' bindmethod5 = "bindmethod5" .const 'Sub' bindmethod6 = "bindmethod6" .const 'Sub' bindmethod7 = "bindmethod7" .const 'Sub' bindmethod8 = "bindmethod8" .const 'Sub' bindmethod9 = "bindmethod9" .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' Builtin_say = "Builtin_say" .const 'Sub' Builtin_cry = "Builtin_cry" .const 'Sub' Builtin_ASSERT = "Builtin_ASSERT" .const 'Sub' Builtin_invoke = "Builtin_invoke" new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinExpr' ] $P2.'BuiltinExpr'("int", bindmethod2, "S", "!") set $P1, $P2 __ARG_1.'add'($P1) new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinExpr' ] $P2.'BuiltinExpr'("float", bindmethod3, "S", "!") set $P1, $P2 __ARG_1.'add'($P1) new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinExpr' ] $P2.'BuiltinExpr'("string", bindmethod4, "S", "!") set $P1, $P2 __ARG_1.'add'($P1) new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinExpr' ] $P2.'BuiltinExpr'("var", bindmethod5, "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", bindmethod6, "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", bindmethod7, "length %0, %1", "I", "S") set $P1, $P2 __ARG_1.'add'($P1) new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunctionEval' ] $P2.'BuiltinFunctionEval'("bytelength", bindmethod8, "bytelength %0, %1", "I", "S") set $P1, $P2 __ARG_1.'add'($P1) new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunctionEval' ] $P2.'BuiltinFunctionEval'("chr", bindmethod9, "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", Builtin_say, "v", "*") set $P1, $P2 __ARG_1.'add'($P1) new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ] $P2.'BuiltinFunction'("cry", Builtin_cry, "v", "*") set $P1, $P2 __ARG_1.'add'($P1) new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ] $P2.'BuiltinFunction'("__ASSERT__", Builtin_ASSERT, "v", "!") set $P1, $P2 __ARG_1.'add'($P1) new $P2, [ 'Winxed'; 'Compiler'; 'BuiltinFunction' ] $P2.'BuiltinFunction'("invoke", Builtin_invoke, "P", "!") set $P1, $P2 __ARG_1.'add'($P1) .end # getbuiltins .sub 'parseDotted' :subid('parseDotted') .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_74') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param string __ARG_4 :optional .const 'Sub' SyntaxError = "SyntaxError" root_new $P1, ['parrot';'ResizablePMCArray'] null $P2 __label_1: # do $P3 = __ARG_3(__ARG_1, __ARG_2) push $P1, $P3 __label_3: # continue $P2 = __ARG_1.'get'() $P4 = $P2.'isop'(",") if_null $P4, __label_2 if $P4 goto __label_1 __label_2: # enddo unless_null __ARG_4, __label_4 __ARG_1.'unget'($P2) goto __label_5 __label_4: # else $P4 = $P2.'isop'(__ARG_4) if $P4 goto __label_6 SyntaxError("Unfinished argument list", $P2) __label_6: # endif __label_5: # endif .return($P1) .end # parseList .sub 'parseListOrEmpty' :subid('parseListOrEmpty') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param string __ARG_4 .const 'Sub' SyntaxError = "SyntaxError" $P1 = __ARG_1.'get'() $P4 = $P1.'isop'(__ARG_4) if_null $P4, __label_1 unless $P4 goto __label_1 null $P5 .return($P5) __label_1: # endif __ARG_1.'unget'($P1) root_new $P2, ['parrot';'ResizablePMCArray'] __label_2: # do $P3 = __ARG_3(__ARG_1, __ARG_2) push $P2, $P3 __label_4: # continue $P1 = __ARG_1.'get'() $P4 = $P1.'isop'(",") if_null $P4, __label_3 if $P4 goto __label_2 __label_3: # enddo $P4 = $P1.'isop'(__ARG_4) if $P4 goto __label_5 SyntaxError("Unfinished argument list", $P1) __label_5: # endif .return($P2) .end # parseListOrEmpty .sub 'parseIdentifier' :subid('parseIdentifier') .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' bindlast0 = "bindlast0" $P1 = __ARG_1.'get'() $P2 = $P1.'isidentifier'() if $P2 goto __label_1 bindlast0($P1) __label_1: # endif .return($P1) .end # parseIdentifier .sub 'toIdentifierList' :subid('WSubId_73') .param pmc __ARG_1 .const 'Sub' bindmethod = "bindmethod" new $P1, ['ResizableStringArray'] set $P2, __ARG_1 set $P3, $P1 $P4 = bindmethod("getidentifier") if_null $P2, __label_2 iter $P6, $P2 set $P6, 0 __label_1: # for iteration unless $P6 goto __label_2 shift $P5, $P6 $P7 = $P4($P5) push $P3, $P7 goto __label_1 __label_2: # endfor .return($P1) .end # toIdentifierList .sub 'toModuleFilename' :subid('toModuleFilename') .param pmc __ARG_1 .const 'Sub' WSubId_73 = "WSubId_73" $P1 = WSubId_73(__ARG_1) join $S1, "/", $P1 concat $S2, "\"", $S1 concat $S2, $S2, ".pbc\"" .return($S2) .end # toModuleFilename .namespace [ 'Winxed'; 'Compiler'; 'CommonBase' ] .sub 'initbase' :method .param pmc __ARG_1 .param pmc __ARG_2 setattribute self, 'start', __ARG_1 setattribute self, 'owner', __ARG_2 .end # initbase .sub 'clone' :method .param pmc __ARG_1 .const 'Sub' SyntaxError = "SyntaxError" typeof $P1, self set $S1, $P1 concat $S2, "Cannot use ", $S1 concat $S2, $S2, " in inline (yet)" SyntaxError($S2, self) .end # clone .sub 'getstart' :method getattribute $P1, self, 'start' .return($P1) .end # getstart .sub 'viewable' :method getattribute $P1, self, 'start' if_null $P1, __label_1 getattribute $P2, self, 'start' .tailcall $P2.'viewable'() goto __label_2 __label_1: # else .return("") __label_2: # endif .end # viewable .sub 'annotate' :method .param pmc __ARG_1 getattribute $P1, self, 'start' __ARG_1.'annotate'($P1) .end # annotate .sub 'getpath' :method getattribute $P1, self, 'owner' .tailcall $P1.'getpath'() .end # getpath .sub 'use_builtin' :method .param string __ARG_1 getattribute $P1, self, 'owner' $P1.'use_builtin'(__ARG_1) .end # use_builtin .sub 'generatesubid' :method getattribute $P1, self, 'owner' .tailcall $P1.'generatesubid'() .end # generatesubid .sub 'usesubid' :method .param string __ARG_1 getattribute $P1, self, 'owner' $P1.'usesubid'(__ARG_1) .end # usesubid .sub 'addlocalfunction' :method .param pmc __ARG_1 getattribute $P1, self, 'owner' .tailcall $P1.'addlocalfunction'(__ARG_1) .end # addlocalfunction .sub 'scopesearch' :method .param pmc __ARG_1 .param int __ARG_2 getattribute $P1, self, 'owner' .tailcall $P1.'scopesearch'(__ARG_1, __ARG_2) .end # scopesearch .sub 'dowarnings' :method getattribute $P1, self, 'owner' .tailcall $P1.'dowarnings'() .end # dowarnings .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'CommonBase' ] addattribute $P0, 'start' addattribute $P0, 'owner' .end .namespace [ 'Winxed'; 'Compiler'; 'CollectValues' ] .sub 'CollectValues' :method .param pmc __ARG_1 .param pmc __ARG_2 setattribute self, 'owner', __ARG_1 setattribute self, 'e', __ARG_2 .end # CollectValues .sub 'add' :method .param pmc __ARG_1 getattribute $P1, self, 'e' null $S1 $P3 = __ARG_1.'isnull'() if_null $P3, __label_1 unless $P3 goto __label_1 getattribute $P2, self, 'pnull' unless_null $P2, __label_3 getattribute $P4, self, 'owner' $P3 = $P4.'tempreg'("P") null $S2 if_null $P3, __label_4 set $S2, $P3 __label_4: $P1.'emitnull'($S2) box $P2, $S2 setattribute self, 'pnull', $P2 __label_3: # endif set $S1, $P2 goto __label_2 __label_1: # else $P3 = __ARG_1.'emit_get'($P1) set $S1, $P3 __label_2: # endif .return($S1) .end # add .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'CollectValues' ] addattribute $P0, 'owner' addattribute $P0, 'e' addattribute $P0, 'pnull' .end .namespace [ 'Winxed'; 'Compiler'; 'SimpleArgList' ] .sub 'SimpleArgList' :method .param pmc __ARG_1 .param pmc __ARG_2 .param string __ARG_3 .const 'Sub' WSubId_74 = "WSubId_74" .const 'Sub' WSubId_75 = "WSubId_75" $P2 = WSubId_74(__ARG_1, __ARG_2, WSubId_75, __ARG_3) setattribute self, 'args', $P2 .end # SimpleArgList .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'SimpleArgList' ] getattribute $P2, self, 'args' set $P3, __ARG_1 .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" set $P4, $P2 root_new $P5, ['parrot';'ResizablePMCArray'] $P10 = bindmethod("clone") $P6 = bindlast($P10, $P3) if_null $P4, __label_2 iter $P11, $P4 set $P11, 0 __label_1: # for iteration unless $P11 goto __label_2 shift $P7, $P11 $P12 = $P6($P7) push $P5, $P12 goto __label_1 __label_2: # endfor set $P9, $P5 set $P8, $P9 setattribute $P1, 'args', $P8 .return($P1) .end # clone .sub 'numargs' :method getattribute $P1, self, 'args' elements $I1, $P1 .return($I1) .end # numargs .sub 'getarg' :method .param int __ARG_1 getattribute $P1, self, 'args' $P2 = $P1[__ARG_1] .return($P2) .end # getarg .sub 'optimizeargs' :method getattribute $P1, self, 'args' if_null $P1, __label_2 elements $I1, $P1 goto __label_1 __label_2: null $I1 __label_1: null $I2 __label_5: # for condition ge $I2, $I1, __label_4 $P3 = $P1[$I2] $P2 = $P3.'optimize'() $P1[$I2] = $P2 __label_3: # for iteration inc $I2 goto __label_5 __label_4: # for end .end # optimizeargs .sub 'getargvalues' :method .param pmc __ARG_1 .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" getattribute $P1, self, 'args' root_new $P2, ['parrot';'ResizablePMCArray'] $P6 = bindmethod("emit_get") $P3 = bindlast($P6, __ARG_1) if_null $P1, __label_2 iter $P7, $P1 set $P7, 0 __label_1: # for iteration unless $P7 goto __label_2 shift $P4, $P7 $P8 = $P3($P4) push $P2, $P8 goto __label_1 __label_2: # endfor set $P5, $P2 set $P6, $P5 .return($P6) .end # getargvalues .sub 'emitargs' :method .param pmc __ARG_1 $P1 = self.'getargvalues'(__ARG_1) join $S1, ", ", $P1 __ARG_1.'print'($S1) .end # emitargs .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'SimpleArgList' ] addattribute $P0, 'args' .end .namespace [ 'Winxed'; 'Compiler'; 'Modifier' ] .sub 'clone' :method .param pmc __ARG_1 getattribute $P1, self, 'args' new $P3, [ 'Winxed'; 'Compiler'; 'Modifier' ] getattribute $P4, self, 'name' if_null $P1, __label_2 $P5 = $P1.'clone'(__ARG_1) goto __label_1 __label_2: null $P5 __label_1: $P3.'Modifier'($P4, $P5) set $P2, $P3 .return($P2) .end # clone .sub 'getname' :method getattribute $P1, self, 'name' .return($P1) .end # getname .sub 'numargs' :method getattribute $P1, self, 'args' unless_null $P1, __label_2 null $I1 goto __label_1 __label_2: $P2 = $P1.'numargs'() set $I1, $P2 __label_1: .return($I1) .end # numargs .sub 'getarg' :method .param int __ARG_1 .const 'Sub' InternalError = "InternalError" getattribute $P1, self, 'args' $P2 = $P1.'numargs'() set $I1, $P2 lt __ARG_1, $I1, __label_1 InternalError("Wrong modifier arg number") __label_1: # endif .tailcall $P1.'getarg'(__ARG_1) .end # getarg .sub 'Modifier' :method .param string __ARG_1 .param pmc __ARG_2 box $P1, __ARG_1 setattribute self, 'name', $P1 if_null __ARG_2, __label_1 setattribute self, 'args', __ARG_2 __label_1: # endif .end # Modifier .sub 'optimize' :method getattribute $P1, self, 'args' if_null $P1, __label_1 getattribute $P2, self, 'args' $P2.'optimizeargs'() __label_1: # endif .return(self) .end # optimize .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'Modifier' ] addattribute $P0, 'name' addattribute $P0, 'args' .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'parseModifier' :subid('WSubId_76') .param pmc __ARG_1 .param pmc __ARG_2 $P1 = __ARG_1.'get'() $P3 = $P1.'getidentifier'() null $S1 if_null $P3, __label_1 set $S1, $P3 __label_1: $P1 = __ARG_1.'get'() null $P2 $P3 = $P1.'isop'("(") if_null $P3, __label_2 unless $P3 goto __label_2 new $P4, [ 'Winxed'; 'Compiler'; 'SimpleArgList' ] $P4.'SimpleArgList'(__ARG_1, __ARG_2, ")") set $P2, $P4 goto __label_3 __label_2: # else __ARG_1.'unget'($P1) __label_3: # endif new $P4, [ 'Winxed'; 'Compiler'; 'Modifier' ] $P4.'Modifier'($S1, $P2) set $P3, $P4 .return($P3) .end # parseModifier .namespace [ 'Winxed'; 'Compiler'; 'ModifierList' ] .sub 'ModifierList' :method .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_74 = "WSubId_74" .const 'Sub' WSubId_76 = "WSubId_76" $P2 = WSubId_74(__ARG_1, __ARG_2, WSubId_76, "]") setattribute self, 'list', $P2 .end # ModifierList .sub 'clonemodifiers' :method .param pmc __ARG_1 getattribute $P1, self, 'list' set $P2, __ARG_1 .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" set $P3, $P1 root_new $P4, ['parrot';'ResizablePMCArray'] $P8 = bindmethod("clone") $P5 = bindlast($P8, $P2) if_null $P3, __label_2 iter $P9, $P3 set $P9, 0 __label_1: # for iteration unless $P9 goto __label_2 shift $P6, $P9 $P10 = $P5($P6) push $P4, $P10 goto __label_1 __label_2: # endfor set $P7, $P4 set $P8, $P7 .return($P8) .end # clonemodifiers .sub 'optimize' :method getattribute $P1, self, 'list' if_null $P1, __label_2 elements $I1, $P1 goto __label_1 __label_2: null $I1 __label_1: null $I2 __label_5: # for condition ge $I2, $I1, __label_4 $P3 = $P1[$I2] $P2 = $P3.'optimize'() $P1[$I2] = $P2 __label_3: # for iteration inc $I2 goto __label_5 __label_4: # for end .end # optimize .sub 'getlist' :method getattribute $P1, self, 'list' .return($P1) .end # getlist .sub 'pick' :subid('WSubId_11') :method .param string __ARG_1 .const 'Sub' WSubId_12 = "WSubId_12" .lex '__WLEX_1', __ARG_1 getattribute $P1, self, 'list' newclosure $P2, WSubId_12 if_null $P1, __label_2 iter $P5, $P1 set $P5, 0 __label_1: # for iteration unless $P5 goto __label_2 shift $P3, $P5 $P6 = $P2($P3) if_null $P6, __label_3 unless $P6 goto __label_3 set $P4, $P3 goto __label_4 __label_3: # endif goto __label_1 __label_2: # endfor null $P4 __label_4: set $P6, $P4 .return($P6) .end # pick .sub '' :anon :subid('WSubId_12') :outer('WSubId_11') .param pmc __ARG_2 find_lex $S1, '__WLEX_1' $P1 = __ARG_2.'getname'() find_lex $S2, '__WLEX_1' set $S3, $P1 iseq $I1, $S3, $S2 .return($I1) .end # WSubId_12 .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ModifierList' ] addattribute $P0, 'list' .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'parseUsing' :subid('WSubId_81') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 $P1 = __ARG_2.'get'() $P2 = $P1.'iskeyword'("extern") set $I1, $P2 if $I1 goto __label_3 $P3 = $P1.'iskeyword'("static") set $I1, $P3 if $I1 goto __label_4 $P4 = $P1.'iskeyword'("namespace") set $I1, $P4 if $I1 goto __label_5 goto __label_2 __label_3: # case new $P6, [ 'Winxed'; 'Compiler'; 'ExternStatement' ] $P6.'ExternStatement'(__ARG_1, __ARG_2, __ARG_3) set $P5, $P6 .return($P5) __label_4: # case new $P8, [ 'Winxed'; 'Compiler'; 'StaticStatement' ] $P8.'StaticStatement'(__ARG_1, __ARG_2, __ARG_3) set $P7, $P8 .return($P7) __label_5: # case new $P10, [ 'Winxed'; 'Compiler'; 'UsingNamespaceStatement' ] $P10.'UsingNamespaceStatement'($P1, __ARG_2, __ARG_3) set $P9, $P10 .return($P9) __label_2: # default __ARG_2.'unget'($P1) new $P12, [ 'Winxed'; 'Compiler'; 'UsingStatement' ] $P12.'UsingStatement'(__ARG_1, __ARG_2, __ARG_3) set $P11, $P12 .return($P11) __label_1: # switch end .end # parseUsing .sub 'parseSig' :subid('WSubId_78') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' Expected = "Expected" .const 'Sub' WSubId_75 = "WSubId_75" new $P4, [ 'Winxed'; 'Compiler'; 'SigParameterList' ] $P4.'SigParameterList'(__ARG_2, __ARG_3) set $P1, $P4 $P2 = __ARG_2.'get'() $P4 = $P2.'isop'("=") if $P4 goto __label_1 Expected("'='", $P2) __label_1: # endif $P3 = WSubId_75(__ARG_2, __ARG_3) new $P5, [ 'Winxed'; 'Compiler'; 'MultiAssignStatement' ] $P5.'MultiAssignStatement'(__ARG_1, __ARG_3, $P1, $P3) set $P4, $P5 .return($P4) .end # parseSig .sub 'parseClassSpecifier' :subid('WSubId_103') .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' SyntaxError = "SyntaxError" $P1 = __ARG_1.'get'() $P2 = $P1.'isstring'() if_null $P2, __label_1 unless $P2 goto __label_1 new $P4, [ 'Winxed'; 'Compiler'; 'ClassSpecifierStr' ] $P4.'ClassSpecifierStr'(__ARG_2, $P1) set $P3, $P4 .return($P3) __label_1: # endif $P2 = $P1.'isop'("[") if_null $P2, __label_2 unless $P2 goto __label_2 new $P4, [ 'Winxed'; 'Compiler'; 'ClassSpecifierParrotKey' ] $P4.'ClassSpecifierParrotKey'(__ARG_1, __ARG_2, $P1) set $P3, $P4 .return($P3) __label_2: # endif $P2 = $P1.'isidentifier'() if_null $P2, __label_3 unless $P2 goto __label_3 new $P4, [ 'Winxed'; 'Compiler'; 'ClassSpecifierId' ] $P4.'ClassSpecifierId'(__ARG_1, __ARG_2, $P1) set $P3, $P4 .return($P3) __label_3: # endif SyntaxError("Invalid class", $P1) .end # parseClassSpecifier .sub 'parseStatement' :subid('WSubId_134') .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_78 = "WSubId_78" .const 'Sub' RequireIdentifier = "RequireIdentifier" .const 'Sub' bindlast1 = "bindlast1" .const 'Sub' WSubId_80 = "WSubId_80" .const 'Sub' WSubId_81 = "WSubId_81" .const 'Sub' WSubId_82 = "WSubId_82" .const 'Sub' WSubId_83 = "WSubId_83" .const 'Sub' WSubId_84 = "WSubId_84" .const 'Sub' WSubId_85 = "WSubId_85" .const 'Sub' WSubId_86 = "WSubId_86" .const 'Sub' WSubId_87 = "WSubId_87" .const 'Sub' WSubId_88 = "WSubId_88" .const 'Sub' WSubId_89 = "WSubId_89" .const 'Sub' WSubId_90 = "WSubId_90" .const 'Sub' WSubId_91 = "WSubId_91" $P1 = __ARG_1.'get'() null $P2 $P10 = $P1.'isop'(";") if_null $P10, __label_1 unless $P10 goto __label_1 new $P11, [ 'Winxed'; 'Compiler'; 'EmptyStatement' ] .return($P11) __label_1: # endif $P10 = $P1.'isop'("{") if_null $P10, __label_2 unless $P10 goto __label_2 new $P12, [ 'Winxed'; 'Compiler'; 'CompoundStatement' ] $P12.'CompoundStatement'($P1, __ARG_1, __ARG_2) set $P11, $P12 .return($P11) __label_2: # endif $P10 = $P1.'isop'("${") if_null $P10, __label_3 unless $P10 goto __label_3 new $P12, [ 'Winxed'; 'Compiler'; 'PiropStatement' ] $P12.'PiropStatement'($P1, __ARG_1, __ARG_2) set $P11, $P12 .return($P11) __label_3: # endif $P10 = $P1.'isop'(":") if_null $P10, __label_4 unless $P10 goto __label_4 $P3 = __ARG_1.'get'() $P10 = $P3.'isop'("(") set $I1, $P10 if $I1 goto __label_7 $P11 = $P3.'isidentifier'() set $I1, $P11 if $I1 goto __label_8 goto __label_6 __label_7: # case .tailcall WSubId_78($P1, __ARG_1, __ARG_2) __label_8: # case new $P12, [ 'Winxed'; 'Compiler'; 'ClassSpecifierId' ] $P12.'ClassSpecifierId'(__ARG_1, __ARG_2, $P3) set $P4, $P12 $P5 = __ARG_1.'get'() RequireIdentifier($P5) new $P6, [ 'Winxed'; 'Compiler'; 'VarStatement' ] $P6.'initvarbase'($P5, __ARG_2, $P5, 0) new $P7, [ 'Winxed'; 'Compiler'; 'NewQualifiedExpr' ] $P7.'Expr'($P6, $P5) setattribute $P7, 'nskey', $P4 $P1 = __ARG_1.'get'() $P14 = $P1.'isop'("(") if_null $P14, __label_9 unless $P14 goto __label_9 $P7.'parseinitializer'(__ARG_1) $P1 = __ARG_1.'get'() __label_9: # endif bindlast1(";", $P1) setattribute $P6, 'init', $P7 .return($P6) __label_6: # default WSubId_80("':'", $P1) __label_5: # switch end __label_4: # endif $P10 = $P1.'checkkeyword'() set $S1, $P10 if $S1 == "using" goto __label_12 if $S1 == "const" goto __label_13 if $S1 == "volatile" goto __label_14 if $S1 == "var" goto __label_15 if $S1 == "string" goto __label_16 if $S1 == "int" goto __label_17 if $S1 == "float" goto __label_18 if $S1 == "return" goto __label_19 if $S1 == "yield" goto __label_20 if $S1 == "goto" goto __label_21 if $S1 == "if" goto __label_22 if $S1 == "while" goto __label_23 if $S1 == "do" goto __label_24 if $S1 == "continue" goto __label_25 if $S1 == "break" goto __label_26 if $S1 == "switch" goto __label_27 if $S1 == "for" goto __label_28 if $S1 == "throw" goto __label_29 if $S1 == "try" goto __label_30 if $S1 == "inline" goto __label_31 goto __label_10 __label_12: # case .tailcall WSubId_81($P1, __ARG_1, __ARG_2) __label_13: # case .tailcall WSubId_82($P1, __ARG_1, __ARG_2) goto __label_11 # break __label_14: # case .tailcall WSubId_83($P1, __ARG_1, __ARG_2) goto __label_11 # break __label_15: # case $P2 = __ARG_1.'get'() __ARG_1.'unget'($P2) $P11 = $P2.'isop'("(") if $P11 goto __label_32 .tailcall WSubId_84($P1, __ARG_1, __ARG_2) __label_32: # endif goto __label_11 # break __label_16: # case $P2 = __ARG_1.'get'() __ARG_1.'unget'($P2) $P12 = $P2.'isop'("(") if $P12 goto __label_33 .tailcall WSubId_85($P1, __ARG_1, __ARG_2) __label_33: # endif goto __label_11 # break __label_17: # case $P2 = __ARG_1.'get'() __ARG_1.'unget'($P2) $P13 = $P2.'isop'("(") if $P13 goto __label_34 .tailcall WSubId_86($P1, __ARG_1, __ARG_2) __label_34: # endif goto __label_11 # break __label_18: # case $P2 = __ARG_1.'get'() __ARG_1.'unget'($P2) $P14 = $P2.'isop'("(") if $P14 goto __label_35 .tailcall WSubId_87($P1, __ARG_1, __ARG_2) __label_35: # endif goto __label_11 # break __label_19: # case .tailcall WSubId_88($P1, __ARG_1, __ARG_2) __label_20: # case new $P16, [ 'Winxed'; 'Compiler'; 'YieldStatement' ] $P16.'YieldStatement'($P1, __ARG_1, __ARG_2) set $P15, $P16 .return($P15) __label_21: # case .tailcall WSubId_89($P1, __ARG_1, __ARG_2) __label_22: # case new $P18, [ 'Winxed'; 'Compiler'; 'IfStatement' ] $P18.'IfStatement'($P1, __ARG_1, __ARG_2) set $P17, $P18 .return($P17) __label_23: # case new $P20, [ 'Winxed'; 'Compiler'; 'WhileStatement' ] $P20.'WhileStatement'($P1, __ARG_1, __ARG_2) set $P19, $P20 .return($P19) __label_24: # case new $P22, [ 'Winxed'; 'Compiler'; 'DoStatement' ] $P22.'DoStatement'($P1, __ARG_1, __ARG_2) set $P21, $P22 .return($P21) __label_25: # case new $P24, [ 'Winxed'; 'Compiler'; 'ContinueStatement' ] $P24.'ContinueStatement'($P1, __ARG_1, __ARG_2) set $P23, $P24 .return($P23) __label_26: # case new $P26, [ 'Winxed'; 'Compiler'; 'BreakStatement' ] $P26.'BreakStatement'($P1, __ARG_1, __ARG_2) set $P25, $P26 .return($P25) __label_27: # case .tailcall WSubId_90($P1, __ARG_1, __ARG_2) __label_28: # case .tailcall WSubId_91($P1, __ARG_1, __ARG_2) __label_29: # case new $P28, [ 'Winxed'; 'Compiler'; 'ThrowStatement' ] $P28.'ThrowStatement'($P1, __ARG_1, __ARG_2) set $P27, $P28 .return($P27) __label_30: # case new $P30, [ 'Winxed'; 'Compiler'; 'TryStatement' ] $P30.'TryStatement'($P1, __ARG_1, __ARG_2) set $P29, $P30 .return($P29) __label_31: # case new $P31, [ 'Winxed'; 'Compiler'; 'InlineStatement' ] $P31.'InlineStatement'($P1, __ARG_1, __ARG_2) set $P8, $P31 __ARG_2.'addinline'($P8) new $P32, [ 'Winxed'; 'Compiler'; 'EmptyStatement' ] .return($P32) __label_10: # default __label_11: # switch end $P10 = $P1.'isidentifier'() if_null $P10, __label_36 unless $P10 goto __label_36 $P9 = __ARG_1.'get'() $P10 = $P9.'isop'(":") if_null $P10, __label_37 unless $P10 goto __label_37 new $P12, [ 'Winxed'; 'Compiler'; 'LabelStatement' ] $P12.'LabelStatement'($P1, __ARG_2) set $P11, $P12 .return($P11) __label_37: # endif __ARG_1.'unget'($P9) __label_36: # endif __ARG_1.'unget'($P1) new $P11, [ 'Winxed'; 'Compiler'; 'ExprStatement' ] $P11.'ExprStatement'($P1, __ARG_1, __ARG_2) set $P10, $P11 .return($P10) .end # parseStatement .namespace [ 'Winxed'; 'Compiler'; 'Statement' ] .sub 'Statement' :method .param pmc __ARG_1 .param pmc __ARG_2 self.'initbase'(__ARG_1, __ARG_2) .end # Statement .sub 'isempty' :method .return(0) .end # isempty .sub 'allowtailcall' :method getattribute $P1, self, 'owner' .tailcall $P1.'allowtailcall'() .end # allowtailcall .sub 'createreg' :method .param string __ARG_1 getattribute $P1, self, 'owner' .tailcall $P1.'createreg'(__ARG_1) .end # createreg .sub 'tempreg' :method .param string __ARG_1 getattribute $P1, self, 'owner' .tailcall $P1.'tempreg'(__ARG_1) .end # tempreg .sub 'freetemps' :method getattribute $P1, self, 'owner' $P1.'freetemps'() .end # freetemps .sub 'genlabel' :method getattribute $P1, self, 'owner' .tailcall $P1.'genlabel'() .end # genlabel .sub 'getlabel' :method .param string __ARG_1 getattribute $P1, self, 'owner' .tailcall $P1.'getlabel'(__ARG_1) .end # getlabel .sub 'createlabel' :method .param pmc __ARG_1 getattribute $P1, self, 'owner' .tailcall $P1.'createlabel'(__ARG_1) .end # createlabel .sub 'createconst' :method .param pmc __ARG_1 .param string __ARG_2 .param int __ARG_3 :optional getattribute $P1, self, 'owner' .tailcall $P1.'createconst'(__ARG_1, __ARG_2, __ARG_3) .end # createconst .sub 'createvar' :method .param pmc __ARG_1 .param string __ARG_2 .param int __ARG_3 :optional getattribute $P1, self, 'owner' .tailcall $P1.'createvar'(__ARG_1, __ARG_2, __ARG_3) .end # createvar .sub 'createvarused' :method .param pmc __ARG_1 .param pmc __ARG_2 getattribute $P1, self, 'owner' .tailcall $P1.'createvarused'(__ARG_1, __ARG_2) .end # createvarused .sub 'createvarnamed' :method .param pmc __ARG_1 .param string __ARG_2 .param string __ARG_3 getattribute $P1, self, 'owner' .tailcall $P1.'createvarnamed'(__ARG_1, __ARG_2, __ARG_3) .end # createvarnamed .sub 'getvar' :method .param pmc __ARG_1 getattribute $P1, self, 'owner' .tailcall $P1.'getvar'(__ARG_1) .end # getvar .sub 'checkclass' :method .param string __ARG_1 getattribute $P1, self, 'owner' .tailcall $P1.'checkclass'(__ARG_1) .end # checkclass .sub 'usenamespace' :method .param pmc __ARG_1 getattribute $P1, self, 'owner' $P1.'usenamespace'(__ARG_1) .end # usenamespace .sub 'getouter' :method getattribute $P1, self, 'owner' .tailcall $P1.'getouter'() .end # getouter .sub 'getlexicalouter' :method getattribute $P1, self, 'owner' .tailcall $P1.'getlexicalouter'() .end # getlexicalouter .sub 'getcontinuelabel' :method .param pmc __ARG_1 getattribute $P1, self, 'owner' .tailcall $P1.'getcontinuelabel'(__ARG_1) .end # getcontinuelabel .sub 'getbreaklabel' :method .param pmc __ARG_1 getattribute $P1, self, 'owner' .tailcall $P1.'getbreaklabel'(__ARG_1) .end # getbreaklabel .sub 'optimize' :method .const 'Sub' InternalError = "InternalError" getattribute $P1, self, 'start' InternalError("**checking**", $P1) .return(self) .end # optimize .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'Statement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'CommonBase' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'EmptyStatement' ] .sub 'isempty' :method .return(1) .end # isempty .sub 'clone' :method .param pmc __ARG_1 .return(self) .end # clone .sub 'annotate' :method .param pmc __ARG_1 .const 'Sub' InternalError = "InternalError" InternalError("Attempt to annotate empty statement") .end # annotate .sub 'optimize' :method .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'EmptyStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Statement' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'MultiStatementBase' ] .sub 'optimize' :method getattribute $P1, self, 'statements' elements $I1, $P1 set $I2, 1 null $I3 __label_3: # for condition ge $I3, $I1, __label_2 $P3 = $P1[$I3] $P2 = $P3.'optimize'() unless $I2 goto __label_4 $P3 = $P2.'isempty'() if $P3 goto __label_4 null $I2 __label_4: # endif $P1[$I3] = $P2 __label_1: # for iteration inc $I3 goto __label_3 __label_2: # for end unless $I2 goto __label_6 new $P3, [ 'Winxed'; 'Compiler'; 'EmptyStatement' ] goto __label_5 __label_6: set $P3, self __label_5: .return($P3) .end # optimize .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'MultiStatementBase' ] addattribute $P0, 'statements' .end .namespace [ 'Winxed'; 'Compiler'; 'MultiStatement' ] .sub 'MultiStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 root_new $P2, ['parrot';'ResizablePMCArray'] assign $P2, 2 $P2[0] = __ARG_1 $P2[1] = __ARG_2 setattribute self, 'statements', $P2 .end # MultiStatement .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'MultiStatement' ] getattribute $P2, self, 'statements' set $P3, __ARG_1 .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" set $P4, $P2 root_new $P5, ['parrot';'ResizablePMCArray'] $P10 = bindmethod("clone") $P6 = bindlast($P10, $P3) if_null $P4, __label_2 iter $P11, $P4 set $P11, 0 __label_1: # for iteration unless $P11 goto __label_2 shift $P7, $P11 $P12 = $P6($P7) push $P5, $P12 goto __label_1 __label_2: # endfor set $P9, $P5 set $P8, $P9 setattribute $P1, 'statements', $P8 .return($P1) .end # clone .sub 'isempty' :method .return(0) .end # isempty .sub 'push' :method .param pmc __ARG_1 getattribute $P1, self, 'statements' push $P1, __ARG_1 .return(self) .end # push .sub 'emit' :method .param pmc __ARG_1 set $P1, __ARG_1 getattribute $P2, self, 'statements' .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" set $P3, $P2 $P6 = bindmethod("emit") $P4 = bindlast($P6, $P1) if_null $P3, __label_2 iter $P7, $P3 set $P7, 0 __label_1: # for iteration unless $P7 goto __label_2 shift $P5, $P7 $P4($P5) goto __label_1 __label_2: # endfor .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'MultiStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'MultiStatementBase' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'parsePiropArg' :subid('WSubId_93') .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' SyntaxError = "SyntaxError" .const 'Sub' WSubId_75 = "WSubId_75" null $P1 $P2 = __ARG_1.'get'() $P3 = $P2.'isop'(":") if_null $P3, __label_1 unless $P3 goto __label_1 $P2 = __ARG_1.'get'() $P3 = $P2.'isidentifier'() if $P3 goto __label_3 SyntaxError("Label expected", $P2) __label_3: # endif new $P3, [ 'Winxed'; 'Compiler'; 'Reflabel' ] $P3.'Reflabel'(__ARG_2, $P2) set $P1, $P3 goto __label_2 __label_1: # else __ARG_1.'unget'($P2) $P1 = WSubId_75(__ARG_1, __ARG_2) __label_2: # endif .return($P1) .end # parsePiropArg .namespace [ 'Winxed'; 'Compiler'; 'PiropStatement' ] .sub 'PiropStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' parseListOrEmpty = "parseListOrEmpty" .const 'Sub' WSubId_93 = "WSubId_93" .const 'Sub' ExpectOp = "ExpectOp" self.'Statement'(__ARG_1, __ARG_3) $P1 = __ARG_2.'get'() $P2 = $P1.'isop'(".") set $I1, $P2 unless $I1 goto __label_1 $P1 = __ARG_2.'get'() __label_1: # endif $P2 = $P1.'getidentifier'() null $S1 if_null $P2, __label_2 set $S1, $P2 __label_2: unless $I1 goto __label_4 set $S2, "." goto __label_3 __label_4: set $S2, "" __label_3: concat $S3, $S2, $S1 box $P2, $S3 setattribute self, 'opname', $P2 $P3 = parseListOrEmpty(__ARG_2, __ARG_3, WSubId_93, "}") setattribute self, 'args', $P3 ExpectOp(";", __ARG_2) .end # PiropStatement .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'PiropStatement' ] getattribute $P8, self, 'start' $P1.'Statement'($P8, __ARG_1) getattribute $P9, self, 'opname' setattribute $P1, 'opname', $P9 getattribute $P2, self, 'args' set $P3, __ARG_1 .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" set $P4, $P2 root_new $P5, ['parrot';'ResizablePMCArray'] $P9 = bindmethod("clone") $P6 = bindlast($P9, $P3) if_null $P4, __label_2 iter $P11, $P4 set $P11, 0 __label_1: # for iteration unless $P11 goto __label_2 shift $P7, $P11 $P12 = $P6($P7) push $P5, $P12 goto __label_1 __label_2: # endfor set $P10, $P5 set $P8, $P10 setattribute $P1, 'args', $P8 .return($P1) .end # clone .sub 'optimize' :method getattribute $P1, self, 'args' if_null $P1, __label_2 elements $I1, $P1 goto __label_1 __label_2: null $I1 __label_1: null $I2 __label_5: # for condition ge $I2, $I1, __label_4 $P3 = $P1[$I2] $P2 = $P3.'optimize'() $P1[$I2] = $P2 __label_3: # for iteration inc $I2 goto __label_5 __label_4: # for end .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" getattribute $P6, self, 'opname' null $S1 if_null $P6, __label_1 set $S1, $P6 __label_1: self.'annotate'(__ARG_1) $P6 = __ARG_1.'getDebug'() if_null $P6, __label_2 unless $P6 goto __label_2 __ARG_1.'comment'("pirop ", $S1) __label_2: # endif getattribute $P1, self, 'args' __ARG_1.'print'(" ") unless_null $P1, __label_3 __ARG_1.'say'($S1) goto __label_4 __label_3: # else set $P2, $P1 root_new $P3, ['parrot';'ResizablePMCArray'] $P6 = bindmethod("emit_get") $P4 = bindlast($P6, __ARG_1) if_null $P2, __label_6 iter $P8, $P2 set $P8, 0 __label_5: # for iteration unless $P8 goto __label_6 shift $P5, $P8 $P9 = $P4($P5) push $P3, $P9 goto __label_5 __label_6: # endfor set $P7, $P3 set $P6, $P7 join $S2, ", ", $P6 __ARG_1.'say'($S1, " ", $S2) __label_4: # endif .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'PiropStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Statement' ] addparent $P0, $P1 addattribute $P0, 'opname' addattribute $P0, 'args' .end .namespace [ 'Winxed'; 'Compiler'; 'ExternStatement' ] .sub 'ExternStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' parseDotted = "parseDotted" .const 'Sub' bindlast0 = "bindlast0" .const 'Sub' ExpectOp = "ExpectOp" .const 'Sub' WSubId_73 = "WSubId_73" self.'Statement'(__ARG_1, __ARG_3) $P1 = parseDotted(__ARG_2) elements $I1, $P1 if $I1 goto __label_1 $P2 = __ARG_2.'get'() bindlast0($P2) __label_1: # endif ExpectOp(";", __ARG_2) $P3 = WSubId_73($P1) setattribute self, 'path', $P3 .return(self) .end # ExternStatement .sub 'optimize' :method .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 self.'annotate'(__ARG_1) getattribute $P1, self, 'path' join $S1, "/", $P1 __ARG_1.'say'(" ", "load_bytecode '", $S1, ".pbc'") .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ExternStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Statement' ] addparent $P0, $P1 addattribute $P0, 'path' .end .namespace [ 'Winxed'; 'Compiler'; 'StaticStatement' ] .sub 'StaticStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' WSubId_74 = "WSubId_74" .const 'Sub' parseIdentifier = "parseIdentifier" self.'Statement'(__ARG_1, __ARG_3) null $P3 $P1 = WSubId_74(__ARG_2, $P3, parseIdentifier, ";") if_null $P1, __label_2 iter $P4, $P1 set $P4, 0 __label_1: # for iteration unless $P4 goto __label_2 shift $P2, $P4 $P3 = self.'generatesubid'() null $S1 if_null $P3, __label_3 set $S1, $P3 __label_3: self.'createvarnamed'($P2, "P", $S1) goto __label_1 __label_2: # endfor setattribute self, 'names', $P1 .end # StaticStatement .sub 'optimize' :method .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 self.'annotate'(__ARG_1) getattribute $P2, self, 'names' if_null $P2, __label_2 iter $P3, $P2 set $P3, 0 __label_1: # for iteration unless $P3 goto __label_2 shift $P1, $P3 $P5 = self.'getvar'($P1) $P4 = $P5.'getreg'() __ARG_1.'say'(".const 'Sub' ", $P4, " = '", $P1, "'") goto __label_1 __label_2: # endfor .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'StaticStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Statement' ] addparent $P0, $P1 addattribute $P0, 'names' .end .namespace [ 'Winxed'; 'Compiler'; 'UsingStatement' ] .sub 'UsingStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' parseDotted = "parseDotted" .const 'Sub' bindlast0 = "bindlast0" .const 'Sub' ExpectOp = "ExpectOp" self.'Statement'(__ARG_1, __ARG_3) $P1 = parseDotted(__ARG_2) elements $I1, $P1 if $I1 goto __label_1 $P2 = __ARG_2.'get'() bindlast0($P2) __label_1: # endif ExpectOp(";", __ARG_2) setattribute self, 'path', $P1 .end # UsingStatement .sub 'optimize' :method getattribute $P1, self, 'path' $P2 = $P1[-1] $P3 = self.'scopesearch'($P1, 0) if_null $P3, __label_3 isa $I1, $P3, [ 'Winxed'; 'Compiler'; 'FunctionStatement' ] if $I1 goto __label_4 goto __label_2 __label_3: # case elements $I2, $P1 unless $I2 goto __label_5 clone $P4, $P1 $P4.'pop'() $P5 = self.'scopesearch'($P4, 1) if_null $P5, __label_6 $P3 = $P5.'getvar'($P2) if_null $P3, __label_7 self.'createvarused'($P2, $P3) new $P6, [ 'Winxed'; 'Compiler'; 'EmptyStatement' ] .return($P6) __label_7: # endif __label_6: # endif __label_5: # endif goto __label_1 # break __label_4: # case $P6 = $P3.'makesubid'() null $S1 if_null $P6, __label_8 set $S1, $P6 __label_8: self.'createvarnamed'($P2, "P", $S1) box $P7, $S1 setattribute self, 'subid', $P7 self.'usesubid'($S1) .return(self) __label_2: # default __label_1: # switch end self.'createvar'($P2, "P") .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 getattribute $P1, self, 'path' $P2 = $P1[-1] $P3 = self.'getvar'($P2) getattribute $P5, self, 'subid' unless_null $P5, __label_1 self.'annotate'(__ARG_1) null $S1 elements $I1, $P1 le $I1, 1, __label_2 $P1.'pop'() set $P4, $P1 null $S2 elements $I1, $P4 unless $I1 goto __label_3 join $S3, "'; '", $P4 concat $S4, "[ '", $S3 concat $S4, $S4, "' ]" set $S2, $S4 __label_3: # endif set $S1, $S2 __label_2: # endif $P5 = $P3.'getreg'() $P6 = $P2.'getidentifier'() __ARG_1.'emitget_hll_global'($P5, $P6, $S1) __label_1: # endif .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'UsingStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Statement' ] addparent $P0, $P1 addattribute $P0, 'path' addattribute $P0, 'subid' .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'usingNamespace' :subid('WSubId_97') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' parseDotted = "parseDotted" .const 'Sub' Expected = "Expected" .const 'Sub' SyntaxError = "SyntaxError" $P1 = parseDotted(__ARG_2) elements $I1, $P1 if $I1 goto __label_1 Expected("namespace identifier", __ARG_1) __label_1: # endif $P2 = __ARG_3.'scopesearch'($P1, 1) unless_null $P2, __label_2 SyntaxError("unknow namespace", __ARG_1) __label_2: # endif __ARG_3.'usenamespace'($P2) .end # usingNamespace .namespace [ 'Winxed'; 'Compiler'; 'UsingNamespaceStatement' ] .sub 'UsingNamespaceStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' WSubId_97 = "WSubId_97" .const 'Sub' ExpectOp = "ExpectOp" self.'Statement'(__ARG_1, __ARG_3) WSubId_97(__ARG_1, __ARG_2, __ARG_3) ExpectOp(";", __ARG_2) .end # UsingNamespaceStatement .sub 'optimize' :method .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'UsingNamespaceStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Statement' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'ExprStatement' ] .sub 'ExprStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' WSubId_74 = "WSubId_74" .const 'Sub' WSubId_75 = "WSubId_75" self.'Statement'(__ARG_1, __ARG_3) $P2 = WSubId_74(__ARG_2, self, WSubId_75, ";") setattribute self, 'expr', $P2 .end # ExprStatement .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'ExprStatement' ] getattribute $P8, self, 'start' $P1.'Statement'($P8, __ARG_1) getattribute $P2, self, 'expr' set $P3, __ARG_1 .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" set $P4, $P2 root_new $P5, ['parrot';'ResizablePMCArray'] $P10 = bindmethod("clone") $P6 = bindlast($P10, $P3) if_null $P4, __label_2 iter $P11, $P4 set $P11, 0 __label_1: # for iteration unless $P11 goto __label_2 shift $P7, $P11 $P12 = $P6($P7) push $P5, $P12 goto __label_1 __label_2: # endfor set $P9, $P5 set $P8, $P9 setattribute $P1, 'expr', $P8 .return($P1) .end # clone .sub 'optimize' :method getattribute $P1, self, 'expr' if_null $P1, __label_2 elements $I1, $P1 goto __label_1 __label_2: null $I1 __label_1: null $I2 __label_5: # for condition ge $I2, $I1, __label_4 $P3 = $P1[$I2] $P2 = $P3.'optimize'() $P1[$I2] = $P2 __label_3: # for iteration inc $I2 goto __label_5 __label_4: # for end .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" getattribute $P1, self, 'expr' $P4 = bindmethod("emit_void") $P2 = bindlast($P4, __ARG_1) if_null $P1, __label_2 iter $P5, $P1 set $P5, 0 __label_1: # for iteration unless $P5 goto __label_2 shift $P3, $P5 $P2($P3) goto __label_1 __label_2: # endfor .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ExprStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Statement' ] addparent $P0, $P1 addattribute $P0, 'expr' .end .namespace [ 'Winxed'; 'Compiler'; 'VarData' ] .sub 'VarData' :method .param string __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param int __ARG_4 box $P1, __ARG_1 setattribute self, 'type', $P1 setattribute self, 'reg', __ARG_2 setattribute self, 'scope', __ARG_3 box $P1, __ARG_4 setattribute self, 'flags', $P1 .end # VarData .sub 'setlex' :method .param string __ARG_1 box $P1, __ARG_1 setattribute self, 'lexname', $P1 .end # setlex .sub 'createlex' :method .param string __ARG_1 self.'setlex'(__ARG_1) $P2 = self.'getscope'() $P1 = $P2.'getouter'() getattribute $P3, self, 'reg' $P1.'setlex'(__ARG_1, $P3) .end # createlex .sub 'gettype' :method getattribute $P1, self, 'type' .return($P1) .end # gettype .sub 'getreg' :method getattribute $P1, self, 'reg' .return($P1) .end # getreg .sub 'getscope' :method getattribute $P1, self, 'scope' .return($P1) .end # getscope .sub 'getvalue' :method getattribute $P1, self, 'value' .return($P1) .end # getvalue .sub 'isconst' :method .return(0) .end # isconst .sub 'getlex' :method getattribute $P1, self, 'lexname' if_null $P1, __label_2 set $S1, $P1 goto __label_1 __label_2: null $S1 __label_1: .return($S1) .end # getlex .sub 'getflags' :method getattribute $P1, self, 'flags' .return($P1) .end # getflags .sub 'issubid' :method getattribute $P1, self, 'reg' isnull $I1, $P1 not $I1 unless $I1 goto __label_1 set $S2, $P1 substr $S1, $S2, 0, 7 iseq $I1, $S1, "WSubId_" __label_1: .return($I1) .end # issubid .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'VarData' ] addattribute $P0, 'type' addattribute $P0, 'reg' addattribute $P0, 'scope' addattribute $P0, 'flags' addattribute $P0, 'lexname' .end .namespace [ 'Winxed'; 'Compiler'; 'ConstantInternalFail' ] .sub 'ConstantInternalFail' :method .param pmc __ARG_1 setattribute self, 'name', __ARG_1 .end # ConstantInternalFail .sub 'get_string' :method :vtable .const 'Sub' InternalError = "InternalError" getattribute $P1, self, 'name' InternalError("Attempt to use unexpanded constant!!!", $P1) .end # get_string .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ConstantInternalFail' ] addattribute $P0, 'name' .end .namespace [ 'Winxed'; 'Compiler'; 'VarData_const' ] .sub 'VarData_const' :method .param string __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param int __ARG_4 new $P2, [ 'Winxed'; 'Compiler'; 'ConstantInternalFail' ] $P2.'ConstantInternalFail'(__ARG_2) set $P1, $P2 self.'VarData'(__ARG_1, $P1, __ARG_3, __ARG_4) .end # VarData_const .sub 'isconst' :method .return(1) .end # isconst .sub 'setvalue' :method .param pmc __ARG_1 .const 'Sub' InternalError = "InternalError" getattribute $P1, self, 'value' if_null $P1, __label_1 InternalError("Attempt change value of constant!!!") __label_1: # endif setattribute self, 'value', __ARG_1 .end # setvalue .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'VarData_const' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'VarData' ] addparent $P0, $P1 addattribute $P0, 'value' .end .namespace [ 'Winxed'; 'Compiler'; 'VarContainer' ] .sub 'VarContainer' :method root_new $P2, ['parrot';'Hash'] setattribute self, 'locals', $P2 .end # VarContainer .sub 'createvar' :method .param pmc __ARG_1 .param string __ARG_2 .param int __ARG_3 :optional .const 'Sub' WSubId_98 = "WSubId_98" $P4 = __ARG_1.'getidentifier'() null $S1 if_null $P4, __label_1 set $S1, $P4 __label_1: getattribute $P1, self, 'locals' $P2 = $P1[$S1] if_null $P2, __label_2 WSubId_98(__ARG_1) __label_2: # endif $P4 = self.'createreg'(__ARG_2) null $S2 if_null $P4, __label_3 set $S2, $P4 __label_3: new $P4, [ 'Winxed'; 'Compiler'; 'VarData' ] $P4.'VarData'(__ARG_2, $S2, self, __ARG_3) set $P3, $P4 $P1[$S1] = $P3 .return($P3) .end # createvar .sub 'createvarused' :method .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_98 = "WSubId_98" getattribute $P1, self, 'locals' null $S1 if_null __ARG_1, __label_1 set $S1, __ARG_1 __label_1: $P2 = $P1[$S1] if_null $P2, __label_2 WSubId_98(__ARG_1) __label_2: # endif $P1[$S1] = __ARG_2 .end # createvarused .sub 'createvarnamed' :method .param pmc __ARG_1 .param string __ARG_2 .param string __ARG_3 .const 'Sub' WSubId_98 = "WSubId_98" null $S1 if_null __ARG_1, __label_1 set $S1, __ARG_1 __label_1: getattribute $P1, self, 'locals' $P2 = $P1[$S1] if_null $P2, __label_2 WSubId_98(__ARG_1) __label_2: # endif new $P4, [ 'Winxed'; 'Compiler'; 'VarData' ] $P4.'VarData'(__ARG_2, __ARG_3, self, 0) set $P3, $P4 $P1[$S1] = $P3 .end # createvarnamed .sub 'createconst' :method .param pmc __ARG_1 .param string __ARG_2 .param int __ARG_3 :optional .const 'Sub' WSubId_98 = "WSubId_98" $P4 = __ARG_1.'getidentifier'() null $S1 if_null $P4, __label_1 set $S1, $P4 __label_1: getattribute $P1, self, 'locals' $P2 = $P1[$S1] if_null $P2, __label_2 WSubId_98(__ARG_1) __label_2: # endif new $P4, [ 'Winxed'; 'Compiler'; 'VarData_const' ] $P4.'VarData_const'(__ARG_2, __ARG_1, self, __ARG_3) set $P3, $P4 $P1[$S1] = $P3 .return($P3) .end # createconst .sub 'getlocalvar' :method .param pmc __ARG_1 getattribute $P1, self, 'locals' set $S1, __ARG_1 $P2 = $P1[$S1] .return($P2) .end # getlocalvar .sub 'getusedvar' :method .param pmc __ARG_1 null $P1 getattribute $P3, self, 'usednamespaces' if_null $P3, __label_2 iter $P4, $P3 set $P4, 0 __label_1: # for iteration unless $P4 goto __label_2 shift $P2, $P4 $P1 = $P2.'getlocalvar'(__ARG_1) if_null $P1, __label_3 .return($P1) __label_3: # endif goto __label_1 __label_2: # endfor null $P3 .return($P3) .end # getusedvar .sub 'getvar' :method .param pmc __ARG_1 null $P1 $P1 = self.'getlocalvar'(__ARG_1) if_null $P1, __label_1 .return($P1) __label_1: # endif $P1 = self.'getusedvar'(__ARG_1) if_null $P1, __label_2 .return($P1) __label_2: # endif getattribute $P2, self, 'owner' if_null $P2, __label_3 .tailcall $P2.'getvar'(__ARG_1) __label_3: # endif null $P3 .return($P3) .end # getvar .sub 'makelexical' :method .param pmc __ARG_1 $P1 = self.'getlexicalouter'() $P2 = $P1.'createlex'(__ARG_1) null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: .return($S1) .end # makelexical .sub 'makelexicalself' :method self.'setlex'("'__WLEX_self'", "self") .return("'__WLEX_self'") .end # makelexicalself .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'VarContainer' ] addattribute $P0, 'locals' addattribute $P0, 'usednamespaces' .end .namespace [ 'Winxed'; 'Compiler'; 'BlockStatement' ] .sub 'BlockStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 self.'Statement'(__ARG_1, __ARG_2) self.'VarContainer'() .end # BlockStatement .sub 'addinline' :method .param pmc __ARG_1 getattribute $P2, __ARG_1, 'name' null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: getattribute $P1, self, 'inlines' if_null $P1, __label_2 $P1[$S1] = __ARG_1 goto __label_3 __label_2: # else root_new $P3, ['parrot';'Hash'] $P3[$S1] = __ARG_1 setattribute self, 'inlines', $P3 __label_3: # endif .end # addinline .sub 'scopesearch' :method .param pmc __ARG_1 .param int __ARG_2 if __ARG_2 goto __label_1 elements $I1, __ARG_1 ne $I1, 1, __label_1 getattribute $P1, self, 'inlines' if_null $P1, __label_2 $S1 = __ARG_1[0] $P2 = $P1[$S1] if_null $P2, __label_3 .return($P2) __label_3: # endif __label_2: # endif __label_1: # endif getattribute $P3, self, 'owner' .tailcall $P3.'scopesearch'(__ARG_1, __ARG_2) .end # scopesearch .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'BlockStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'VarContainer' ] addparent $P0, $P1 get_class $P2, [ 'Winxed'; 'Compiler'; 'Statement' ] addparent $P0, $P2 addattribute $P0, 'inlines' .end .namespace [ 'Winxed'; 'Compiler'; 'Expr' ] .sub 'Expr' :method .param pmc __ARG_1 .param pmc __ARG_2 self.'initbase'(__ARG_2, __ARG_1) .end # Expr .sub 'issimple' :method .return(0) .end # issimple .sub 'isliteral' :method .return(0) .end # isliteral .sub 'isintegerliteral' :method .return(0) .end # isintegerliteral .sub 'isintegerzero' :method .return(0) .end # isintegerzero .sub 'isfloatliteral' :method .return(0) .end # isfloatliteral .sub 'isstringliteral' :method .return(0) .end # isstringliteral .sub 'isidentifier' :method .return(0) .end # isidentifier .sub 'isnull' :method .return(0) .end # isnull .sub 'hascompilevalue' :method .return(0) .end # hascompilevalue .sub 'isnegable' :method .return(0) .end # isnegable .sub 'tempreg' :method .param string __ARG_1 getattribute $P1, self, 'owner' .tailcall $P1.'tempreg'(__ARG_1) .end # tempreg .sub 'genlabel' :method getattribute $P1, self, 'owner' .tailcall $P1.'genlabel'() .end # genlabel .sub 'optimize' :method .return(self) .end # optimize .sub 'cantailcall' :method .return(0) .end # cantailcall .sub 'emit_init' :method .param pmc __ARG_1 .param string __ARG_2 self.'emit'(__ARG_1, __ARG_2) .end # emit_init .sub 'emit_get' :method .param pmc __ARG_1 $P2 = self.'checkresult'() $P1 = self.'tempreg'($P2) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: self.'emit'(__ARG_1, $S1) .return($S1) .end # emit_get .sub 'emit_void' :method .param pmc __ARG_1 .const 'Sub' InternalError = "InternalError" $P1 = self.'checkresult'() null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: null $S2 if_null $S1, __label_2 length $I1, $S1 ne $I1, 1, __label_2 ord $I1, $S1 if $I1 == 73 goto __label_4 if $I1 == 78 goto __label_5 if $I1 == 83 goto __label_6 if $I1 == 80 goto __label_7 goto __label_2 __label_4: # case set $S2, "$I0" goto __label_3 # break __label_5: # case set $S2, "$N0" goto __label_3 # break __label_6: # case set $S2, "$S0" goto __label_3 # break __label_7: # case set $S2, "$P0" goto __label_3 # break __label_2: # default concat $S3, "Unexcpected emit_void with type '", $S1 concat $S3, $S3, "'" getattribute $P1, self, 'start' InternalError($S3, $P1) __label_3: # switch end self.'emit'(__ARG_1, $S2) .end # emit_void .sub 'emit_get_nonull' :method .param pmc __ARG_1 .tailcall self.'emit_get'(__ARG_1) .end # emit_get_nonull .sub 'emit_getint' :method .param pmc __ARG_1 $P1 = self.'emit_get_nonull'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: $P1 = self.'checkresult'() set $S3, $P1 eq $S3, "I", __label_2 $P2 = self.'tempreg'("I") null $S2 if_null $P2, __label_3 set $S2, $P2 __label_3: self.'annotate'(__ARG_1) __ARG_1.'emitset'($S2, $S1) set $S1, $S2 __label_2: # endif .return($S1) .end # emit_getint .sub 'emit_getvar' :method .param pmc __ARG_1 $P1 = self.'checkresult'() null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: $P1 = self.'emit_get'(__ARG_1) null $S2 if_null $P1, __label_2 set $S2, $P1 __label_2: eq $S1, "P", __label_3 set $S3, $S2 $P1 = self.'tempreg'("P") set $S2, $P1 __ARG_1.'emitbox'($S2, $S3) __label_3: # endif .return($S2) .end # emit_getvar .sub 'emit_assign_get' :method .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_99 = "WSubId_99" WSubId_99(self) .end # emit_assign_get .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'Expr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'CommonBase' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'SimpleExpr' ] .sub 'issimple' :method .return(1) .end # issimple .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'SimpleExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Expr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'FinalExpr' ] .sub 'optimize' :method .const 'Sub' InternalError = "InternalError" typeof $P1, self set $S1, $P1 concat $S2, "misuse of ", $S1 InternalError($S2, self) .end # optimize .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'FinalExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Expr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'FunctionExpr' ] .sub 'FunctionExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' Expected = "Expected" self.'Expr'(__ARG_2, __ARG_3) $P1 = __ARG_1.'get'() $P2 = $P1.'isop'("(") if $P2 goto __label_1 Expected("anonymous function", $P1) __label_1: # endif new $P4, [ 'Winxed'; 'Compiler'; 'LocalFunctionStatement' ] $P4.'LocalFunctionStatement'(__ARG_3, __ARG_1, __ARG_2) set $P3, $P4 setattribute self, 'fn', $P3 .end # FunctionExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'FunctionExpr' ] getattribute $P2, self, 'start' $P1.'Expr'(__ARG_1, $P2) getattribute $P4, self, 'fn' $P3 = $P4.'clone'(__ARG_1) setattribute $P1, 'fn', $P3 .return($P1) .end # clone .sub 'checkresult' :method .return("P") .end # checkresult .sub 'optimize' :method getattribute $P3, self, 'fn' $P2 = $P3.'optimize'() setattribute self, 'fn', $P2 getattribute $P2, self, 'fn' $P1 = $P2.'getsubid'() self.'usesubid'($P1) .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 self.'annotate'(__ARG_1) getattribute $P1, self, 'fn' $P2 = $P1.'getsubid'() null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: $P2 = $P1.'needclosure'() if_null $P2, __label_2 unless $P2 goto __label_2 __ARG_1.'emitarg2'("newclosure", __ARG_2, $S1) goto __label_3 __label_2: # else __ARG_1.'emitset'(__ARG_2, $S1) __label_3: # endif .end # emit .sub 'emit_void' :method .param pmc __ARG_1 .end # emit_void .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'FunctionExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Expr' ] addparent $P0, $P1 addattribute $P0, 'fn' .end .namespace [ 'Winxed'; 'Compiler' ] .namespace [ 'Winxed'; 'Compiler'; 'ConditionFriendlyIf' ] .sub 'emit_if' :method .param pmc __ARG_1 .param string __ARG_2 .const 'Sub' InternalError = "InternalError" InternalError("Winxed.Compiler.ConditionFriendlyIf.emit_if not overriden", self) .end # emit_if .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ConditionFriendlyIf' ] .end .namespace [ 'Winxed'; 'Compiler'; 'ConditionFriendlyElse' ] .sub 'emit_else' :method .param pmc __ARG_1 .param string __ARG_2 .const 'Sub' InternalError = "InternalError" InternalError("Winxed.Compiler.ConditionFriendlyElse.emit_else not overriden", self) .end # emit_else .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ConditionFriendlyElse' ] .end .namespace [ 'Winxed'; 'Compiler'; 'ConditionFriendlyExpr' ] .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ConditionFriendlyExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'ConditionFriendlyIf' ] addparent $P0, $P1 get_class $P2, [ 'Winxed'; 'Compiler'; 'ConditionFriendlyElse' ] addparent $P0, $P2 .end .namespace [ 'Winxed'; 'Compiler'; 'Condition' ] .sub 'set' :method .param pmc __ARG_1 setattribute self, 'condexpr', __ARG_1 .return(self) .end # set .sub 'optimize_condition' :method getattribute $P3, self, 'condexpr' $P2 = $P3.'optimize'() setattribute self, 'condexpr', $P2 .end # optimize_condition .sub 'optimize' :method getattribute $P3, self, 'condexpr' $P2 = $P3.'optimize'() setattribute self, 'condexpr', $P2 .return(self) .end # optimize .sub 'getvalue' :method getattribute $P1, self, 'condexpr' $P2 = $P1.'isintegerliteral'() if_null $P2, __label_1 unless $P2 goto __label_1 $P3 = $P1.'isintegerzero'() if_null $P3, __label_3 unless $P3 goto __label_3 set $I1, 2 goto __label_2 __label_3: set $I1, 1 __label_2: .return($I1) __label_1: # endif .return(0) .end # getvalue .sub 'emit_if' :method .param pmc __ARG_1 .param string __ARG_2 .param string __ARG_3 .const 'Sub' InternalError = "InternalError" getattribute $P1, self, 'condexpr' isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'ConditionFriendlyIf' ] unless $I1 goto __label_1 $P1.'emit_if'(__ARG_1, __ARG_2) goto __label_2 __label_1: # else $P2 = $P1.'emit_get'(__ARG_1) null $S1 if_null $P2, __label_3 set $S1, $P2 __label_3: $P2 = $P1.'checkresult'() set $S2, $P2 if_null $S2, __label_4 length $I1, $S2 ne $I1, 1, __label_4 ord $I1, $S2 if $I1 == 80 goto __label_6 if $I1 == 83 goto __label_7 if $I1 == 73 goto __label_8 if $I1 == 78 goto __label_9 goto __label_4 __label_6: # case __ARG_1.'emitif_null'($S1, __ARG_3) __label_7: # case __label_8: # case __label_9: # case __ARG_1.'emitif'($S1, __ARG_2) goto __label_5 # break __label_4: # default InternalError("Invalid if condition") __label_5: # switch end __label_2: # endif .end # emit_if .sub 'emit_else' :method .param pmc __ARG_1 .param string __ARG_2 .const 'Sub' InternalError = "InternalError" getattribute $P1, self, 'condexpr' isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'ConditionFriendlyElse' ] unless $I1 goto __label_1 $P1.'emit_else'(__ARG_1, __ARG_2) goto __label_2 __label_1: # else $P2 = $P1.'emit_get'(__ARG_1) null $S1 if_null $P2, __label_3 set $S1, $P2 __label_3: $P2 = $P1.'checkresult'() set $S2, $P2 if_null $S2, __label_4 length $I1, $S2 ne $I1, 1, __label_4 ord $I1, $S2 if $I1 == 80 goto __label_6 if $I1 == 83 goto __label_7 if $I1 == 73 goto __label_8 if $I1 == 78 goto __label_9 goto __label_4 __label_6: # case __ARG_1.'emitif_null'($S1, __ARG_2) __label_7: # case __label_8: # case __label_9: # case __ARG_1.'emitunless'($S1, __ARG_2) goto __label_5 # break __label_4: # default InternalError("Invalid if condition") __label_5: # switch end __label_2: # endif .end # emit_else .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'Condition' ] addattribute $P0, 'condexpr' .end .namespace [ 'Winxed'; 'Compiler'; 'Literal' ] .sub 'isliteral' :method .return(1) .end # isliteral .sub 'hascompilevalue' :method .return(1) .end # hascompilevalue .sub 'emit_void' :method .param pmc __ARG_1 .end # emit_void .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'Literal' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'SimpleExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'IntegerLiteral' ] .sub 'IntegerLiteral' :method .param pmc __ARG_1 .param pmc __ARG_2 .param int __ARG_3 self.'Expr'(__ARG_1, __ARG_2) box $P1, __ARG_3 setattribute self, 'intval', $P1 .end # IntegerLiteral .sub 'clone' :method .param pmc __ARG_1 new $P2, [ 'Winxed'; 'Compiler'; 'IntegerLiteral' ] getattribute $P3, self, 'start' getattribute $P4, self, 'intval' $P2.'IntegerLiteral'(__ARG_1, $P3, $P4) set $P1, $P2 .return($P1) .end # clone .sub 'isintegerliteral' :method .return(1) .end # isintegerliteral .sub 'isintegerzero' :method getattribute $P1, self, 'intval' set $I2, $P1 iseq $I1, $I2, 0 .return($I1) .end # isintegerzero .sub 'checkresult' :method .return("I") .end # checkresult .sub 'getIntegerValue' :method getattribute $P1, self, 'intval' set $I1, $P1 .return($I1) .end # getIntegerValue .sub 'getFloatValue' :method getattribute $P1, self, 'intval' set $N1, $P1 .return($N1) .end # getFloatValue .sub 'getStringValue' :method getattribute $P1, self, 'intval' set $S1, $P1 .return($S1) .end # getStringValue .sub 'getLiteralInteger' :method .return(self) .end # getLiteralInteger .sub 'getLiteralFloat' :method .const 'Sub' WSubId_100 = "WSubId_100" getattribute $P1, self, 'owner' getattribute $P2, self, 'start' getattribute $P3, self, 'intval' .tailcall WSubId_100($P1, $P2, $P3) .end # getLiteralFloat .sub 'getLiteralString' :method .const 'Sub' bindmethod0 = "bindmethod0" getattribute $P1, self, 'owner' getattribute $P2, self, 'start' getattribute $P3, self, 'intval' .tailcall bindmethod0($P1, $P2, $P3) .end # getLiteralString .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 $P1 = self.'getIntegerValue'() set $I1, $P1 if $I1 goto __label_1 __ARG_1.'emitnull'(__ARG_2) goto __label_2 __label_1: # else __ARG_1.'emitset'(__ARG_2, $I1) __label_2: # endif .end # emit .sub 'emit_get' :method .param pmc __ARG_1 .tailcall self.'getIntegerValue'() .end # emit_get .sub 'emit_getint' :method .param pmc __ARG_1 .tailcall self.'getIntegerValue'() .end # emit_getint .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'IntegerLiteral' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Literal' ] addparent $P0, $P1 addattribute $P0, 'intval' .end .namespace [ 'Winxed'; 'Compiler'; 'FloatLiteral' ] .sub 'FloatLiteral' :method .param pmc __ARG_1 .param pmc __ARG_2 self.'Expr'(__ARG_1, __ARG_2) setattribute self, 'numval', __ARG_2 .end # FloatLiteral .sub 'clone' :method .param pmc __ARG_1 new $P2, [ 'Winxed'; 'Compiler'; 'FloatLiteral' ] getattribute $P3, self, 'numval' $P2.'FloatLiteral'(__ARG_1, $P3) set $P1, $P2 .return($P1) .end # clone .sub 'isfloatliteral' :method .return(1) .end # isfloatliteral .sub 'checkresult' :method .return("N") .end # checkresult .sub 'getIntegerValue' :method $P1 = self.'getFloatValue'() set $I1, $P1 .return($I1) .end # getIntegerValue .sub 'getFloatValue' :method getattribute $P2, self, 'numval' $P1 = $P2.'getfloatvalue'() set $N1, $P1 .return($N1) .end # getFloatValue .sub 'getStringValue' :method $P1 = self.'getFloatValue'() null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: .return($S1) .end # getStringValue .sub 'getLiteralInteger' :method .const 'Sub' integerValue = "integerValue" getattribute $P1, self, 'owner' getattribute $P2, self, 'start' $P3 = self.'getFloatValue'() .tailcall integerValue($P1, $P2, $P3) .end # getLiteralInteger .sub 'getLiteralFloat' :method .return(self) .end # getLiteralFloat .sub 'getLiteralString' :method .const 'Sub' bindmethod0 = "bindmethod0" getattribute $P1, self, 'owner' getattribute $P2, self, 'start' $P3 = self.'getFloatValue'() .tailcall bindmethod0($P1, $P2, $P3) .end # getLiteralString .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 $P1 = self.'emit_get'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: __ARG_1.'emitset'(__ARG_2, $S1) .end # emit .sub 'emit_get' :method .param pmc __ARG_1 .const 'Sub' floatAsString = "floatAsString" $P1 = self.'getFloatValue'() set $N1, $P1 .tailcall floatAsString($N1) .end # emit_get .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'FloatLiteral' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Literal' ] addparent $P0, $P1 addattribute $P0, 'numval' .end .namespace [ 'Winxed'; 'Compiler'; 'StringLiteral' ] .sub 'StringLiteral' :method .param pmc __ARG_1 .param pmc __ARG_2 self.'Expr'(__ARG_1, __ARG_2) setattribute self, 'strval', __ARG_2 .end # StringLiteral .sub 'clone' :method .param pmc __ARG_1 new $P2, [ 'Winxed'; 'Compiler'; 'StringLiteral' ] getattribute $P3, self, 'strval' $P2.'StringLiteral'(__ARG_1, $P3) set $P1, $P2 .return($P1) .end # clone .sub 'isstringliteral' :method .return(1) .end # isstringliteral .sub 'checkresult' :method .return("S") .end # checkresult .sub 'getPirString' :method getattribute $P1, self, 'strval' $P2 = $P1.'getPirString'() null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: .return($S1) .end # getPirString .sub 'getIntegerValue' :method $P1 = self.'getStringValue'() set $I1, $P1 .return($I1) .end # getIntegerValue .sub 'getFloatValue' :method $P1 = self.'getStringValue'() set $N1, $P1 .return($N1) .end # getFloatValue .sub 'getStringValue' :method getattribute $P1, self, 'strval' getattribute $P2, $P1, 'str' null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'TokenQuoted' ] unless $I1 goto __label_2 $P0 = new ["String"] $P0 = $S1 $S1 = $P0."unescape"("utf8") __label_2: # endif .return($S1) .end # getStringValue .sub 'getLiteralInteger' :method .const 'Sub' integerValue = "integerValue" getattribute $P1, self, 'owner' getattribute $P2, self, 'start' $P3 = self.'getStringValue'() .tailcall integerValue($P1, $P2, $P3) .end # getLiteralInteger .sub 'getLiteralFloat' :method .const 'Sub' WSubId_100 = "WSubId_100" getattribute $P1, self, 'owner' getattribute $P2, self, 'start' $P3 = self.'getStringValue'() .tailcall WSubId_100($P1, $P2, $P3) .end # getLiteralFloat .sub 'getLiteralString' :method .return(self) .end # getLiteralString .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 $P1 = self.'getPirString'() __ARG_1.'emitset'(__ARG_2, $P1) .end # emit .sub 'emit_get' :method .param pmc __ARG_1 .tailcall self.'getPirString'() .end # emit_get .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'StringLiteral' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Literal' ] addparent $P0, $P1 addattribute $P0, 'strval' .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'concat_literal' :subid('WSubId_104') .param pmc __ARG_1 .param pmc __ARG_2 getattribute $P1, __ARG_1, 'strval' getattribute $P2, __ARG_2, 'strval' $P4 = $P1.'issinglequoted'() unless $P4 goto __label_2 $P5 = $P2.'issinglequoted'() unless $P5 goto __label_2 new $P6, [ 'Winxed'; 'Compiler'; 'TokenSingleQuoted' ] getattribute $P7, $P1, 'file' getattribute $P8, $P1, 'line' getattribute $P9, $P1, 'str' set $S1, $P9 getattribute $P10, $P2, 'str' set $S2, $P10 concat $S3, $S1, $S2 $P6.'TokenSingleQuoted'($P7, $P8, $S3) set $P3, $P6 goto __label_1 __label_2: new $P12, [ 'Winxed'; 'Compiler'; 'TokenQuoted' ] getattribute $P13, $P1, 'file' getattribute $P14, $P1, 'line' $S4 = $P1.'getasquoted'() $S5 = $P2.'getasquoted'() concat $S6, $S4, $S5 $P12.'TokenQuoted'($P13, $P14, $S6) set $P11, $P12 set $P3, $P11 __label_1: new $P5, [ 'Winxed'; 'Compiler'; 'StringLiteral' ] getattribute $P6, __ARG_1, 'owner' $P5.'StringLiteral'($P6, $P3) set $P4, $P5 .return($P4) .end # concat_literal .namespace [ 'Winxed'; 'Compiler'; 'FunctionId' ] .sub 'FunctionId' :method .param pmc __ARG_1 .param pmc __ARG_2 .param string __ARG_3 self.'Expr'(__ARG_1, __ARG_2) box $P1, __ARG_3 setattribute self, 'subid', $P1 .end # FunctionId .sub 'checkresult' :method .return("P") .end # checkresult .sub 'emitvar' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P1, self, 'start' root_new $P4, ['parrot';'ResizablePMCArray'] assign $P4, 1 $P4[0] = $P1 $P2 = self.'scopesearch'($P4, 0) getattribute $P4, $P2, 'owner' $P3 = $P4.'getpath'() self.'annotate'(__ARG_1) $P4 = $P3.'getparrotkey'() __ARG_1.'emitget_hll_global'(__ARG_2, $P1, $P4) .end # emitvar .sub 'emit_get' :method .param pmc __ARG_1 getattribute $P1, self, 'subid' .return($P1) .end # emit_get .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 self.'annotate'(__ARG_1) getattribute $P1, self, 'subid' __ARG_1.'emitset'(__ARG_2, $P1) .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'FunctionId' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'FinalExpr' ] addparent $P0, $P1 addattribute $P0, 'subid' .end .namespace [ 'Winxed'; 'Compiler'; 'FunctionRef' ] .sub 'FunctionRef' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'Expr'(__ARG_1, __ARG_2) setattribute self, 'sym', __ARG_3 .end # FunctionRef .sub 'checkresult' :method .return("P") .end # checkresult .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P1, self, 'sym' getattribute $P3, $P1, 'owner' $P2 = $P3.'getpath'() self.'annotate'(__ARG_1) getattribute $P3, self, 'owner' getattribute $P4, $P1, 'name' $P2.'emit_get_global'(__ARG_1, $P3, __ARG_2, $P4) .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'FunctionRef' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'FinalExpr' ] addparent $P0, $P1 addattribute $P0, 'sym' .end .namespace [ 'Winxed'; 'Compiler'; 'NullExpr' ] .sub 'NullExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 self.'Expr'(__ARG_1, __ARG_2) .end # NullExpr .sub 'isnull' :method .return(1) .end # isnull .sub 'emit_get_nonull' :method .param pmc __ARG_1 .const 'Sub' SyntaxError = "SyntaxError" SyntaxError("Invalid 'null' usage", self) .end # emit_get_nonull .sub 'checkresult' :method .return("P") .end # checkresult .sub 'emit_void' :method .param pmc __ARG_1 .end # emit_void .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 self.'annotate'(__ARG_1) __ARG_1.'emitnull'(__ARG_2) .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'NullExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'FinalExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'IdentifierExpr' ] .sub 'isidentifier' :method .return(1) .end # isidentifier .sub 'IdentifierExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 self.'Expr'(__ARG_1, __ARG_2) setattribute self, 'name', __ARG_2 .end # IdentifierExpr .sub 'clone' :method .param pmc __ARG_1 new $P2, [ 'Winxed'; 'Compiler'; 'IdentifierExpr' ] getattribute $P3, self, 'name' $P2.'IdentifierExpr'(__ARG_1, $P3) set $P1, $P2 .return($P1) .end # clone .sub 'isnull' :method getattribute $P1, self, 'name' getattribute $P3, self, 'owner' $P2 = $P3.'getvar'($P1) if_null $P2, __label_1 .return(0) __label_1: # endif .tailcall $P1.'iskeyword'("null") .end # isnull .sub 'emit_get_nonull' :method .param pmc __ARG_1 .const 'Sub' SyntaxError = "SyntaxError" $P1 = self.'isnull'() if_null $P1, __label_1 unless $P1 goto __label_1 SyntaxError("Invalid 'null' usage", self) __label_1: # endif .tailcall self.'emit_get'(__ARG_1) .end # emit_get_nonull .sub 'checkresult' :method getattribute $P1, self, 'name' getattribute $P3, self, 'owner' $P2 = $P3.'getvar'($P1) if_null $P2, __label_1 .tailcall $P2.'gettype'() goto __label_2 __label_1: # else set $S1, $P1 if $S1 == "self" goto __label_5 if $S1 == "null" goto __label_6 goto __label_3 __label_5: # case __label_6: # case .return("P") __label_3: # default .return("") __label_4: # switch end __label_2: # endif .end # checkresult .sub 'getName' :method getattribute $P1, self, 'name' null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: .return($S1) .end # getName .sub 'checkVar' :method getattribute $P1, self, 'owner' getattribute $P2, self, 'name' set $S1, $P2 .tailcall $P1.'getvar'($S1) .end # checkVar .sub 'checkIdentifier' :method .const 'Sub' InternalError = "InternalError" getattribute $P1, self, 'name' unless_null $P1, __label_1 InternalError("Bad thing") __label_1: # endif getattribute $P3, self, 'owner' $P2 = $P3.'getvar'($P1) null $S1 unless_null $P2, __label_2 set $S2, $P1 if $S2 == "self" goto __label_6 if $S2 == "null" goto __label_7 goto __label_4 __label_6: # case __label_7: # case set $S1, $P1 goto __label_5 # break __label_4: # default set $S1, "" __label_5: # switch end goto __label_3 __label_2: # else $P3 = $P2.'getreg'() set $S1, $P3 __label_3: # endif .return($S1) .end # checkIdentifier .sub 'getIdentifier' :method .const 'Sub' WSubId_102 = "WSubId_102" $P1 = self.'checkIdentifier'() set $S1, $P1 ne $S1, "", __label_1 getattribute $P2, self, 'name' WSubId_102($P2, self) __label_1: # endif .return($P1) .end # getIdentifier .sub 'optimize' :method getattribute $P1, self, 'name' getattribute $P2, self, 'owner' $P3 = $P2.'getvar'($P1) if_null $P3, __label_1 $P6 = $P3.'isconst'() if_null $P6, __label_3 unless $P6 goto __label_3 .tailcall $P3.'getvalue'() __label_3: # endif $P6 = $P3.'getflags'() set $I1, $P6 band $I2, $I1, 1 unless $I2 goto __label_4 band $I3, $I1, 2 unless $I3 goto __label_6 new $P7, [ 'Winxed'; 'Compiler'; 'LexicalVolatileExpr' ] $P7.'LexicalVolatileExpr'(self, $P3) set $P6, $P7 .return($P6) __label_6: # endif goto __label_5 __label_4: # else $P4 = $P3.'getreg'() if_null $P4, __label_7 set $S3, $P4 substr $S2, $S3, 0, 7 ne $S2, "WSubId_", __label_7 new $P7, [ 'Winxed'; 'Compiler'; 'FunctionId' ] $P7.'FunctionId'($P2, $P1, $P4) set $P6, $P7 .return($P6) __label_7: # endif __label_5: # endif goto __label_2 __label_1: # else root_new $P6, ['parrot';'ResizablePMCArray'] assign $P6, 1 $P6[0] = $P1 $P5 = self.'scopesearch'($P6, 0) if_null $P5, __label_10 isa $I2, $P5, [ 'Winxed'; 'Compiler'; 'FunctionStatement' ] if $I2 goto __label_11 isa $I3, $P5, [ 'Winxed'; 'Compiler'; 'FunctionExtern' ] if $I3 goto __label_12 isa $I4, $P5, [ 'Winxed'; 'Compiler'; 'InlineStatement' ] if $I4 goto __label_13 goto __label_9 __label_10: # case $P6 = $P1.'iskeyword'("null") if_null $P6, __label_14 unless $P6 goto __label_14 new $P8, [ 'Winxed'; 'Compiler'; 'NullExpr' ] getattribute $P9, self, 'owner' $P8.'NullExpr'($P9, $P1) set $P7, $P8 .return($P7) __label_14: # endif goto __label_8 # break __label_11: # case $P10 = $P5.'ismulti'() if $P10 goto __label_15 $P11 = $P5.'makesubid'() null $S1 if_null $P11, __label_17 set $S1, $P11 __label_17: self.'usesubid'($S1) $P2.'createvarnamed'($P1, "P", $S1) new $P7, [ 'Winxed'; 'Compiler'; 'FunctionId' ] $P7.'FunctionId'($P2, $P1, $S1) set $P6, $P7 .return($P6) goto __label_16 __label_15: # else new $P7, [ 'Winxed'; 'Compiler'; 'FunctionRef' ] $P7.'FunctionRef'($P2, $P1, $P5) set $P6, $P7 .return($P6) __label_16: # endif goto __label_8 # break __label_12: # case new $P9, [ 'Winxed'; 'Compiler'; 'FunctionRef' ] $P9.'FunctionRef'($P2, $P1, $P5) set $P8, $P9 .return($P8) __label_13: # case new $P11, [ 'Winxed'; 'Compiler'; 'InlineRef' ] $P11.'InlineRef'($P2, $P1, $P5) set $P10, $P11 .return($P10) __label_9: # default __label_8: # switch end __label_2: # endif .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 $P1 = self.'emit_get'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: self.'annotate'(__ARG_1) __ARG_1.'emitset'(__ARG_2, $S1) .end # emit .sub 'emit_void' :method .param pmc __ARG_1 .end # emit_void .sub 'emit_get' :method .param pmc __ARG_1 null $S1 $P2 = self.'getIdentifier'() set $S1, $P2 getattribute $P2, self, 'owner' getattribute $P3, self, 'name' $P1 = $P2.'getvar'($P3) unless_null $P1, __label_2 null $I1 goto __label_1 __label_2: $P2 = $P1.'getflags'() set $I1, $P2 __label_1: band $I2, $I1, 1 unless $I2 goto __label_3 band $I3, $I1, 2 unless $I3 goto __label_4 $P2 = $P1.'getlex'() null $S2 if_null $P2, __label_5 set $S2, $P2 __label_5: if_null $S2, __label_6 self.'annotate'(__ARG_1) __label_6: # endif __ARG_1.'emitfind_lex'($S1, $S2) __label_4: # endif __label_3: # endif .return($S1) .end # emit_get .sub 'emit_assign_get' :method .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' SyntaxError = "SyntaxError" self.'annotate'(__ARG_1) $P1 = self.'isnull'() if_null $P1, __label_1 unless $P1 goto __label_1 SyntaxError("Cannot assign to null", self) __label_1: # endif $P1 = self.'checkresult'() null $S1 if_null $P1, __label_2 set $S1, $P1 __label_2: $P1 = self.'getIdentifier'() null $S2 if_null $P1, __label_3 set $S2, $P1 __label_3: $P1 = __ARG_2.'isnull'() if_null $P1, __label_4 unless $P1 goto __label_4 if_null $S1, __label_6 length $I1, $S1 ne $I1, 1, __label_6 ord $I1, $S1 if $I1 == 83 goto __label_8 if $I1 == 80 goto __label_9 goto __label_6 __label_8: # case __label_9: # case __ARG_1.'emitnull'($S2) goto __label_7 # break __label_6: # default SyntaxError("Can't assign null to that type", self) __label_7: # switch end goto __label_5 __label_4: # else isa $I1, __ARG_2, [ 'Winxed'; 'Compiler'; 'IndexExpr' ] unless $I1 goto __label_10 __ARG_2.'emit'(__ARG_1, $S2) goto __label_11 __label_10: # else $P1 = __ARG_2.'checkresult'() null $S3 if_null $P1, __label_12 set $S3, $P1 __label_12: ne $S3, "v", __label_13 SyntaxError("Can't assign from void expression", self) __label_13: # endif ne $S1, $S3, __label_14 __ARG_2.'emit'(__ARG_1, $S2) goto __label_15 __label_14: # else $P1 = __ARG_2.'emit_get'(__ARG_1) null $S4 if_null $P1, __label_16 set $S4, $P1 __label_16: self.'annotate'(__ARG_1) ne $S1, "P", __label_17 eq $S3, "P", __label_17 __ARG_1.'emitbox'($S2, $S4) goto __label_18 __label_17: # else __ARG_1.'emitset'($S2, $S4) __label_18: # endif __label_15: # endif __label_11: # endif __label_5: # endif .return($S2) .end # emit_assign_get .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'IdentifierExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'SimpleExpr' ] addparent $P0, $P1 addattribute $P0, 'name' .end .namespace [ 'Winxed'; 'Compiler'; 'LexicalVolatileExpr' ] .sub 'LexicalVolatileExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 getattribute $P1, __ARG_1, 'owner' getattribute $P2, __ARG_1, 'start' self.'Expr'($P1, $P2) setattribute self, 'desc', __ARG_2 .end # LexicalVolatileExpr .sub 'checkresult' :method getattribute $P1, self, 'desc' .tailcall $P1.'gettype'() .end # checkresult .sub 'emit_get' :method .param pmc __ARG_1 getattribute $P1, self, 'desc' $P2 = $P1.'getlex'() null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: getattribute $P3, self, 'owner' $P4 = $P1.'gettype'() $P2 = $P3.'tempreg'($P4) null $S2 if_null $P2, __label_2 set $S2, $P2 __label_2: __ARG_1.'emitfind_lex'($S2, $S1) .return($S2) .end # emit_get .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 self.'annotate'(__ARG_1) $P1 = self.'emit_get'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: __ARG_1.'emitset'(__ARG_2, $S1) .end # emit .sub 'emit_assign_get' :method .param pmc __ARG_1 .param pmc __ARG_2 getattribute $P1, self, 'owner' getattribute $P2, self, 'desc' $P3 = $P2.'gettype'() null $S1 if_null $P3, __label_1 set $S1, $P3 __label_1: null $S2 $P3 = __ARG_2.'isnull'() set $I1, $P3 if $I1 goto __label_4 isa $I2, __ARG_2, [ 'Winxed'; 'Compiler'; 'IndexExpr' ] if $I2 goto __label_5 goto __label_3 __label_4: # case $P4 = $P1.'tempreg'($S1) set $S2, $P4 __ARG_1.'emitnull'($S2) goto __label_2 # break __label_5: # case $P5 = $P1.'tempreg'($S1) set $S2, $P5 __ARG_2.'emit'(__ARG_1, $S2) goto __label_2 # break __label_3: # default ne $S1, "P", __label_6 $P6 = __ARG_2.'emit_getvar'(__ARG_1) set $S2, $P6 goto __label_7 __label_6: # else $P7 = __ARG_2.'checkresult'() set $S3, $P7 ne $S1, $S3, __label_8 $P8 = __ARG_2.'emit_get'(__ARG_1) set $S2, $P8 goto __label_9 __label_8: # else $P9 = $P1.'tempreg'($S1) set $S2, $P9 __ARG_2.'emit'(__ARG_1, $S2) __label_9: # endif __label_7: # endif __label_2: # switch end $P3 = $P2.'getlex'() __ARG_1.'emitstore_lex'($P3, $S2) .return($S2) .end # emit_assign_get .sub 'emit_store' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P2, self, 'desc' $P1 = $P2.'getlex'() __ARG_1.'emitstore_lex'($P1, __ARG_2) .end # emit_store .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'LexicalVolatileExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'FinalExpr' ] addparent $P0, $P1 addattribute $P0, 'desc' .end .namespace [ 'Winxed'; 'Compiler'; 'OpExpr' ] .sub 'initop' :method .param pmc __ARG_1 .param pmc __ARG_2 self.'Expr'(__ARG_1, __ARG_2) .end # initop .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Expr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpNamespaceExpr' ] .sub 'OpNamespaceExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' parseDotted = "parseDotted" .const 'Sub' Expected = "Expected" self.'initop'(__ARG_2, __ARG_3) $P2 = parseDotted(__ARG_1) setattribute self, 'key', $P2 getattribute $P1, self, 'key' elements $I1, $P1 if $I1 goto __label_1 Expected("namespace identifier", __ARG_3) __label_1: # endif .end # OpNamespaceExpr .sub 'checkresult' :method .return("P") .end # checkresult .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 .const 'Sub' SyntaxError = "SyntaxError" getattribute $P1, self, 'owner' getattribute $P4, self, 'key' $P2 = $P1.'scopesearch'($P4, 1) unless_null $P2, __label_1 SyntaxError("unknown namespace", self) __label_1: # endif $P3 = $P2.'getpath'() $P3.'emit_get_namespace'(__ARG_1, $P1, __ARG_2) .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpNamespaceExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpExpr' ] addparent $P0, $P1 addattribute $P0, 'key' .end .namespace [ 'Winxed'; 'Compiler'; 'OpClassExpr' ] .sub 'OpClassExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' WSubId_103 = "WSubId_103" self.'initop'(__ARG_2, __ARG_3) $P2 = WSubId_103(__ARG_1, __ARG_2) setattribute self, 'clspec', $P2 .end # OpClassExpr .sub 'checkresult' :method .return("P") .end # checkresult .sub 'get_class_raw_key' :method .const 'Sub' SyntaxError = "SyntaxError" .const 'Sub' InternalError = "InternalError" getattribute $P1, self, 'owner' getattribute $P2, self, 'clspec' null $P3 isa $I1, $P2, [ 'Winxed'; 'Compiler'; 'ClassSpecifierId' ] if $I1 goto __label_3 isa $I2, $P2, [ 'Winxed'; 'Compiler'; 'ClassSpecifierParrotKey' ] if $I2 goto __label_4 isa $I3, $P2, [ 'Winxed'; 'Compiler'; 'ClassSpecifier' ] if $I3 goto __label_5 goto __label_2 __label_3: # case $P3 = $P2.'checknskey'($P1) if_null $P3, __label_7 getattribute $P4, $P3, 'path' goto __label_6 __label_7: null $P4 __label_6: .return($P4) __label_4: # case $P3 = $P2.'checknskey'($P1) if_null $P3, __label_9 getattribute $P5, $P3, 'path' goto __label_8 __label_9: null $P5 __label_8: .return($P5) __label_5: # case typeof $P6, $P2 set $S1, $P6 concat $S2, $S1, " not supported yet here" getattribute $P7, $P2, 'start' SyntaxError($S2, $P7) __label_2: # default __label_1: # switch end getattribute $P4, $P2, 'start' InternalError("Unexpected class key", $P4) .end # get_class_raw_key .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P1, self, 'owner' getattribute $P2, self, 'clspec' isa $I1, $P2, [ 'Winxed'; 'Compiler'; 'ClassSpecifierId' ] if $I1 goto __label_3 goto __label_2 __label_3: # case $P3 = $P2.'checknskey'($P1) if_null $P3, __label_4 $P3.'emit_get_class'(__ARG_1, $P1, __ARG_2) .return() __label_4: # endif goto __label_1 # break __label_2: # default __label_1: # switch end __ARG_1.'print'(" get_class ", __ARG_2, ", ") getattribute $P4, self, 'owner' $P2.'emit'(__ARG_1, $P4) __ARG_1.'say'() .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpClassExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpExpr' ] addparent $P0, $P1 addattribute $P0, 'clspec' .end .namespace [ 'Winxed'; 'Compiler'; 'OpUnaryExpr' ] .sub 'OpUnaryExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'initop'(__ARG_1, __ARG_2) setattribute self, 'subexpr', __ARG_3 .end # OpUnaryExpr .sub 'cloneunary' :method .param pmc __ARG_1 .param pmc __ARG_2 getattribute $P1, self, 'start' getattribute $P3, self, 'subexpr' $P2 = $P3.'clone'(__ARG_2) __ARG_1.'OpUnaryExpr'(__ARG_2, $P1, $P2) .return(__ARG_1) .end # cloneunary .sub 'optimizearg' :method getattribute $P3, self, 'subexpr' $P2 = $P3.'optimize'() setattribute self, 'subexpr', $P2 .end # optimizearg .sub 'optimize' :method self.'optimizearg'() .return(self) .end # optimize .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpUnaryExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpExpr' ] addparent $P0, $P1 addattribute $P0, 'subexpr' .end .namespace [ 'Winxed'; 'Compiler'; 'OpBinaryExpr' ] .sub 'initbinary' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'initop'(__ARG_1, __ARG_2) setattribute self, 'lexpr', __ARG_3 setattribute self, 'rexpr', __ARG_4 .end # initbinary .sub 'set' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'initbinary'(__ARG_1, __ARG_2, __ARG_3, __ARG_4) .return(self) .end # set .sub 'clonebinary' :method .param pmc __ARG_1 .param pmc __ARG_2 getattribute $P1, self, 'start' getattribute $P3, self, 'lexpr' $P2 = $P3.'clone'(__ARG_2) getattribute $P5, self, 'rexpr' $P4 = $P5.'clone'(__ARG_2) __ARG_1.'initbinary'(__ARG_2, $P1, $P2, $P4) .return(__ARG_1) .end # clonebinary .sub 'setfrom' :method .param pmc __ARG_1 getattribute $P1, __ARG_1, 'owner' getattribute $P2, __ARG_1, 'start' getattribute $P3, __ARG_1, 'lexpr' getattribute $P4, __ARG_1, 'rexpr' .tailcall self.'set'($P1, $P2, $P3, $P4) .end # setfrom .sub 'optimizearg' :method getattribute $P3, self, 'lexpr' $P2 = $P3.'optimize'() setattribute self, 'lexpr', $P2 getattribute $P3, self, 'rexpr' $P2 = $P3.'optimize'() setattribute self, 'rexpr', $P2 .end # optimizearg .sub 'optimize' :method self.'optimizearg'() .return(self) .end # optimize .sub 'emit_intleft' :method .param pmc __ARG_1 getattribute $P1, self, 'lexpr' .tailcall $P1.'emit_getint'(__ARG_1) .end # emit_intleft .sub 'emit_intright' :method .param pmc __ARG_1 getattribute $P1, self, 'rexpr' .tailcall $P1.'emit_getint'(__ARG_1) .end # emit_intright .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpBinaryExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpExpr' ] addparent $P0, $P1 addattribute $P0, 'lexpr' addattribute $P0, 'rexpr' .end .namespace [ 'Winxed'; 'Compiler'; 'OpBinaryIntExpr' ] .sub 'checkresult' :method .return("I") .end # checkresult .sub 'optimize' :method .const 'Sub' integerValue = "integerValue" self.'optimizearg'() getattribute $P1, self, 'lexpr' getattribute $P2, self, 'rexpr' $P3 = $P1.'isintegerliteral'() unless $P3 goto __label_1 $P4 = $P2.'isintegerliteral'() unless $P4 goto __label_1 $P5 = $P1.'getIntegerValue'() set $I1, $P5 $P3 = $P2.'getIntegerValue'() set $I2, $P3 getattribute $P3, self, 'owner' getattribute $P4, self, 'start' $P5 = self.'do_op'($I1, $I2) .tailcall integerValue($P3, $P4, $P5) __label_1: # endif .return(self) .end # optimize .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpBinaryIntExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBinaryExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpDelExBase' ] .sub 'checkresult' :method .return("I") .end # checkresult .sub 'optimize' :method .const 'Sub' SyntaxError = "SyntaxError" self.'optimizearg'() getattribute $P1, self, 'subexpr' isa $I2, $P1, [ 'Winxed'; 'Compiler'; 'IndexExpr' ] not $I1, $I2 if $I1 goto __label_2 $P2 = $P1.'checkresult'() set $S1, $P2 iseq $I1, $S1, "S" __label_2: unless $I1 goto __label_1 SyntaxError("invalid operand", self) __label_1: # endif .return(self) .end # optimize .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpDelExBase' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpUnaryExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpDeleteExpr' ] .sub 'OpDeleteExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'OpUnaryExpr'(__ARG_1, __ARG_2, __ARG_3) .end # OpDeleteExpr .sub 'emit_void' :method .param pmc __ARG_1 getattribute $P1, self, 'subexpr' $P1.'emit_prep'(__ARG_1) self.'annotate'(__ARG_1) __ARG_1.'print'(" delete ") $P1.'emit_aux'(__ARG_1) __ARG_1.'say'() .end # emit_void .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 self.'emit_void'(__ARG_1) __ARG_1.'emitset'(__ARG_2, "1") .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpDeleteExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpDelExBase' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpExistsExpr' ] .sub 'OpExistsExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'OpUnaryExpr'(__ARG_1, __ARG_2, __ARG_3) .end # OpExistsExpr .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P1, self, 'subexpr' $P1.'emit_prep'(__ARG_1) self.'annotate'(__ARG_1) __ARG_1.'print'(" exists ", __ARG_2, ", ") $P1.'emit_aux'(__ARG_1) __ARG_1.'say'() .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpExistsExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpDelExBase' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpDefinedExpr' ] .sub 'OpDefinedExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'OpUnaryExpr'(__ARG_1, __ARG_2, __ARG_3) .end # OpDefinedExpr .sub 'optimize' :method .const 'Sub' SyntaxError = "SyntaxError" self.'optimizearg'() getattribute $P1, self, 'subexpr' $P3 = $P1.'checkresult'() set $S1, $P3 isne $I1, $S1, "P" box $P2, $I1 if $P2 goto __label_2 $P2 = $P1.'isnull'() __label_2: if_null $P2, __label_1 unless $P2 goto __label_1 SyntaxError("invalid operand", self) __label_1: # endif .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P1, self, 'subexpr' isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'IndexExpr' ] unless $I1 goto __label_1 $P1.'emit_prep'(__ARG_1) self.'annotate'(__ARG_1) __ARG_1.'print'(" defined ", __ARG_2, ", ") $P1.'emit_aux'(__ARG_1) __ARG_1.'say'() goto __label_2 __label_1: # else $P2 = $P1.'emit_get'(__ARG_1) null $S1 if_null $P2, __label_3 set $S1, $P2 __label_3: __ARG_1.'say'(" defined ", __ARG_2, ", ", $S1) __label_2: # endif .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpDefinedExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpDelExBase' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpUnaryMinusExpr' ] .sub 'OpUnaryMinusExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'OpUnaryExpr'(__ARG_1, __ARG_2, __ARG_3) .end # OpUnaryMinusExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpUnaryMinusExpr' ] .tailcall self.'cloneunary'($P1, __ARG_1) .end # clone .sub 'checkresult' :method getattribute $P1, self, 'subexpr' .tailcall $P1.'checkresult'() .end # checkresult .sub 'set' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'OpUnaryExpr'(__ARG_1, __ARG_2, __ARG_3) .return(self) .end # set .sub 'optimize' :method .const 'Sub' integerValue = "integerValue" .const 'Sub' WSubId_100 = "WSubId_100" getattribute $P1, self, 'subexpr' self.'optimizearg'() $P2 = $P1.'isintegerliteral'() if_null $P2, __label_1 unless $P2 goto __label_1 $P3 = $P1.'getIntegerValue'() set $I1, $P3 getattribute $P2, self, 'owner' getattribute $P3, $P1, 'start' neg $I2, $I1 .tailcall integerValue($P2, $P3, $I2) __label_1: # endif $P2 = $P1.'isfloatliteral'() if_null $P2, __label_2 unless $P2 goto __label_2 $P3 = $P1.'getFloatValue'() set $N1, $P3 getattribute $P2, self, 'owner' getattribute $P3, $P1, 'start' neg $N2, $N1 .tailcall WSubId_100($P2, $P3, $N2) __label_2: # endif .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P2, self, 'subexpr' $P1 = $P2.'emit_get'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: self.'annotate'(__ARG_1) __ARG_1.'emitarg2'("neg", __ARG_2, $S1) .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpUnaryMinusExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpUnaryExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpNotExpr' ] .sub 'OpNotExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'OpUnaryExpr'(__ARG_1, __ARG_2, __ARG_3) .end # OpNotExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpNotExpr' ] .tailcall self.'cloneunary'($P1, __ARG_1) .end # clone .sub 'isnegable' :method .return(1) .end # isnegable .sub 'checkresult' :method .return("I") .end # checkresult .sub 'set' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'OpUnaryExpr'(__ARG_1, __ARG_2, __ARG_3) .return(self) .end # set .sub 'optimize' :method .const 'Sub' integerValue = "integerValue" self.'optimizearg'() getattribute $P1, self, 'subexpr' $P2 = $P1.'isintegerliteral'() if_null $P2, __label_1 unless $P2 goto __label_1 $P3 = $P1.'getIntegerValue'() set $I1, $P3 getattribute $P2, self, 'owner' getattribute $P3, $P1, 'start' not $I2, $I1 .tailcall integerValue($P2, $P3, $I2) __label_1: # endif $P2 = $P1.'isnegable'() if_null $P2, __label_2 unless $P2 goto __label_2 .tailcall $P1.'negated'() __label_2: # endif .return(self) .end # optimize .sub 'negated' :method getattribute $P1, self, 'subexpr' .return($P1) .end # negated .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P1, self, 'subexpr' $P2 = $P1.'emit_get'(__ARG_1) null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: self.'annotate'(__ARG_1) $P2 = $P1.'checkresult'() set $S3, $P2 if_null $S3, __label_2 length $I1, $S3 ne $I1, 1, __label_2 ord $I1, $S3 if $I1 == 73 goto __label_4 if $I1 == 83 goto __label_5 if $I1 == 80 goto __label_6 goto __label_2 __label_4: # case __ARG_1.'emitarg2'("not", __ARG_2, $S1) goto __label_3 # break __label_5: # case __ARG_1.'emitset'(__ARG_2, 0) $P3 = self.'genlabel'() null $S2 if_null $P3, __label_7 set $S2, $P3 __label_7: __ARG_1.'emitif'($S1, $S2) __ARG_1.'emitinc'(__ARG_2) __ARG_1.'emitlabel'($S2) goto __label_3 # break __label_6: # case __ARG_1.'emitarg2'("isfalse", __ARG_2, $S1) goto __label_3 # break __label_2: # default __ARG_1.'emitarg2'("isfalse", __ARG_2, $S1) __label_3: # switch end .end # emit .sub 'emit_if' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P2, self, 'subexpr' $P1 = $P2.'emit_get'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: self.'annotate'(__ARG_1) __ARG_1.'emitunless'($S1, __ARG_2) .end # emit_if .sub 'emit_else' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P2, self, 'subexpr' $P1 = $P2.'emit_get'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: self.'annotate'(__ARG_1) __ARG_1.'emitif'($S1, __ARG_2) .end # emit_else .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpNotExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpUnaryExpr' ] addparent $P0, $P1 get_class $P2, [ 'Winxed'; 'Compiler'; 'ConditionFriendlyExpr' ] addparent $P0, $P2 .end .namespace [ 'Winxed'; 'Compiler'; 'OpBinNotExpr' ] .sub 'OpBinNotExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'OpUnaryExpr'(__ARG_1, __ARG_2, __ARG_3) .end # OpBinNotExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpBinNotExpr' ] .tailcall self.'cloneunary'($P1, __ARG_1) .end # clone .sub 'checkresult' :method .return("I") .end # checkresult .sub 'set' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'OpUnaryExpr'(__ARG_1, __ARG_2, __ARG_3) .return(self) .end # set .sub 'optimize' :method .const 'Sub' integerValue = "integerValue" self.'optimizearg'() getattribute $P1, self, 'subexpr' $P2 = $P1.'isintegerliteral'() if_null $P2, __label_1 unless $P2 goto __label_1 $P3 = $P1.'getIntegerValue'() set $I1, $P3 getattribute $P2, self, 'owner' getattribute $P3, $P1, 'start' bxor $I2, $I1, -1 .tailcall integerValue($P2, $P3, $I2) __label_1: # endif .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P1, self, 'subexpr' $P2 = $P1.'emit_getint'(__ARG_1) null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: self.'annotate'(__ARG_1) __ARG_1.'emitarg3'("bxor", __ARG_2, $S1, -1) .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpBinNotExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpUnaryExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpIncDec' ] .sub 'checkresult' :method getattribute $P1, self, 'subexpr' .tailcall $P1.'checkresult'() .end # checkresult .sub 'iflexical' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P1, self, 'subexpr' isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'LexicalVolatileExpr' ] unless $I1 goto __label_1 $P1.'emit_store'(__ARG_1, __ARG_2) __label_1: # endif .end # iflexical .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpIncDec' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpUnaryExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpPreIncDec' ] .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 $P1 = self.'emit_get'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: __ARG_1.'emitset'(__ARG_2, $S1) .end # emit .sub 'emit_void' :method .param pmc __ARG_1 self.'emit_get'(__ARG_1) .end # emit_void .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpPreIncDec' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpIncDec' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpPreIncExpr' ] .sub 'OpPreIncExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'OpUnaryExpr'(__ARG_1, __ARG_2, __ARG_3) .end # OpPreIncExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpPreIncExpr' ] .tailcall self.'cloneunary'($P1, __ARG_1) .end # clone .sub 'emit_get' :method .param pmc __ARG_1 getattribute $P2, self, 'subexpr' $P1 = $P2.'emit_get'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: self.'annotate'(__ARG_1) __ARG_1.'emitinc'($S1) self.'iflexical'(__ARG_1, $S1) .return($S1) .end # emit_get .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpPreIncExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpPreIncDec' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpPreDecExpr' ] .sub 'OpPreDecExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'OpUnaryExpr'(__ARG_1, __ARG_2, __ARG_3) .end # OpPreDecExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpPreDecExpr' ] .tailcall self.'cloneunary'($P1, __ARG_1) .end # clone .sub 'emit_get' :method .param pmc __ARG_1 getattribute $P2, self, 'subexpr' $P1 = $P2.'emit_get'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: self.'annotate'(__ARG_1) __ARG_1.'emitdec'($S1) self.'iflexical'(__ARG_1, $S1) .return($S1) .end # emit_get .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpPreDecExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpPreIncDec' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpPostIncExpr' ] .sub 'OpPostIncExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'OpUnaryExpr'(__ARG_1, __ARG_2, __ARG_3) .end # OpPostIncExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpPostIncExpr' ] .tailcall self.'cloneunary'($P1, __ARG_1) .end # clone .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P2, self, 'subexpr' $P1 = $P2.'emit_get'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: self.'annotate'(__ARG_1) $P1 = self.'checkresult'() set $S3, $P1 ne $S3, "P", __label_2 $P2 = self.'tempreg'("P") null $S2 if_null $P2, __label_4 set $S2, $P2 __label_4: __ARG_1.'emitarg2'("clone", $S2, $S1) __ARG_1.'emitset'(__ARG_2, $S2) goto __label_3 __label_2: # else __ARG_1.'emitset'(__ARG_2, $S1) __label_3: # endif __ARG_1.'emitinc'($S1) self.'iflexical'(__ARG_1, $S1) .end # emit .sub 'emit_get' :method .param pmc __ARG_1 getattribute $P2, self, 'subexpr' $P1 = $P2.'emit_get'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: self.'annotate'(__ARG_1) $P2 = self.'checkresult'() $P1 = self.'tempreg'($P2) null $S2 if_null $P1, __label_2 set $S2, $P1 __label_2: $P1 = self.'checkresult'() set $S3, $P1 ne $S3, "P", __label_3 __ARG_1.'emitarg2'("clone", $S2, $S1) goto __label_4 __label_3: # else __ARG_1.'emitset'($S2, $S1) __label_4: # endif __ARG_1.'emitinc'($S1) self.'iflexical'(__ARG_1, $S1) .return($S2) .end # emit_get .sub 'emit_void' :method .param pmc __ARG_1 getattribute $P2, self, 'subexpr' $P1 = $P2.'emit_get'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: self.'annotate'(__ARG_1) __ARG_1.'emitinc'($S1) self.'iflexical'(__ARG_1, $S1) .end # emit_void .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpPostIncExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpIncDec' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpPostDecExpr' ] .sub 'OpPostDecExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'OpUnaryExpr'(__ARG_1, __ARG_2, __ARG_3) .end # OpPostDecExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpPostDecExpr' ] .tailcall self.'cloneunary'($P1, __ARG_1) .end # clone .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P2, self, 'subexpr' $P1 = $P2.'emit_get'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: self.'annotate'(__ARG_1) $P1 = self.'checkresult'() set $S3, $P1 ne $S3, "P", __label_2 $P2 = self.'tempreg'("P") null $S2 if_null $P2, __label_4 set $S2, $P2 __label_4: __ARG_1.'emitarg2'("clone", $S2, $S1) __ARG_1.'emitset'(__ARG_2, $S2) goto __label_3 __label_2: # else __ARG_1.'emitset'(__ARG_2, $S1) __label_3: # endif __ARG_1.'emitdec'($S1) self.'iflexical'(__ARG_1, $S1) .return($S1) .end # emit .sub 'emit_get' :method .param pmc __ARG_1 getattribute $P2, self, 'subexpr' $P1 = $P2.'emit_get'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: self.'annotate'(__ARG_1) $P2 = self.'checkresult'() $P1 = self.'tempreg'($P2) null $S2 if_null $P1, __label_2 set $S2, $P1 __label_2: $P1 = self.'checkresult'() set $S3, $P1 ne $S3, "P", __label_3 __ARG_1.'emitarg2'("clone", $S2, $S1) goto __label_4 __label_3: # else __ARG_1.'emitset'($S2, $S1) __label_4: # endif __ARG_1.'emitdec'($S1) self.'iflexical'(__ARG_1, $S1) .return($S2) .end # emit_get .sub 'emit_void' :method .param pmc __ARG_1 getattribute $P2, self, 'subexpr' $P1 = $P2.'emit_get'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: self.'annotate'(__ARG_1) __ARG_1.'emitdec'($S1) self.'iflexical'(__ARG_1, $S1) .end # emit_void .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpPostDecExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpIncDec' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpBaseAssignExpr' ] .sub 'set' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'Expr'(__ARG_1, __ARG_2) setattribute self, 'lexpr', __ARG_3 setattribute self, 'rexpr', __ARG_4 .return(self) .end # set .sub 'cloneassign' :method .param pmc __ARG_1 .param pmc __ARG_2 getattribute $P1, self, 'start' getattribute $P3, self, 'lexpr' $P2 = $P3.'clone'(__ARG_2) getattribute $P5, self, 'rexpr' $P4 = $P5.'clone'(__ARG_2) .tailcall __ARG_1.'set'(__ARG_2, $P1, $P2, $P4) .end # cloneassign .sub 'checkresult' :method getattribute $P1, self, 'lexpr' .tailcall $P1.'checkresult'() .end # checkresult .sub 'optimize_base' :method getattribute $P3, self, 'lexpr' $P2 = $P3.'optimize'() setattribute self, 'lexpr', $P2 getattribute $P3, self, 'rexpr' $P2 = $P3.'optimize'() setattribute self, 'rexpr', $P2 .return(self) .end # optimize_base .sub 'optimize' :method .tailcall self.'optimize_base'() .end # optimize .sub 'checkleft' :method .const 'Sub' WSubId_99 = "WSubId_99" getattribute $P1, self, 'lexpr' $P2 = $P1.'isnull'() if $P2 goto __label_2 $P2 = $P1.'isliteral'() __label_2: if_null $P2, __label_1 unless $P2 goto __label_1 WSubId_99($P1) __label_1: # endif .end # checkleft .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 $P1 = self.'emit_get'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: self.'annotate'(__ARG_1) __ARG_1.'emitset'(__ARG_2, $S1) .end # emit .sub 'emit_void' :method .param pmc __ARG_1 self.'emit_get'(__ARG_1) .end # emit_void .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpBaseAssignExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Expr' ] addparent $P0, $P1 addattribute $P0, 'lexpr' addattribute $P0, 'rexpr' .end .namespace [ 'Winxed'; 'Compiler'; 'OpAssignExpr' ] .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpAssignExpr' ] .tailcall self.'cloneassign'($P1, __ARG_1) .end # clone .sub 'emit_get' :method .param pmc __ARG_1 self.'annotate'(__ARG_1) getattribute $P1, self, 'lexpr' getattribute $P2, self, 'rexpr' .tailcall $P1.'emit_assign_get'(__ARG_1, $P2) .end # emit_get .sub 'emit_void' :method .param pmc __ARG_1 self.'annotate'(__ARG_1) getattribute $P1, self, 'lexpr' getattribute $P2, self, 'rexpr' $P1.'emit_assign_get'(__ARG_1, $P2) .end # emit_void .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpAssignExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBaseAssignExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpAssignToExpr' ] .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpAssignToExpr' ] .tailcall self.'cloneassign'($P1, __ARG_1) .end # clone .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 self.'annotate'(__ARG_1) $P1 = self.'emit_get'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: __ARG_1.'emitassign'(__ARG_2, $S1) .end # emit .sub 'emit_get' :method .param pmc __ARG_1 .const 'Sub' SyntaxError = "SyntaxError" self.'checkleft'() getattribute $P1, self, 'lexpr' $P2 = $P1.'checkresult'() set $S3, $P2 eq $S3, "P", __label_1 SyntaxError("Wrong dest type in =:", $P1) __label_1: # endif $P2 = $P1.'emit_get'(__ARG_1) null $S1 if_null $P2, __label_2 set $S1, $P2 __label_2: getattribute $P3, self, 'rexpr' $P2 = $P3.'emit_get'(__ARG_1) null $S2 if_null $P2, __label_3 set $S2, $P2 __label_3: self.'annotate'(__ARG_1) __ARG_1.'emitassign'($S1, $S2) .return($S1) .end # emit_get .sub 'emit_void' :method .param pmc __ARG_1 self.'annotate'(__ARG_1) $P1 = self.'emit_get'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: .end # emit_void .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpAssignToExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBaseAssignExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpAddToExpr' ] .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpAddToExpr' ] .tailcall self.'cloneassign'($P1, __ARG_1) .end # clone .sub 'emit_get' :method .param pmc __ARG_1 self.'checkleft'() getattribute $P1, self, 'lexpr' getattribute $P2, self, 'rexpr' $P3 = $P1.'checkresult'() null $S1 if_null $P3, __label_1 set $S1, $P3 __label_1: $P3 = $P2.'checkresult'() null $S2 if_null $P3, __label_2 set $S2, $P3 __label_2: $P3 = $P1.'emit_get'(__ARG_1) null $S3 if_null $P3, __label_3 set $S3, $P3 __label_3: ne $S1, "S", __label_4 isa $I1, $P2, [ 'Winxed'; 'Compiler'; 'ConcatString' ] unless $I1 goto __label_4 $P2.'emit_concat_to'(__ARG_1, $S3) goto __label_5 __label_4: # else $P3 = $P2.'emit_get'(__ARG_1) null $S4 if_null $P3, __label_6 set $S4, $P3 __label_6: null $S5 self.'annotate'(__ARG_1) if_null $S1, __label_7 length $I1, $S1 ne $I1, 1, __label_7 ord $I1, $S1 if $I1 == 83 goto __label_9 if $I1 == 73 goto __label_10 if $I1 == 78 goto __label_11 goto __label_7 __label_9: # case eq $S2, "S", __label_12 $P3 = self.'tempreg'("S") set $S5, $P3 __ARG_1.'emitset'($S5, $S4) set $S4, $S5 __label_12: # endif __ARG_1.'emitconcat1'($S3, $S4) goto __label_8 # break __label_10: # case __label_11: # case eq $S1, $S2, __label_13 $P3 = self.'tempreg'($S1) set $S5, $P3 __ARG_1.'emitset'($S5, $S4) set $S4, $S5 __label_13: # endif __ARG_1.'emitaddto'($S3, $S4) goto __label_8 # break __label_7: # default __ARG_1.'emitaddto'($S3, $S4) __label_8: # switch end __label_5: # endif isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'LexicalVolatileExpr' ] unless $I1 goto __label_14 $P1.'emit_store'(__ARG_1, $S3) __label_14: # endif .return($S3) .end # emit_get .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpAddToExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBaseAssignExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpSubToExpr' ] .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpSubToExpr' ] .tailcall self.'cloneassign'($P1, __ARG_1) .end # clone .sub 'emit_get' :method .param pmc __ARG_1 .const 'Sub' SyntaxError = "SyntaxError" self.'checkleft'() getattribute $P1, self, 'lexpr' getattribute $P2, self, 'rexpr' $P3 = $P1.'checkresult'() null $S1 if_null $P3, __label_1 set $S1, $P3 __label_1: $P3 = $P2.'checkresult'() null $S2 if_null $P3, __label_2 set $S2, $P3 __label_2: $P3 = $P1.'emit_get'(__ARG_1) null $S3 if_null $P3, __label_3 set $S3, $P3 __label_3: $P3 = $P2.'emit_get'(__ARG_1) null $S4 if_null $P3, __label_4 set $S4, $P3 __label_4: null $S5 self.'annotate'(__ARG_1) if_null $S1, __label_5 length $I1, $S1 ne $I1, 1, __label_5 ord $I1, $S1 if $I1 == 83 goto __label_7 if $I1 == 73 goto __label_8 if $I1 == 78 goto __label_9 goto __label_5 __label_7: # case SyntaxError("-= can't be applied to string", self) __label_8: # case __label_9: # case eq $S1, $S2, __label_10 $P3 = self.'tempreg'($S1) set $S5, $P3 __ARG_1.'emitset'($S5, $S4) set $S4, $S5 __label_10: # endif __ARG_1.'emitsubto'($S3, $S4) goto __label_6 # break __label_5: # default __ARG_1.'emitsubto'($S3, $S4) __label_6: # switch end isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'LexicalVolatileExpr' ] unless $I1 goto __label_11 $P1.'emit_store'(__ARG_1, $S3) __label_11: # endif .return($S3) .end # emit_get .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpSubToExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBaseAssignExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpMulToExpr' ] .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpMulToExpr' ] .tailcall self.'cloneassign'($P1, __ARG_1) .end # clone .sub 'emit_get' :method .param pmc __ARG_1 self.'checkleft'() getattribute $P1, self, 'lexpr' getattribute $P2, self, 'rexpr' $P3 = $P1.'emit_get'(__ARG_1) null $S1 if_null $P3, __label_1 set $S1, $P3 __label_1: null $S2 $P3 = $P1.'checkresult'() set $S3, $P3 if_null $S3, __label_2 length $I1, $S3 ne $I1, 1, __label_2 ord $I1, $S3 if $I1 == 83 goto __label_4 goto __label_2 __label_4: # case $P4 = $P2.'emit_getint'(__ARG_1) set $S2, $P4 self.'annotate'(__ARG_1) __ARG_1.'emitrepeat'($S1, $S1, $S2) goto __label_3 # break __label_2: # default $P5 = $P2.'emit_get'(__ARG_1) set $S2, $P5 self.'annotate'(__ARG_1) __ARG_1.'emitarg2'("mul", $S1, $S2) __label_3: # switch end isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'LexicalVolatileExpr' ] unless $I1 goto __label_5 $P1.'emit_store'(__ARG_1, $S1) __label_5: # endif .return($S1) .end # emit_get .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpMulToExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBaseAssignExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpDivToExpr' ] .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpDivToExpr' ] .tailcall self.'cloneassign'($P1, __ARG_1) .end # clone .sub 'emit_get' :method .param pmc __ARG_1 self.'checkleft'() getattribute $P1, self, 'lexpr' $P2 = $P1.'emit_get'(__ARG_1) null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: getattribute $P3, self, 'rexpr' $P2 = $P3.'emit_get'(__ARG_1) null $S2 if_null $P2, __label_2 set $S2, $P2 __label_2: self.'annotate'(__ARG_1) __ARG_1.'emitarg2'("div", $S1, $S2) isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'LexicalVolatileExpr' ] unless $I1 goto __label_3 $P1.'emit_store'(__ARG_1, $S1) __label_3: # endif .return($S1) .end # emit_get .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpDivToExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBaseAssignExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpModToExpr' ] .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpModToExpr' ] .tailcall self.'cloneassign'($P1, __ARG_1) .end # clone .sub 'emit_get' :method .param pmc __ARG_1 self.'checkleft'() getattribute $P1, self, 'lexpr' $P2 = $P1.'emit_get'(__ARG_1) null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: getattribute $P3, self, 'rexpr' $P2 = $P3.'emit_get'(__ARG_1) null $S2 if_null $P2, __label_2 set $S2, $P2 __label_2: self.'annotate'(__ARG_1) __ARG_1.'emitarg2'("mod", $S1, $S2) isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'LexicalVolatileExpr' ] unless $I1 goto __label_3 $P1.'emit_store'(__ARG_1, $S1) __label_3: # endif .return($S1) .end # emit_get .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpModToExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBaseAssignExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler' ] .namespace [ 'Winxed'; 'Compiler'; 'ComparatorBaseExpr' ] .sub 'checkresult' :method .return("I") .end # checkresult .sub 'optimize' :method .const 'Sub' integerValue = "integerValue" self.'optimizearg'() getattribute $P1, self, 'lexpr' getattribute $P2, self, 'rexpr' $P3 = $P1.'isintegerliteral'() unless $P3 goto __label_1 $P4 = $P2.'isintegerliteral'() unless $P4 goto __label_1 $P5 = $P1.'getIntegerValue'() set $I1, $P5 $P3 = $P2.'getIntegerValue'() set $I2, $P3 getattribute $P3, self, 'owner' getattribute $P4, self, 'start' $P5 = self.'int_op'($I1, $I2) .tailcall integerValue($P3, $P4, $P5) __label_1: # endif .return(self) .end # optimize .sub 'emit_comparator' :method .param pmc __ARG_1 .param string __ARG_2 .param int __ARG_3 :optional getattribute $P2, self, 'lexpr' $P1 = $P2.'checkresult'() null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: getattribute $P2, self, 'rexpr' $P1 = $P2.'checkresult'() null $S2 if_null $P1, __label_2 set $S2, $P1 __label_2: getattribute $P2, self, 'lexpr' $P1 = $P2.'emit_get'(__ARG_1) null $S3 if_null $P1, __label_3 set $S3, $P1 __label_3: getattribute $P2, self, 'rexpr' $P1 = $P2.'emit_get'(__ARG_1) null $S4 if_null $P1, __label_4 set $S4, $P1 __label_4: self.'annotate'(__ARG_1) null $S5 iseq $I1, $S1, "I" unless $I1 goto __label_8 iseq $I1, $S2, "N" __label_8: if $I1 goto __label_7 iseq $I2, $S1, "N" unless $I2 goto __label_10 iseq $I2, $S2, "I" __label_10: if $I2 goto __label_9 iseq $I3, $S2, "I" unless $I3 goto __label_12 iseq $I3, $S1, "P" __label_12: if $I3 goto __label_11 iseq $I4, $S2, "P" unless $I4 goto __label_14 iseq $I4, $S1, "I" __label_14: if $I4 goto __label_13 iseq $I5, $S2, "N" unless $I5 goto __label_16 iseq $I5, $S1, "P" __label_16: if $I5 goto __label_15 iseq $I6, $S2, "P" unless $I6 goto __label_18 iseq $I6, $S1, "N" __label_18: if $I6 goto __label_17 iseq $I7, $S2, "S" unless $I7 goto __label_20 iseq $I7, $S1, "P" __label_20: if $I7 goto __label_19 iseq $I8, $S2, "P" unless $I8 goto __label_22 iseq $I8, $S1, "S" __label_22: if $I8 goto __label_21 goto __label_6 __label_7: # case $P1 = self.'tempreg'("N") set $S5, $P1 __ARG_1.'emitset'($S5, $S3) set $S3, $S5 goto __label_5 # break __label_9: # case $P2 = self.'tempreg'("N") set $S5, $P2 __ARG_1.'emitset'($S5, $S4) set $S4, $S5 goto __label_5 # break __label_11: # case $P3 = self.'tempreg'("I") set $S5, $P3 __ARG_1.'emitset'($S5, $S3) set $S3, $S5 goto __label_5 # break __label_13: # case $P4 = self.'tempreg'("I") set $S5, $P4 __ARG_1.'emitset'($S5, $S4) set $S4, $S5 goto __label_5 # break __label_15: # case $P5 = self.'tempreg'("N") set $S5, $P5 __ARG_1.'emitset'($S5, $S3) set $S3, $S5 goto __label_5 # break __label_17: # case $P6 = self.'tempreg'("N") set $S5, $P6 __ARG_1.'emitset'($S5, $S4) set $S4, $S5 goto __label_5 # break __label_19: # case $P7 = self.'tempreg'("S") set $S5, $P7 __ARG_1.'emitset'($S5, $S3) set $S3, $S5 goto __label_5 # break __label_21: # case $P8 = self.'tempreg'("S") set $S5, $P8 __ARG_1.'emitset'($S5, $S4) set $S4, $S5 goto __label_5 # break __label_6: # default __label_5: # switch end if __ARG_3 == 0 goto __label_25 if __ARG_3 == 1 goto __label_26 if __ARG_3 == 2 goto __label_27 goto __label_23 __label_25: # case self.'emitop'(__ARG_1, __ARG_2, $S3, $S4) goto __label_24 # break __label_26: # case self.'emitop_if'(__ARG_1, __ARG_2, $S3, $S4) goto __label_24 # break __label_27: # case self.'emitop_else'(__ARG_1, __ARG_2, $S3, $S4) goto __label_24 # break __label_23: # default __label_24: # switch end .end # emit_comparator .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 self.'emit_comparator'(__ARG_1, __ARG_2) .end # emit .sub 'emit_if' :method .param pmc __ARG_1 .param string __ARG_2 self.'emit_comparator'(__ARG_1, __ARG_2, 1) .end # emit_if .sub 'emit_else' :method .param pmc __ARG_1 .param string __ARG_2 self.'emit_comparator'(__ARG_1, __ARG_2, 2) .end # emit_else .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ComparatorBaseExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBinaryExpr' ] addparent $P0, $P1 get_class $P2, [ 'Winxed'; 'Compiler'; 'ConditionFriendlyExpr' ] addparent $P0, $P2 .end .namespace [ 'Winxed'; 'Compiler'; 'Negable' ] .sub 'Negable' :method .param int __ARG_1 new $P2, [ 'Boolean' ], __ARG_1 setattribute self, 'positive', $P2 .end # Negable .sub 'isnegable' :method .return(1) .end # isnegable .sub 'negated' :method getattribute $P1, self, 'positive' isfalse $I1, $P1 getattribute $P1, self, 'positive' assign $P1, $I1 .return(self) .end # negated .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'Negable' ] addattribute $P0, 'positive' .end .namespace [ 'Winxed'; 'Compiler'; 'CheckerExpr' ] .sub 'CheckerExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param int __ARG_3 getattribute $P1, __ARG_1, 'owner' getattribute $P2, __ARG_1, 'start' self.'Expr'($P1, $P2) self.'Negable'(__ARG_3) setattribute self, 'expr', __ARG_2 .end # CheckerExpr .sub 'isnegable' :method .return(1) .end # isnegable .sub 'checkresult' :method .return("I") .end # checkresult .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'CheckerExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Expr' ] addparent $P0, $P1 get_class $P2, [ 'Winxed'; 'Compiler'; 'Negable' ] addparent $P0, $P2 get_class $P3, [ 'Winxed'; 'Compiler'; 'ConditionFriendlyExpr' ] addparent $P0, $P3 addattribute $P0, 'expr' .end .namespace [ 'Winxed'; 'Compiler'; 'NullCheckerExpr' ] .sub 'NullCheckerExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param int __ARG_3 self.'CheckerExpr'(__ARG_1, __ARG_2, __ARG_3) .end # NullCheckerExpr .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P2, self, 'expr' $P1 = $P2.'emit_get'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: self.'annotate'(__ARG_1) __ARG_1.'emitarg2'("isnull", __ARG_2, $S1) getattribute $P1, self, 'positive' if $P1 goto __label_2 __ARG_1.'emitarg1'("not", __ARG_2) __label_2: # endif .end # emit .sub 'emit_if' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P2, self, 'expr' $P1 = $P2.'emit_get'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: self.'annotate'(__ARG_1) getattribute $P1, self, 'positive' if_null $P1, __label_2 unless $P1 goto __label_2 __ARG_1.'emitif_null'($S1, __ARG_2) goto __label_3 __label_2: # else __ARG_1.'emitunless_null'($S1, __ARG_2) __label_3: # endif .end # emit_if .sub 'emit_else' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P2, self, 'expr' $P1 = $P2.'emit_get'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: self.'annotate'(__ARG_1) getattribute $P1, self, 'positive' if_null $P1, __label_2 unless $P1 goto __label_2 __ARG_1.'emitunless_null'($S1, __ARG_2) goto __label_3 __label_2: # else __ARG_1.'emitif_null'($S1, __ARG_2) __label_3: # endif .end # emit_else .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'NullCheckerExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'CheckerExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'ZeroCheckerExpr' ] .sub 'ZeroCheckerExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param int __ARG_3 self.'CheckerExpr'(__ARG_1, __ARG_2, __ARG_3) .end # ZeroCheckerExpr .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P1, self, 'expr' $P2 = $P1.'emit_getint'(__ARG_1) null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: self.'annotate'(__ARG_1) getattribute $P2, self, 'positive' if_null $P2, __label_2 unless $P2 goto __label_2 __ARG_1.'emitarg3'("iseq", __ARG_2, $S1, 0) goto __label_3 __label_2: # else __ARG_1.'emitarg3'("isne", __ARG_2, $S1, 0) __label_3: # endif .end # emit .sub 'emit_if' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P1, self, 'expr' $P2 = $P1.'emit_getint'(__ARG_1) null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: self.'annotate'(__ARG_1) getattribute $P2, self, 'positive' if_null $P2, __label_2 unless $P2 goto __label_2 __ARG_1.'emitunless'($S1, __ARG_2) goto __label_3 __label_2: # else __ARG_1.'emitif'($S1, __ARG_2) __label_3: # endif .end # emit_if .sub 'emit_else' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P1, self, 'expr' $P2 = $P1.'emit_getint'(__ARG_1) null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: self.'annotate'(__ARG_1) getattribute $P2, self, 'positive' if_null $P2, __label_2 unless $P2 goto __label_2 __ARG_1.'emitif'($S1, __ARG_2) goto __label_3 __label_2: # else __ARG_1.'emitunless'($S1, __ARG_2) __label_3: # endif .end # emit_else .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ZeroCheckerExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'CheckerExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpEqualExpr' ] .sub 'OpEqualExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 .param int __ARG_5 self.'set'(__ARG_1, __ARG_2, __ARG_3, __ARG_4) self.'Negable'(__ARG_5) .end # OpEqualExpr .sub 'clone' :method .param pmc __ARG_1 new $P2, [ 'Winxed'; 'Compiler'; 'OpEqualExpr' ] $P1 = self.'clonebinary'($P2, __ARG_1) getattribute $P2, self, 'positive' $P1.'Negable'($P2) .return($P1) .end # clone .sub 'isnegable' :method .return(1) .end # isnegable .sub 'optimize' :method .const 'Sub' integerValue = "integerValue" self.'optimizearg'() getattribute $P1, self, 'lexpr' getattribute $P2, self, 'rexpr' $P3 = $P1.'isnull'() set $I1, $P3 $P3 = $P2.'isnull'() set $I2, $P3 and $I8, $I1, $I2 if $I8 goto __label_3 if $I1 goto __label_4 if $I2 goto __label_5 goto __label_2 __label_3: # case getattribute $P3, self, 'owner' getattribute $P4, self, 'start' getattribute $P5, self, 'positive' .tailcall integerValue($P3, $P4, $P5) __label_4: # case new $P7, [ 'Winxed'; 'Compiler'; 'NullCheckerExpr' ] getattribute $P8, self, 'positive' $P7.'NullCheckerExpr'(self, $P2, $P8) set $P6, $P7 .return($P6) __label_5: # case new $P10, [ 'Winxed'; 'Compiler'; 'NullCheckerExpr' ] getattribute $P11, self, 'positive' $P10.'NullCheckerExpr'(self, $P1, $P11) set $P9, $P10 .return($P9) __label_2: # default __label_1: # switch end $P3 = $P1.'isliteral'() unless $P3 goto __label_6 $P4 = $P2.'isliteral'() unless $P4 goto __label_6 $P5 = $P1.'checkresult'() null $S1 if_null $P5, __label_7 set $S1, $P5 __label_7: $P3 = $P2.'checkresult'() null $S2 if_null $P3, __label_8 set $S2, $P3 __label_8: iseq $I8, $S1, "I" unless $I8 goto __label_12 iseq $I8, $S2, "I" __label_12: if $I8 goto __label_11 iseq $I9, $S1, "N" unless $I9 goto __label_14 iseq $I9, $S2, "N" __label_14: if $I9 goto __label_13 iseq $I10, $S1, "N" unless $I10 goto __label_16 iseq $I10, $S2, "I" __label_16: if $I10 goto __label_15 iseq $I11, $S1, "I" unless $I11 goto __label_18 iseq $I11, $S2, "N" __label_18: if $I11 goto __label_17 iseq $I12, $S1, "S" unless $I12 goto __label_20 iseq $I12, $S2, "S" __label_20: if $I12 goto __label_19 goto __label_10 __label_11: # case $P3 = $P1.'getIntegerValue'() set $I3, $P3 $P4 = $P2.'getIntegerValue'() set $I4, $P4 getattribute $P5, self, 'positive' if_null $P5, __label_22 unless $P5 goto __label_22 iseq $I5, $I3, $I4 goto __label_21 __label_22: isne $I5, $I3, $I4 __label_21: getattribute $P6, self, 'owner' getattribute $P7, self, 'start' .tailcall integerValue($P6, $P7, $I5) __label_13: # case __label_15: # case __label_17: # case $P8 = $P1.'getFloatValue'() set $N1, $P8 $P9 = $P2.'getFloatValue'() set $N2, $P9 getattribute $P10, self, 'positive' if_null $P10, __label_24 unless $P10 goto __label_24 iseq $I6, $N1, $N2 goto __label_23 __label_24: isne $I6, $N1, $N2 __label_23: getattribute $P11, self, 'owner' getattribute $P12, self, 'start' .tailcall integerValue($P11, $P12, $I6) __label_19: # case getattribute $P14, $P1, 'strval' getattribute $P13, $P14, 'str' null $S3 if_null $P13, __label_25 set $S3, $P13 __label_25: getattribute $P16, $P2, 'strval' getattribute $P15, $P16, 'str' null $S4 if_null $P15, __label_26 set $S4, $P15 __label_26: getattribute $P17, self, 'positive' if_null $P17, __label_28 unless $P17 goto __label_28 iseq $I7, $S3, $S4 goto __label_27 __label_28: isne $I7, $S3, $S4 __label_27: getattribute $P18, self, 'owner' getattribute $P19, self, 'start' .tailcall integerValue($P18, $P19, $I7) __label_10: # default __label_9: # switch end __label_6: # endif $P3 = $P2.'isintegerzero'() if_null $P3, __label_29 unless $P3 goto __label_29 new $P5, [ 'Winxed'; 'Compiler'; 'ZeroCheckerExpr' ] getattribute $P6, self, 'positive' $P5.'ZeroCheckerExpr'(self, $P1, $P6) set $P4, $P5 .return($P4) __label_29: # endif $P3 = $P1.'isintegerzero'() if_null $P3, __label_30 unless $P3 goto __label_30 new $P5, [ 'Winxed'; 'Compiler'; 'ZeroCheckerExpr' ] getattribute $P6, self, 'positive' $P5.'ZeroCheckerExpr'(self, $P2, $P6) set $P4, $P5 .return($P4) __label_30: # endif .return(self) .end # optimize .sub 'emitop' :method .param pmc __ARG_1 .param string __ARG_2 .param string __ARG_3 .param string __ARG_4 self.'annotate'(__ARG_1) getattribute $P1, self, 'positive' if_null $P1, __label_2 unless $P1 goto __label_2 set $S1, "iseq" goto __label_1 __label_2: set $S1, "isne" __label_1: __ARG_1.'emitbinop'($S1, __ARG_2, __ARG_3, __ARG_4) .end # emitop .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 self.'annotate'(__ARG_1) self.'emit_comparator'(__ARG_1, __ARG_2) .end # emit .sub 'emitop_if' :method .param pmc __ARG_1 .param string __ARG_2 .param string __ARG_3 .param string __ARG_4 self.'annotate'(__ARG_1) getattribute $P1, self, 'positive' if_null $P1, __label_2 unless $P1 goto __label_2 set $S1, "eq" goto __label_1 __label_2: set $S1, "ne" __label_1: __ARG_1.'emitcompare'($S1, __ARG_3, __ARG_4, __ARG_2) .end # emitop_if .sub 'emitop_else' :method .param pmc __ARG_1 .param string __ARG_2 .param string __ARG_3 .param string __ARG_4 self.'annotate'(__ARG_1) getattribute $P1, self, 'positive' if_null $P1, __label_2 unless $P1 goto __label_2 set $S1, "ne" goto __label_1 __label_2: set $S1, "eq" __label_1: __ARG_1.'emitcompare'($S1, __ARG_3, __ARG_4, __ARG_2) .end # emitop_else .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpEqualExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'ComparatorBaseExpr' ] addparent $P0, $P1 get_class $P2, [ 'Winxed'; 'Compiler'; 'Negable' ] addparent $P0, $P2 .end .namespace [ 'Winxed'; 'Compiler'; 'OpSameExpr' ] .sub 'OpSameExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 .param int __ARG_5 self.'initbinary'(__ARG_1, __ARG_2, __ARG_3, __ARG_4) self.'Negable'(__ARG_5) .end # OpSameExpr .sub 'clone' :method .param pmc __ARG_1 new $P2, [ 'Winxed'; 'Compiler'; 'OpSameExpr' ] $P1 = self.'clonebinary'($P2, __ARG_1) getattribute $P2, self, 'positive' $P1.'Negable'($P2) .return($P1) .end # clone .sub 'isnegable' :method .return(1) .end # isnegable .sub 'int_op' :method .param int __ARG_1 .param int __ARG_2 getattribute $P1, self, 'positive' if_null $P1, __label_2 unless $P1 goto __label_2 iseq $I1, __ARG_1, __ARG_2 goto __label_1 __label_2: isne $I1, __ARG_1, __ARG_2 __label_1: .return($I1) .end # int_op .sub 'emitop' :method .param pmc __ARG_1 .param string __ARG_2 .param string __ARG_3 .param string __ARG_4 self.'annotate'(__ARG_1) getattribute $P1, self, 'positive' set $I1, $P1 unless $I1 goto __label_2 set $S1, "issame" goto __label_1 __label_2: set $S1, "isntsame" __label_1: __ARG_1.'emitbinop'($S1, __ARG_2, __ARG_3, __ARG_4) .end # emitop .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 self.'emit_comparator'(__ARG_1, __ARG_2) .end # emit .sub 'emitop_if' :method .param pmc __ARG_1 .param string __ARG_2 .param string __ARG_3 .param string __ARG_4 self.'annotate'(__ARG_1) getattribute $P1, self, 'positive' set $I1, $P1 unless $I1 goto __label_2 set $S1, "eq_addr" goto __label_1 __label_2: set $S1, "ne_addr" __label_1: __ARG_1.'emitcompare'($S1, __ARG_3, __ARG_4, __ARG_2) .end # emitop_if .sub 'emitop_else' :method .param pmc __ARG_1 .param string __ARG_2 .param string __ARG_3 .param string __ARG_4 self.'annotate'(__ARG_1) getattribute $P1, self, 'positive' set $I1, $P1 unless $I1 goto __label_2 set $S1, "ne_addr" goto __label_1 __label_2: set $S1, "eq_addr" __label_1: __ARG_1.'emitcompare'($S1, __ARG_3, __ARG_4, __ARG_2) .end # emitop_else .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpSameExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'ComparatorBaseExpr' ] addparent $P0, $P1 get_class $P2, [ 'Winxed'; 'Compiler'; 'Negable' ] addparent $P0, $P2 addattribute $P0, 'positive' .end .namespace [ 'Winxed'; 'Compiler'; 'OpLessExpr' ] .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpLessExpr' ] .tailcall self.'clonebinary'($P1, __ARG_1) .end # clone .sub 'isnegable' :method .return(1) .end # isnegable .sub 'negated' :method new $P1, [ 'Winxed'; 'Compiler'; 'OpGreaterEqualExpr' ] .tailcall $P1.'setfrom'(self) .end # negated .sub 'int_op' :method .param int __ARG_1 .param int __ARG_2 islt $I1, __ARG_1, __ARG_2 .return($I1) .end # int_op .sub 'emitop' :method .param pmc __ARG_1 .param string __ARG_2 .param string __ARG_3 .param string __ARG_4 __ARG_1.'emitbinop'("islt", __ARG_2, __ARG_3, __ARG_4) .end # emitop .sub 'emitop_if' :method .param pmc __ARG_1 .param string __ARG_2 .param string __ARG_3 .param string __ARG_4 __ARG_1.'emitcompare'("lt", __ARG_3, __ARG_4, __ARG_2) .end # emitop_if .sub 'emitop_else' :method .param pmc __ARG_1 .param string __ARG_2 .param string __ARG_3 .param string __ARG_4 __ARG_1.'emitcompare'("ge", __ARG_3, __ARG_4, __ARG_2) .end # emitop_else .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpLessExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'ComparatorBaseExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpGreaterExpr' ] .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpGreaterExpr' ] .tailcall self.'clonebinary'($P1, __ARG_1) .end # clone .sub 'isnegable' :method .return(1) .end # isnegable .sub 'negated' :method new $P1, [ 'Winxed'; 'Compiler'; 'OpLessEqualExpr' ] .tailcall $P1.'setfrom'(self) .end # negated .sub 'int_op' :method .param int __ARG_1 .param int __ARG_2 isgt $I1, __ARG_1, __ARG_2 .return($I1) .end # int_op .sub 'emitop' :method .param pmc __ARG_1 .param string __ARG_2 .param string __ARG_3 .param string __ARG_4 __ARG_1.'emitbinop'("isgt", __ARG_2, __ARG_3, __ARG_4) .end # emitop .sub 'emitop_if' :method .param pmc __ARG_1 .param string __ARG_2 .param string __ARG_3 .param string __ARG_4 __ARG_1.'emitcompare'("gt", __ARG_3, __ARG_4, __ARG_2) .end # emitop_if .sub 'emitop_else' :method .param pmc __ARG_1 .param string __ARG_2 .param string __ARG_3 .param string __ARG_4 __ARG_1.'emitcompare'("le", __ARG_3, __ARG_4, __ARG_2) .end # emitop_else .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpGreaterExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'ComparatorBaseExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpLessEqualExpr' ] .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpLessEqualExpr' ] .tailcall self.'clonebinary'($P1, __ARG_1) .end # clone .sub 'isnegable' :method .return(1) .end # isnegable .sub 'negated' :method new $P1, [ 'Winxed'; 'Compiler'; 'OpGreaterExpr' ] .tailcall $P1.'setfrom'(self) .end # negated .sub 'int_op' :method .param int __ARG_1 .param int __ARG_2 isle $I1, __ARG_1, __ARG_2 .return($I1) .end # int_op .sub 'emitop' :method .param pmc __ARG_1 .param string __ARG_2 .param string __ARG_3 .param string __ARG_4 __ARG_1.'emitbinop'("isle", __ARG_2, __ARG_3, __ARG_4) .end # emitop .sub 'emitop_if' :method .param pmc __ARG_1 .param string __ARG_2 .param string __ARG_3 .param string __ARG_4 __ARG_1.'emitcompare'("le", __ARG_3, __ARG_4, __ARG_2) .end # emitop_if .sub 'emitop_else' :method .param pmc __ARG_1 .param string __ARG_2 .param string __ARG_3 .param string __ARG_4 __ARG_1.'emitcompare'("gt", __ARG_3, __ARG_4, __ARG_2) .end # emitop_else .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpLessEqualExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'ComparatorBaseExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpGreaterEqualExpr' ] .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpGreaterEqualExpr' ] .tailcall self.'clonebinary'($P1, __ARG_1) .end # clone .sub 'isnegable' :method .return(1) .end # isnegable .sub 'negated' :method new $P1, [ 'Winxed'; 'Compiler'; 'OpLessExpr' ] .tailcall $P1.'setfrom'(self) .end # negated .sub 'int_op' :method .param int __ARG_1 .param int __ARG_2 isge $I1, __ARG_1, __ARG_2 .return($I1) .end # int_op .sub 'emitop' :method .param pmc __ARG_1 .param string __ARG_2 .param string __ARG_3 .param string __ARG_4 __ARG_1.'emitbinop'("isge", __ARG_2, __ARG_3, __ARG_4) .end # emitop .sub 'emitop_if' :method .param pmc __ARG_1 .param string __ARG_2 .param string __ARG_3 .param string __ARG_4 __ARG_1.'emitcompare'("ge", __ARG_3, __ARG_4, __ARG_2) .end # emitop_if .sub 'emitop_else' :method .param pmc __ARG_1 .param string __ARG_2 .param string __ARG_3 .param string __ARG_4 __ARG_1.'emitcompare'("lt", __ARG_3, __ARG_4, __ARG_2) .end # emitop_else .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpGreaterEqualExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'ComparatorBaseExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpBaseBoolExpr' ] .sub 'checkresult' :method getattribute $P2, self, 'lexpr' $P1 = $P2.'checkresult'() set $S2, $P1 ne $S2, "I", __label_2 getattribute $P4, self, 'rexpr' $P3 = $P4.'checkresult'() set $S3, $P3 ne $S3, "I", __label_2 set $S1, "I" goto __label_1 __label_2: set $S1, "P" __label_1: .return($S1) .end # checkresult .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpBaseBoolExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBinaryExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpBoolAndExpr' ] .sub 'OpBoolAndExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'set'(__ARG_1, __ARG_2, __ARG_3, __ARG_4) .end # OpBoolAndExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpBoolAndExpr' ] .tailcall self.'clonebinary'($P1, __ARG_1) .end # clone .sub 'optimize' :method .const 'Sub' integerValue = "integerValue" self.'optimizearg'() getattribute $P2, self, 'lexpr' $P1 = $P2.'isintegerliteral'() if_null $P1, __label_1 unless $P1 goto __label_1 getattribute $P4, self, 'lexpr' $P3 = $P4.'getIntegerValue'() set $I1, $P3 unless $I1 goto __label_3 getattribute $P1, self, 'rexpr' goto __label_2 __label_3: getattribute $P3, self, 'owner' getattribute $P4, self, 'start' $P2 = integerValue($P3, $P4, $I1) set $P1, $P2 __label_2: .return($P1) __label_1: # endif .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P1, self, 'lexpr' getattribute $P2, self, 'rexpr' $P3 = self.'checkresult'() null $S1 if_null $P3, __label_1 set $S1, $P3 __label_1: ne $S1, "I", __label_2 $P3 = $P1.'issimple'() unless $P3 goto __label_2 $P4 = $P2.'issimple'() unless $P4 goto __label_2 $P5 = self.'emit_intleft'(__ARG_1) null $S2 if_null $P5, __label_4 set $S2, $P5 __label_4: $P3 = self.'emit_intright'(__ARG_1) null $S3 if_null $P3, __label_5 set $S3, $P3 __label_5: __ARG_1.'emitbinop'("and", __ARG_2, $S2, $S3) goto __label_3 __label_2: # else $P3 = self.'genlabel'() null $S4 if_null $P3, __label_6 set $S4, $P3 __label_6: ne $S1, "P", __label_7 $P3 = $P1.'checkresult'() set $S7, $P3 eq $S7, "P", __label_7 $P4 = $P1.'emit_get'(__ARG_1) null $S5 if_null $P4, __label_9 set $S5, $P4 __label_9: __ARG_1.'emitbox'(__ARG_2, $S5) goto __label_8 __label_7: # else $P1.'emit'(__ARG_1, __ARG_2) __label_8: # endif __ARG_1.'emitunless'(__ARG_2, $S4) ne $S1, "P", __label_10 $P3 = $P2.'checkresult'() set $S7, $P3 eq $S7, "P", __label_10 $P4 = $P2.'emit_get'(__ARG_1) null $S6 if_null $P4, __label_12 set $S6, $P4 __label_12: __ARG_1.'emitbox'(__ARG_2, $S6) goto __label_11 __label_10: # else $P2.'emit'(__ARG_1, __ARG_2) __label_11: # endif __ARG_1.'emitlabel'($S4) __label_3: # endif .end # emit .sub 'emit_void' :method .param pmc __ARG_1 getattribute $P1, self, 'lexpr' getattribute $P2, self, 'rexpr' $P3 = self.'checkresult'() null $S1 if_null $P3, __label_1 set $S1, $P3 __label_1: ne $S1, "I", __label_2 $P3 = $P1.'issimple'() unless $P3 goto __label_2 $P4 = $P2.'issimple'() unless $P4 goto __label_2 $P5 = self.'emit_intleft'(__ARG_1) null $S2 if_null $P5, __label_4 set $S2, $P5 __label_4: $P3 = self.'emit_intright'(__ARG_1) null $S3 if_null $P3, __label_5 set $S3, $P3 __label_5: __ARG_1.'emitbinop'("and", "$I0", $S2, $S3) goto __label_3 __label_2: # else $P3 = self.'genlabel'() null $S4 if_null $P3, __label_6 set $S4, $P3 __label_6: $P3 = $P1.'emit_get'(__ARG_1) null $S5 if_null $P3, __label_7 set $S5, $P3 __label_7: __ARG_1.'emitunless'($S5, $S4) $P2.'emit_void'(__ARG_1) __ARG_1.'emitlabel'($S4) __label_3: # endif .end # emit_void .sub 'emit_else' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P1, self, 'lexpr' isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'ConditionFriendlyElse' ] unless $I1 goto __label_1 $P1.'emit_else'(__ARG_1, __ARG_2) goto __label_2 __label_1: # else $P3 = $P1.'emit_get'(__ARG_1) null $S1 if_null $P3, __label_3 set $S1, $P3 __label_3: __ARG_1.'emitunless'($S1, __ARG_2) __label_2: # endif getattribute $P2, self, 'rexpr' isa $I1, $P2, [ 'Winxed'; 'Compiler'; 'ConditionFriendlyElse' ] unless $I1 goto __label_4 $P2.'emit_else'(__ARG_1, __ARG_2) goto __label_5 __label_4: # else $P3 = $P2.'emit_get'(__ARG_1) null $S2 if_null $P3, __label_6 set $S2, $P3 __label_6: __ARG_1.'emitunless'($S2, __ARG_2) __label_5: # endif .end # emit_else .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpBoolAndExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBaseBoolExpr' ] addparent $P0, $P1 get_class $P2, [ 'Winxed'; 'Compiler'; 'ConditionFriendlyElse' ] addparent $P0, $P2 .end .namespace [ 'Winxed'; 'Compiler'; 'OpBoolOrExpr' ] .sub 'OpBoolOrExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'set'(__ARG_1, __ARG_2, __ARG_3, __ARG_4) .end # OpBoolOrExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpBoolOrExpr' ] .tailcall self.'clonebinary'($P1, __ARG_1) .end # clone .sub 'optimize' :method .const 'Sub' integerValue = "integerValue" self.'optimizearg'() getattribute $P2, self, 'lexpr' $P1 = $P2.'isintegerliteral'() if_null $P1, __label_1 unless $P1 goto __label_1 getattribute $P4, self, 'lexpr' $P3 = $P4.'getIntegerValue'() set $I1, $P3 if $I1 goto __label_3 getattribute $P1, self, 'rexpr' goto __label_2 __label_3: getattribute $P3, self, 'owner' getattribute $P4, self, 'start' $P2 = integerValue($P3, $P4, $I1) set $P1, $P2 __label_2: .return($P1) __label_1: # endif .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P1, self, 'lexpr' getattribute $P2, self, 'rexpr' $P3 = self.'checkresult'() null $S1 if_null $P3, __label_1 set $S1, $P3 __label_1: ne $S1, "I", __label_2 $P3 = $P1.'issimple'() unless $P3 goto __label_2 $P4 = $P2.'issimple'() unless $P4 goto __label_2 $P5 = self.'emit_intleft'(__ARG_1) null $S2 if_null $P5, __label_4 set $S2, $P5 __label_4: $P3 = self.'emit_intright'(__ARG_1) null $S3 if_null $P3, __label_5 set $S3, $P3 __label_5: __ARG_1.'emitbinop'("or", __ARG_2, $S2, $S3) goto __label_3 __label_2: # else $P3 = self.'genlabel'() null $S4 if_null $P3, __label_6 set $S4, $P3 __label_6: ne $S1, "P", __label_7 $P3 = $P1.'checkresult'() set $S7, $P3 eq $S7, "P", __label_7 $P4 = $P1.'emit_get'(__ARG_1) null $S5 if_null $P4, __label_9 set $S5, $P4 __label_9: __ARG_1.'emitbox'(__ARG_2, $S5) goto __label_8 __label_7: # else $P1.'emit'(__ARG_1, __ARG_2) __label_8: # endif __ARG_1.'emitif'(__ARG_2, $S4) ne $S1, "P", __label_10 $P3 = $P2.'checkresult'() set $S7, $P3 eq $S7, "P", __label_10 $P4 = $P2.'emit_get'(__ARG_1) null $S6 if_null $P4, __label_12 set $S6, $P4 __label_12: __ARG_1.'emitbox'(__ARG_2, $S6) goto __label_11 __label_10: # else $P2.'emit'(__ARG_1, __ARG_2) __label_11: # endif __ARG_1.'emitlabel'($S4) __label_3: # endif .end # emit .sub 'emit_void' :method .param pmc __ARG_1 getattribute $P1, self, 'lexpr' getattribute $P2, self, 'rexpr' $P3 = self.'checkresult'() null $S1 if_null $P3, __label_1 set $S1, $P3 __label_1: ne $S1, "I", __label_2 $P3 = $P1.'issimple'() unless $P3 goto __label_2 $P4 = $P2.'issimple'() unless $P4 goto __label_2 $P5 = self.'emit_intleft'(__ARG_1) null $S2 if_null $P5, __label_4 set $S2, $P5 __label_4: $P3 = self.'emit_intright'(__ARG_1) null $S3 if_null $P3, __label_5 set $S3, $P3 __label_5: __ARG_1.'emitbinop'("or", "$I0", $S2, $S3) goto __label_3 __label_2: # else $P3 = self.'genlabel'() null $S4 if_null $P3, __label_6 set $S4, $P3 __label_6: $P3 = $P1.'emit_get'(__ARG_1) null $S5 if_null $P3, __label_7 set $S5, $P3 __label_7: __ARG_1.'emitif'($S5, $S4) $P2.'emit_void'(__ARG_1) __ARG_1.'emitlabel'($S4) __label_3: # endif .end # emit_void .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpBoolOrExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBaseBoolExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpBaseBinExpr' ] .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpBaseBinExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBinaryIntExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpBinAndExpr' ] .sub 'OpBinAndExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'set'(__ARG_1, __ARG_2, __ARG_3, __ARG_4) .end # OpBinAndExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpBinAndExpr' ] .tailcall self.'clonebinary'($P1, __ARG_1) .end # clone .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 $P1 = self.'emit_intleft'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: $P1 = self.'emit_intright'(__ARG_1) null $S2 if_null $P1, __label_2 set $S2, $P1 __label_2: self.'annotate'(__ARG_1) __ARG_1.'emitbinop'("band", __ARG_2, $S1, $S2) .end # emit .sub 'do_op' :method .param int __ARG_1 .param int __ARG_2 band $I1, __ARG_1, __ARG_2 .return($I1) .end # do_op .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpBinAndExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBaseBinExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpBinOrExpr' ] .sub 'OpBinOrExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'set'(__ARG_1, __ARG_2, __ARG_3, __ARG_4) .end # OpBinOrExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpBinOrExpr' ] .tailcall self.'clonebinary'($P1, __ARG_1) .end # clone .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 $P1 = self.'emit_intleft'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: $P1 = self.'emit_intright'(__ARG_1) null $S2 if_null $P1, __label_2 set $S2, $P1 __label_2: self.'annotate'(__ARG_1) __ARG_1.'emitbinop'("bor", __ARG_2, $S1, $S2) .end # emit .sub 'do_op' :method .param int __ARG_1 .param int __ARG_2 bor $I1, __ARG_1, __ARG_2 .return($I1) .end # do_op .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpBinOrExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBaseBinExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpBinXorExpr' ] .sub 'OpBinXorExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'set'(__ARG_1, __ARG_2, __ARG_3, __ARG_4) .end # OpBinXorExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpBinXorExpr' ] .tailcall self.'clonebinary'($P1, __ARG_1) .end # clone .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 $P1 = self.'emit_intleft'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: $P1 = self.'emit_intright'(__ARG_1) null $S2 if_null $P1, __label_2 set $S2, $P1 __label_2: self.'annotate'(__ARG_1) __ARG_1.'emitbinop'("bxor", __ARG_2, $S1, $S2) .end # emit .sub 'do_op' :method .param int __ARG_1 .param int __ARG_2 bxor $I1, __ARG_1, __ARG_2 .return($I1) .end # do_op .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpBinXorExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBaseBinExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'ConcatString' ] .sub 'ConcatString' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'Expr'(__ARG_1, __ARG_2) isa $I1, __ARG_3, [ 'Winxed'; 'Compiler'; 'ConcatString' ] if $I1 goto __label_3 isa $I2, __ARG_4, [ 'Winxed'; 'Compiler'; 'ConcatString' ] if $I2 goto __label_4 goto __label_2 __label_3: # case getattribute $P2, __ARG_3, 'values' setattribute self, 'values', $P2 isa $I3, __ARG_4, [ 'Winxed'; 'Compiler'; 'ConcatString' ] unless $I3 goto __label_5 getattribute $P3, __ARG_4, 'values' self.'append'($P3) goto __label_6 __label_5: # else self.'pushexpr'(__ARG_4) __label_6: # endif goto __label_1 # break __label_4: # case getattribute $P5, __ARG_4, 'values' setattribute self, 'values', $P5 self.'unshiftexpr'(__ARG_3) goto __label_1 # break __label_2: # default root_new $P7, ['parrot';'ResizablePMCArray'] assign $P7, 2 $P7[0] = __ARG_3 $P7[1] = __ARG_4 setattribute self, 'values', $P7 __label_1: # switch end .end # ConcatString .sub 'pushexpr' :method .param pmc __ARG_1 .const 'Sub' WSubId_104 = "WSubId_104" getattribute $P1, self, 'values' $P2 = $P1[-1] $P3 = $P2.'isstringliteral'() unless $P3 goto __label_1 $P4 = __ARG_1.'isstringliteral'() unless $P4 goto __label_1 $P5 = WSubId_104($P2, __ARG_1) $P1[-1] = $P5 goto __label_2 __label_1: # else push $P1, __ARG_1 __label_2: # endif .end # pushexpr .sub 'unshiftexpr' :method .param pmc __ARG_1 .const 'Sub' WSubId_104 = "WSubId_104" getattribute $P1, self, 'values' $P2 = $P1[0] $P3 = $P2.'isstringliteral'() unless $P3 goto __label_1 $P4 = __ARG_1.'isstringliteral'() unless $P4 goto __label_1 $P5 = WSubId_104(__ARG_1, $P2) $P1[0] = $P5 goto __label_2 __label_1: # else unshift $P1, __ARG_1 __label_2: # endif .end # unshiftexpr .sub 'append' :method .param pmc __ARG_1 .const 'Sub' WSubId_104 = "WSubId_104" getattribute $P1, self, 'values' $P2 = $P1[-1] $P4 = $P2.'isstringliteral'() if_null $P4, __label_1 unless $P4 goto __label_1 $P3 = __ARG_1[0] $P4 = $P3.'isstringliteral'() if_null $P4, __label_2 unless $P4 goto __label_2 $P5 = WSubId_104($P2, $P3) $P1[-1] = $P5 __ARG_1.'shift'() __label_2: # endif __label_1: # endif $P1.'append'(__ARG_1) .end # append .sub 'checkresult' :method .return("S") .end # checkresult .sub 'getregs' :method .param pmc __ARG_1 getattribute $P1, self, 'values' elements $I1, $P1 new $P2, ['FixedStringArray'], $I1 null $I2 __label_3: # for condition ge $I2, $I1, __label_2 $P3 = $P1[$I2] $S1 = $P3.'emit_get'(__ARG_1) $P2[$I2] = $S1 __label_1: # for iteration inc $I2 goto __label_3 __label_2: # for end .return($P2) .end # getregs .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 $P1 = self.'emit_get'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: __ARG_1.'emitset'(__ARG_2, $S1) .end # emit .sub 'emit_get' :method .param pmc __ARG_1 $P1 = self.'getregs'(__ARG_1) elements $I1, $P1 $P2 = self.'tempreg'("S") null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: self.'annotate'(__ARG_1) $P2 = $P1[0] $P3 = $P1[1] __ARG_1.'emitconcat'($S1, $P2, $P3) set $I2, 2 __label_4: # for condition ge $I2, $I1, __label_3 $P2 = $P1[$I2] __ARG_1.'emitconcat1'($S1, $P2) __label_2: # for iteration inc $I2 goto __label_4 __label_3: # for end .return($S1) .end # emit_get .sub 'emit_init' :method .param pmc __ARG_1 .param string __ARG_2 $P1 = self.'getregs'(__ARG_1) elements $I1, $P1 self.'annotate'(__ARG_1) $P2 = $P1[0] $P3 = $P1[1] __ARG_1.'emitconcat'(__ARG_2, $P2, $P3) set $I2, 2 __label_3: # for condition ge $I2, $I1, __label_2 $P2 = $P1[$I2] __ARG_1.'emitconcat1'(__ARG_2, $P2) __label_1: # for iteration inc $I2 goto __label_3 __label_2: # for end .end # emit_init .sub 'emit_concat_to' :method .param pmc __ARG_1 .param string __ARG_2 $P1 = self.'getregs'(__ARG_1) elements $I1, $P1 self.'annotate'(__ARG_1) null $I2 __label_3: # for condition ge $I2, $I1, __label_2 $P2 = $P1[$I2] __ARG_1.'emitconcat1'(__ARG_2, $P2) __label_1: # for iteration inc $I2 goto __label_3 __label_2: # for end .end # emit_concat_to .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ConcatString' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'FinalExpr' ] addparent $P0, $P1 addattribute $P0, 'values' .end .namespace [ 'Winxed'; 'Compiler'; 'RepeatString' ] .sub 'RepeatString' :method .param pmc __ARG_1 getattribute $P1, __ARG_1, 'owner' getattribute $P2, __ARG_1, 'start' getattribute $P3, __ARG_1, 'lexpr' getattribute $P4, __ARG_1, 'rexpr' self.'set'($P1, $P2, $P3, $P4) .end # RepeatString .sub 'checkresult' :method .return("S") .end # checkresult .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P1, self, 'rexpr' getattribute $P3, self, 'lexpr' $P2 = $P3.'emit_get'(__ARG_1) null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: $P2 = $P1.'emit_getint'(__ARG_1) null $S2 if_null $P2, __label_2 set $S2, $P2 __label_2: self.'annotate'(__ARG_1) __ARG_1.'emitrepeat'(__ARG_2, $S1, $S2) .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'RepeatString' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBinaryExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpAddExpr' ] .sub 'OpAddExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'set'(__ARG_1, __ARG_2, __ARG_3, __ARG_4) .end # OpAddExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpAddExpr' ] .tailcall self.'clonebinary'($P1, __ARG_1) .end # clone .sub 'optimize' :method .const 'Sub' WSubId_104 = "WSubId_104" .const 'Sub' integerValue = "integerValue" .const 'Sub' WSubId_105 = "WSubId_105" .const 'Sub' WSubId_100 = "WSubId_100" self.'optimizearg'() getattribute $P1, self, 'lexpr' getattribute $P2, self, 'rexpr' $P3 = $P1.'checkresult'() null $S1 if_null $P3, __label_1 set $S1, $P3 __label_1: $P3 = $P2.'checkresult'() null $S2 if_null $P3, __label_2 set $S2, $P3 __label_2: $P3 = $P1.'isliteral'() unless $P3 goto __label_3 $P4 = $P2.'isliteral'() unless $P4 goto __label_3 ne $S1, "S", __label_4 ne $S2, "S", __label_4 .tailcall WSubId_104($P1, $P2) __label_4: # endif ne $S1, "I", __label_5 ne $S2, "I", __label_5 $P3 = $P1.'getIntegerValue'() set $I1, $P3 $P3 = $P2.'getIntegerValue'() set $I2, $P3 getattribute $P3, self, 'owner' getattribute $P4, self, 'start' add $I3, $I1, $I2 .tailcall integerValue($P3, $P4, $I3) __label_5: # endif $P3 = WSubId_105($S1, $S2) if_null $P3, __label_6 unless $P3 goto __label_6 $P4 = $P1.'getFloatValue'() set $N1, $P4 $P3 = $P2.'getFloatValue'() set $N2, $P3 getattribute $P3, self, 'owner' getattribute $P4, self, 'start' add $N3, $N1, $N2 .tailcall WSubId_100($P3, $P4, $N3) __label_6: # endif __label_3: # endif ne $S1, "S", __label_7 ne $S2, "S", __label_7 new $P4, [ 'Winxed'; 'Compiler'; 'ConcatString' ] getattribute $P5, self, 'owner' getattribute $P6, self, 'start' $P4.'ConcatString'($P5, $P6, $P1, $P2) set $P3, $P4 .return($P3) __label_7: # endif .return(self) .end # optimize .sub 'checkresult' :method .const 'Sub' WSubId_105 = "WSubId_105" getattribute $P2, self, 'lexpr' $P1 = $P2.'checkresult'() null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: getattribute $P2, self, 'rexpr' $P1 = $P2.'checkresult'() null $S2 if_null $P1, __label_2 set $S2, $P1 __label_2: ne $S1, $S2, __label_3 .return($S1) __label_3: # endif ne $S1, "I", __label_4 ne $S2, "S", __label_4 .return("S") __label_4: # endif ne $S1, "S", __label_5 ne $S2, "I", __label_5 .return("S") __label_5: # endif $P1 = WSubId_105($S1, $S2) if_null $P1, __label_6 unless $P1 goto __label_6 .return("N") __label_6: # endif .return("I") .end # checkresult .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P1, self, 'lexpr' getattribute $P2, self, 'rexpr' $P3 = self.'checkresult'() null $S1 if_null $P3, __label_1 set $S1, $P3 __label_1: $P3 = $P1.'checkresult'() null $S2 if_null $P3, __label_2 set $S2, $P3 __label_2: $P3 = $P2.'checkresult'() null $S3 if_null $P3, __label_3 set $S3, $P3 __label_3: $P3 = $P1.'emit_get'(__ARG_1) null $S4 if_null $P3, __label_4 set $S4, $P3 __label_4: $P3 = $P2.'emit_get'(__ARG_1) null $S5 if_null $P3, __label_5 set $S5, $P3 __label_5: ne $S1, "S", __label_6 isne $I1, $S2, "S" if $I1 goto __label_9 isne $I1, $S3, "S" __label_9: unless $I1 goto __label_8 $P3 = self.'tempreg'("S") null $S6 if_null $P3, __label_10 set $S6, $P3 __label_10: eq $S2, "S", __label_11 __ARG_1.'emitset'($S6, $S4) set $S4, $S6 goto __label_12 __label_11: # else __ARG_1.'emitset'($S6, $S5) set $S5, $S6 __label_12: # endif __label_8: # endif __ARG_1.'emitconcat'(__ARG_2, $S4, $S5) goto __label_7 __label_6: # else ne $S1, "I", __label_13 isne $I1, $S2, "I" if $I1 goto __label_15 isne $I1, $S3, "I" __label_15: unless $I1 goto __label_13 null $S7 ne $S2, "I", __label_16 set $S7, $S4 goto __label_17 __label_16: # else $P3 = self.'tempreg'("I") set $S7, $P3 __ARG_1.'emitset'($S7, $S4) __label_17: # endif null $S8 ne $S3, "I", __label_18 set $S8, $S5 goto __label_19 __label_18: # else $P3 = self.'tempreg'("I") set $S8, $P3 __ARG_1.'emitset'($S8, $S5) __label_19: # endif __ARG_1.'emitadd'(__ARG_2, $S7, $S8) goto __label_14 __label_13: # else __ARG_1.'emitadd'(__ARG_2, $S4, $S5) __label_14: # endif __label_7: # endif .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpAddExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBinaryExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpSubExpr' ] .sub 'OpSubExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'set'(__ARG_1, __ARG_2, __ARG_3, __ARG_4) .end # OpSubExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpSubExpr' ] .tailcall self.'clonebinary'($P1, __ARG_1) .end # clone .sub 'optimize' :method .const 'Sub' integerValue = "integerValue" self.'optimizearg'() getattribute $P1, self, 'lexpr' getattribute $P2, self, 'rexpr' $P3 = $P1.'isliteral'() unless $P3 goto __label_1 $P4 = $P2.'isliteral'() unless $P4 goto __label_1 $P5 = $P1.'checkresult'() null $S1 if_null $P5, __label_2 set $S1, $P5 __label_2: $P3 = $P2.'checkresult'() null $S2 if_null $P3, __label_3 set $S2, $P3 __label_3: ne $S1, "I", __label_4 ne $S2, "I", __label_4 $P3 = $P1.'getIntegerValue'() set $I1, $P3 $P3 = $P2.'getIntegerValue'() set $I2, $P3 getattribute $P3, self, 'owner' getattribute $P4, self, 'start' sub $I3, $I1, $I2 .tailcall integerValue($P3, $P4, $I3) __label_4: # endif __label_1: # endif .return(self) .end # optimize .sub 'checkresult' :method getattribute $P2, self, 'lexpr' $P1 = $P2.'checkresult'() null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: getattribute $P2, self, 'rexpr' $P1 = $P2.'checkresult'() null $S2 if_null $P1, __label_2 set $S2, $P1 __label_2: eq $S1, $S2, __label_5 iseq $I1, $S1, "P" if $I1 goto __label_7 iseq $I1, $S2, "P" __label_7: if $I1 goto __label_6 iseq $I2, $S1, "I" unless $I2 goto __label_9 iseq $I2, $S2, "N" __label_9: if $I2 goto __label_8 iseq $I3, $S1, "N" unless $I3 goto __label_11 iseq $I3, $S2, "I" __label_11: if $I3 goto __label_10 goto __label_4 __label_5: # case .return($S1) __label_6: # case .return("P") __label_8: # case .return("N") __label_10: # case .return("N") __label_4: # default .return("I") __label_3: # switch end .end # checkresult .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 $P3 = self.'checkresult'() null $S1 if_null $P3, __label_1 set $S1, $P3 __label_1: getattribute $P1, self, 'lexpr' getattribute $P2, self, 'rexpr' $P3 = $P1.'checkresult'() null $S2 if_null $P3, __label_2 set $S2, $P3 __label_2: $P3 = $P2.'checkresult'() null $S3 if_null $P3, __label_3 set $S3, $P3 __label_3: $P3 = $P1.'emit_get'(__ARG_1) null $S4 if_null $P3, __label_4 set $S4, $P3 __label_4: $P3 = $P2.'emit_get'(__ARG_1) null $S5 if_null $P3, __label_5 set $S5, $P3 __label_5: null $S6 eq $S2, $S1, __label_6 $P3 = self.'tempreg'($S1) set $S6, $P3 ne $S1, "P", __label_7 __ARG_1.'emitbox'($S6, $S4) goto __label_8 __label_7: # else __ARG_1.'emitset'($S6, $S4) __label_8: # endif set $S4, $S6 __label_6: # endif eq $S3, $S1, __label_9 $P3 = self.'tempreg'($S1) set $S6, $P3 ne $S1, "P", __label_10 __ARG_1.'emitbox'($S6, $S5) goto __label_11 __label_10: # else __ARG_1.'emitset'($S6, $S5) __label_11: # endif set $S5, $S6 __label_9: # endif __ARG_1.'emitsub'(__ARG_2, $S4, $S5) .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpSubExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBinaryExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpMulExpr' ] .sub 'OpMulExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'set'(__ARG_1, __ARG_2, __ARG_3, __ARG_4) .end # OpMulExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpMulExpr' ] .tailcall self.'clonebinary'($P1, __ARG_1) .end # clone .sub 'optimize' :method .const 'Sub' integerValue = "integerValue" .const 'Sub' WSubId_105 = "WSubId_105" .const 'Sub' WSubId_100 = "WSubId_100" self.'optimizearg'() getattribute $P1, self, 'lexpr' getattribute $P2, self, 'rexpr' $P3 = $P1.'checkresult'() null $S1 if_null $P3, __label_1 set $S1, $P3 __label_1: $P3 = $P2.'checkresult'() null $S2 if_null $P3, __label_2 set $S2, $P3 __label_2: $P3 = $P1.'isliteral'() unless $P3 goto __label_3 $P4 = $P2.'isliteral'() unless $P4 goto __label_3 ne $S1, "I", __label_4 ne $S2, "I", __label_4 $P5 = $P1.'getIntegerValue'() set $I1, $P5 $P3 = $P2.'getIntegerValue'() set $I2, $P3 getattribute $P3, self, 'owner' getattribute $P4, self, 'start' mul $I3, $I1, $I2 .tailcall integerValue($P3, $P4, $I3) __label_4: # endif $P3 = WSubId_105($S1, $S2) if_null $P3, __label_5 unless $P3 goto __label_5 $P4 = $P1.'getFloatValue'() set $N1, $P4 $P3 = $P2.'getFloatValue'() set $N2, $P3 getattribute $P3, self, 'owner' getattribute $P4, self, 'start' mul $N3, $N1, $N2 .tailcall WSubId_100($P3, $P4, $N3) __label_5: # endif __label_3: # endif ne $S1, "S", __label_6 new $P4, [ 'Winxed'; 'Compiler'; 'RepeatString' ] $P4.'RepeatString'(self) set $P3, $P4 .return($P3) __label_6: # endif .return(self) .end # optimize .sub 'checkresult' :method getattribute $P1, self, 'lexpr' getattribute $P3, self, 'lexpr' $P2 = $P3.'checkresult'() null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: getattribute $P3, self, 'rexpr' $P2 = $P3.'checkresult'() null $S2 if_null $P2, __label_2 set $S2, $P2 __label_2: ne $S1, $S2, __label_3 .return($S1) __label_3: # endif ne $S1, "S", __label_4 .return("S") goto __label_5 __label_4: # else .return("N") __label_5: # endif .end # checkresult .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P1, self, 'lexpr' getattribute $P2, self, 'rexpr' $P3 = $P1.'checkresult'() null $S1 if_null $P3, __label_1 set $S1, $P3 __label_1: $P3 = $P2.'checkresult'() null $S2 if_null $P3, __label_2 set $S2, $P3 __label_2: null $S3 null $S4 ne $S1, $S2, __label_3 iseq $I3, $S1, "I" if $I3 goto __label_5 iseq $I3, $S1, "N" __label_5: if $I3 goto __label_4 iseq $I3, $S1, "P" __label_4: unless $I3 goto __label_3 $P3 = $P1.'emit_get'(__ARG_1) set $S3, $P3 $P3 = $P2.'emit_get'(__ARG_1) set $S4, $P3 __ARG_1.'emitmul'(__ARG_2, $S3, $S4) .return() __label_3: # endif ne $S1, "N", __label_6 $P3 = $P1.'emit_get'(__ARG_1) set $S3, $P3 $P3 = $P2.'emit_get'(__ARG_1) set $S4, $P3 null $S5 if_null $S2, __label_7 length $I3, $S2 ne $I3, 1, __label_7 ord $I3, $S2 if $I3 == 73 goto __label_9 if $I3 == 78 goto __label_10 goto __label_7 __label_9: # case $P3 = self.'tempreg'("N") set $S5, $P3 __ARG_1.'emitset'($S5, $S4) set $S5, $S4 goto __label_8 # break __label_10: # case set $S5, $S4 goto __label_8 # break __label_7: # default $P4 = self.'tempreg'("N") set $S5, $P4 __ARG_1.'emitset'($S5, $S4) __label_8: # switch end self.'annotate'(__ARG_1) __ARG_1.'emitmul'(__ARG_2, $S3, $S5) .return() __label_6: # endif null $I1 null $I2 $P4 = $P1.'issimple'() isfalse $I3, $P4 box $P3, $I3 if $P3 goto __label_13 $P3 = $P1.'isidentifier'() __label_13: if_null $P3, __label_11 unless $P3 goto __label_11 $P6 = self.'checkresult'() $P5 = self.'tempreg'($P6) set $S3, $P5 $P1.'emit'(__ARG_1, $S3) goto __label_12 __label_11: # else $P3 = $P1.'getIntegerValue'() set $I1, $P3 set $S3, $I1 __label_12: # endif $P4 = $P2.'issimple'() isfalse $I3, $P4 box $P3, $I3 if $P3 goto __label_16 $P3 = $P2.'isidentifier'() __label_16: if_null $P3, __label_14 unless $P3 goto __label_14 $P6 = self.'checkresult'() $P5 = self.'tempreg'($P6) set $S4, $P5 $P2.'emit'(__ARG_1, $S4) goto __label_15 __label_14: # else if_null $S2, __label_17 length $I3, $S2 ne $I3, 1, __label_17 ord $I3, $S2 if $I3 == 83 goto __label_19 if $I3 == 78 goto __label_20 if $I3 == 73 goto __label_21 goto __label_17 __label_19: # case $P4 = self.'checkresult'() $P3 = self.'tempreg'($P4) set $S4, $P3 $P2.'emit'(__ARG_1, $S4) goto __label_18 # break __label_20: # case $P5 = $P2.'emit_get'(__ARG_1) set $S4, $P5 goto __label_18 # break __label_21: # case __label_17: # default $P6 = $P2.'getIntegerValue'() set $I2, $P6 set $S4, $I2 goto __label_18 # break __label_18: # switch end __label_15: # endif self.'annotate'(__ARG_1) __ARG_1.'emitmul'(__ARG_2, $S3, $S4) .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpMulExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBinaryExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpDivExpr' ] .sub 'OpDivExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'set'(__ARG_1, __ARG_2, __ARG_3, __ARG_4) .end # OpDivExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpDivExpr' ] .tailcall self.'clonebinary'($P1, __ARG_1) .end # clone .sub 'optimize' :method .const 'Sub' WSubId_100 = "WSubId_100" .const 'Sub' WSubId_105 = "WSubId_105" self.'optimizearg'() getattribute $P1, self, 'lexpr' getattribute $P2, self, 'rexpr' $P5 = $P1.'isliteral'() unless $P5 goto __label_1 $P6 = $P2.'isliteral'() unless $P6 goto __label_1 $P7 = $P1.'checkresult'() null $S1 if_null $P7, __label_2 set $S1, $P7 __label_2: $P5 = $P2.'checkresult'() null $S2 if_null $P5, __label_3 set $S2, $P5 __label_3: null $P3 null $P4 ne $S1, "I", __label_4 ne $S2, "I", __label_4 $P5 = $P1.'getIntegerValue'() set $I1, $P5 $P5 = $P2.'getIntegerValue'() set $I2, $P5 unless $I2 goto __label_5 getattribute $P5, self, 'owner' getattribute $P6, self, 'start' set $N4, $I1 set $N5, $I2 div $N3, $N4, $N5 .tailcall WSubId_100($P5, $P6, $N3) __label_5: # endif __label_4: # endif $P5 = WSubId_105($S1, $S2) if_null $P5, __label_6 unless $P5 goto __label_6 $P6 = $P1.'getFloatValue'() set $N1, $P6 $P5 = $P2.'getFloatValue'() set $N2, $P5 set $I3, $N2 unless $I3 goto __label_7 getattribute $P5, self, 'owner' getattribute $P6, self, 'start' div $N3, $N1, $N2 .tailcall WSubId_100($P5, $P6, $N3) __label_7: # endif __label_6: # endif __label_1: # endif .return(self) .end # optimize .sub 'checkresult' :method .return("N") .end # checkresult .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P1, self, 'lexpr' null $P2 $P3 = $P1.'emit_get'(__ARG_1) $P6 = $P1.'checkresult'() set $S1, $P6 eq $S1, "N", __label_1 $P2 = self.'tempreg'("N") __ARG_1.'emitset'($P2, $P3) set $P3, $P2 __label_1: # endif getattribute $P4, self, 'rexpr' $P5 = $P4.'emit_get'(__ARG_1) $P6 = $P4.'checkresult'() set $S1, $P6 eq $S1, "N", __label_2 $P2 = self.'tempreg'("N") __ARG_1.'emitset'($P2, $P5) set $P5, $P2 __label_2: # endif self.'annotate'(__ARG_1) __ARG_1.'emitdiv'(__ARG_2, $P3, $P5) .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpDivExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBinaryExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpModExpr' ] .sub 'OpModExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'set'(__ARG_1, __ARG_2, __ARG_3, __ARG_4) .end # OpModExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpModExpr' ] .tailcall self.'clonebinary'($P1, __ARG_1) .end # clone .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 $P1 = self.'emit_intleft'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: $P1 = self.'emit_intright'(__ARG_1) null $S2 if_null $P1, __label_2 set $S2, $P1 __label_2: self.'annotate'(__ARG_1) __ARG_1.'emitbinop'("mod", __ARG_2, $S1, $S2) .end # emit .sub 'do_op' :method .param int __ARG_1 .param int __ARG_2 mod $I1, __ARG_1, __ARG_2 .return($I1) .end # do_op .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpModExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBinaryIntExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpCModExpr' ] .sub 'OpCModExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'set'(__ARG_1, __ARG_2, __ARG_3, __ARG_4) .end # OpCModExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpCModExpr' ] .tailcall self.'clonebinary'($P1, __ARG_1) .end # clone .sub 'checkresult' :method .return("I") .end # checkresult .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 $P1 = self.'emit_intleft'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: $P1 = self.'emit_intright'(__ARG_1) null $S2 if_null $P1, __label_2 set $S2, $P1 __label_2: self.'annotate'(__ARG_1) __ARG_1.'emitbinop'("mod", __ARG_2, $S1, $S2) .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpCModExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBinaryExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpShiftleftExpr' ] .sub 'OpShiftleftExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'set'(__ARG_1, __ARG_2, __ARG_3, __ARG_4) .end # OpShiftleftExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpShiftleftExpr' ] .tailcall self.'clonebinary'($P1, __ARG_1) .end # clone .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 $P1 = self.'emit_intleft'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: $P1 = self.'emit_intright'(__ARG_1) null $S2 if_null $P1, __label_2 set $S2, $P1 __label_2: self.'annotate'(__ARG_1) __ARG_1.'emitbinop'("shl", __ARG_2, $S1, $S2) .end # emit .sub 'do_op' :method .param int __ARG_1 .param int __ARG_2 shl $I1, __ARG_1, __ARG_2 .return($I1) .end # do_op .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpShiftleftExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBinaryIntExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpShiftrightExpr' ] .sub 'OpShiftrightExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'set'(__ARG_1, __ARG_2, __ARG_3, __ARG_4) .end # OpShiftrightExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpShiftrightExpr' ] .tailcall self.'clonebinary'($P1, __ARG_1) .end # clone .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 $P1 = self.'emit_intleft'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: $P1 = self.'emit_intright'(__ARG_1) null $S2 if_null $P1, __label_2 set $S2, $P1 __label_2: self.'annotate'(__ARG_1) __ARG_1.'emitbinop'("shr", __ARG_2, $S1, $S2) .end # emit .sub 'do_op' :method .param int __ARG_1 .param int __ARG_2 shr $I1, __ARG_1, __ARG_2 .return($I1) .end # do_op .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpShiftrightExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBinaryIntExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'OpShiftlrightExpr' ] .sub 'OpShiftlrightExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'set'(__ARG_1, __ARG_2, __ARG_3, __ARG_4) .end # OpShiftlrightExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpShiftlrightExpr' ] .tailcall self.'clonebinary'($P1, __ARG_1) .end # clone .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 $P1 = self.'emit_intleft'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: $P1 = self.'emit_intright'(__ARG_1) null $S2 if_null $P1, __label_2 set $S2, $P1 __label_2: self.'annotate'(__ARG_1) __ARG_1.'emitbinop'("lsr", __ARG_2, $S1, $S2) .end # emit .sub 'do_op' :method .param int __ARG_1 .param int __ARG_2 lsr $I1, __ARG_1, __ARG_2 .return($I1) .end # do_op .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpShiftlrightExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'OpBinaryIntExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'ArgumentModifierList' ] .sub 'ArgumentModifierList' :method .param pmc __ARG_1 .param pmc __ARG_2 self.'ModifierList'(__ARG_1, __ARG_2) .end # ArgumentModifierList .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'ArgumentModifierList' ] $P3 = self.'clonemodifiers'(__ARG_1) setattribute $P1, 'list', $P3 .return($P1) .end # clone .sub 'emitmodifiers' :method .param pmc __ARG_1 .const 'Sub' SyntaxError = "SyntaxError" null $I1 null $I2 set $S1, "" $P3 = self.'getlist'() if_null $P3, __label_2 iter $P4, $P3 set $P4, 0 __label_1: # for iteration unless $P4 goto __label_2 shift $P1, $P4 $P5 = $P1.'getname'() set $S2, $P5 if $S2 == "flat" goto __label_5 if $S2 == "named" goto __label_6 goto __label_3 __label_5: # case set $I1, 1 goto __label_4 # break __label_6: # case set $I2, 1 $P6 = $P1.'numargs'() set $I3, $P6 if $I3 == 0 goto __label_9 if $I3 == 1 goto __label_10 goto __label_7 __label_9: # case goto __label_8 # break __label_10: # case $P2 = $P1.'getarg'(0) $P7 = $P2.'isstringliteral'() if $P7 goto __label_11 SyntaxError("Invalid modifier", $P2) __label_11: # endif $P8 = $P2.'getPirString'() set $S1, $P8 goto __label_8 # break __label_7: # default SyntaxError("Invalid modifier", $P2) __label_8: # switch end __label_3: # default __label_4: # switch end goto __label_1 __label_2: # endfor and $I3, $I1, $I2 if $I3 goto __label_14 if $I1 goto __label_15 if $I2 goto __label_16 goto __label_13 __label_14: # case __ARG_1.'print'(" :flat :named") goto __label_12 # break __label_15: # case __ARG_1.'print'(" :flat") goto __label_12 # break __label_16: # case __ARG_1.'print'(" :named") eq $S1, "", __label_17 __ARG_1.'print'("(", $S1, ")") __label_17: # endif goto __label_12 # break __label_13: # default __label_12: # switch end .end # emitmodifiers .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ArgumentModifierList' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'ModifierList' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'Argument' ] .sub 'Argument' :method .param pmc __ARG_1 .param pmc __ARG_2 setattribute self, 'arg', __ARG_1 setattribute self, 'modifiers', __ARG_2 .end # Argument .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'Argument' ] getattribute $P4, self, 'arg' $P3 = $P4.'clone'(__ARG_1) setattribute $P1, 'arg', $P3 getattribute $P2, self, 'modifiers' if_null $P2, __label_1 getattribute $P5, self, 'modifiers' $P4 = $P5.'clone'(__ARG_1) setattribute $P1, 'modifiers', $P4 __label_1: # endif .return($P1) .end # clone .sub 'optimize' :method getattribute $P3, self, 'arg' $P2 = $P3.'optimize'() setattribute self, 'arg', $P2 getattribute $P1, self, 'modifiers' if_null $P1, __label_1 getattribute $P2, self, 'modifiers' $P2.'optimize'() __label_1: # endif .return(self) .end # optimize .sub 'hascompilevalue' :method getattribute $P1, self, 'arg' .tailcall $P1.'hascompilevalue'() .end # hascompilevalue .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'Argument' ] addattribute $P0, 'arg' addattribute $P0, 'modifiers' .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'parseArgument' :subid('parseArgument') .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_75 = "WSubId_75" .const 'Sub' Expected = "Expected" null $P1 $P2 = WSubId_75(__ARG_1, __ARG_2) $P3 = __ARG_1.'get'() $P4 = $P3.'isop'(":") if_null $P4, __label_1 unless $P4 goto __label_1 $P3 = __ARG_1.'get'() $P4 = $P3.'isop'("[") if_null $P4, __label_3 unless $P4 goto __label_3 new $P5, [ 'Winxed'; 'Compiler'; 'ArgumentModifierList' ] $P5.'ArgumentModifierList'(__ARG_1, __ARG_2) set $P1, $P5 goto __label_4 __label_3: # else Expected("modifier list", $P3) __label_4: # endif goto __label_2 __label_1: # else __ARG_1.'unget'($P3) __label_2: # endif new $P5, [ 'Winxed'; 'Compiler'; 'Argument' ] $P5.'Argument'($P2, $P1) set $P4, $P5 .return($P4) .end # parseArgument .namespace [ 'Winxed'; 'Compiler'; 'ArgumentList' ] .sub 'ArgumentList' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param string __ARG_4 .const 'Sub' parseListOrEmpty = "parseListOrEmpty" .const 'Sub' parseArgument = "parseArgument" setattribute self, 'owner', __ARG_1 setattribute self, 'start', __ARG_2 $P2 = parseListOrEmpty(__ARG_3, __ARG_1, parseArgument, __ARG_4) setattribute self, 'args', $P2 .end # ArgumentList .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'ArgumentList' ] setattribute $P1, 'owner', __ARG_1 getattribute $P10, self, 'start' setattribute $P1, 'start', $P10 getattribute $P2, self, 'args' if_null $P2, __label_1 set $P3, $P2 set $P4, __ARG_1 .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" set $P5, $P3 root_new $P6, ['parrot';'ResizablePMCArray'] $P10 = bindmethod("clone") $P7 = bindlast($P10, $P4) if_null $P5, __label_3 iter $P12, $P5 set $P12, 0 __label_2: # for iteration unless $P12 goto __label_3 shift $P8, $P12 $P13 = $P7($P8) push $P6, $P13 goto __label_2 __label_3: # endfor set $P11, $P6 set $P9, $P11 setattribute $P1, 'args', $P9 __label_1: # endif .return($P1) .end # clone .sub 'numargs' :method getattribute $P1, self, 'args' unless_null $P1, __label_2 null $I1 goto __label_1 __label_2: elements $I1, $P1 __label_1: .return($I1) .end # numargs .sub 'getrawargs' :method getattribute $P1, self, 'args' .return($P1) .end # getrawargs .sub 'getarg' :method .param int __ARG_1 getattribute $P1, self, 'args' $P2 = $P1[__ARG_1] .return($P2) .end # getarg .sub 'getfreearg' :method .param int __ARG_1 getattribute $P1, self, 'args' $P3 = $P1[__ARG_1] getattribute $P2, $P3, 'arg' .return($P2) .end # getfreearg .sub 'optimize' :method getattribute $P1, self, 'args' if_null $P1, __label_2 elements $I1, $P1 goto __label_1 __label_2: null $I1 __label_1: null $I2 __label_5: # for condition ge $I2, $I1, __label_4 $P3 = $P1[$I2] $P2 = $P3.'optimize'() $P1[$I2] = $P2 __label_3: # for iteration inc $I2 goto __label_5 __label_4: # for end .return(self) .end # optimize .sub 'getargvalues' :method .param pmc __ARG_1 getattribute $P1, self, 'argregs' unless_null $P1, __label_1 new $P2, ['ResizableStringArray'] new $P5, [ 'Winxed'; 'Compiler'; 'CollectValues' ] getattribute $P6, self, 'owner' $P5.'CollectValues'($P6, __ARG_1) set $P3, $P5 getattribute $P5, self, 'args' if_null $P5, __label_3 iter $P7, $P5 set $P7, 0 __label_2: # for iteration unless $P7 goto __label_3 shift $P4, $P7 getattribute $P8, $P4, 'arg' $P6 = $P3.'add'($P8) null $S1 if_null $P6, __label_4 set $S1, $P6 __label_4: push $P2, $S1 goto __label_2 __label_3: # endfor setattribute self, 'argregs', $P2 __label_1: # endif .return($P1) .end # getargvalues .sub 'emitargs' :method .param pmc __ARG_1 getattribute $P1, self, 'args' $P2 = self.'getargvalues'(__ARG_1) set $S1, "" $P4 = self.'numargs'() set $I1, $P4 null $I2 __label_3: # for condition ge $I2, $I1, __label_2 $P4 = $P2[$I2] __ARG_1.'print'($S1, $P4) $P4 = $P1[$I2] getattribute $P3, $P4, 'modifiers' if_null $P3, __label_4 $P3.'emitmodifiers'(__ARG_1) __label_4: # endif set $S1, ", " __label_1: # for iteration inc $I2 goto __label_3 __label_2: # for end .end # emitargs .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ArgumentList' ] addattribute $P0, 'owner' addattribute $P0, 'start' addattribute $P0, 'args' addattribute $P0, 'argregs' .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'arglist_hascompilevalue' :subid('WSubId_107') .param pmc __ARG_1 if_null __ARG_1, __label_2 iter $P2, __ARG_1 set $P2, 0 __label_1: # for iteration unless $P2 goto __label_2 shift $P1, $P2 $P3 = $P1.'hascompilevalue'() if $P3 goto __label_3 .return(0) __label_3: # endif goto __label_1 __label_2: # endfor .return(1) .end # arglist_hascompilevalue .namespace [ 'Winxed'; 'Compiler'; 'CastExpr' ] .sub 'CastExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param string __ARG_4 self.'Expr'(__ARG_1, __ARG_2) setattribute self, 'arg', __ARG_3 box $P1, __ARG_4 setattribute self, 'type', $P1 .end # CastExpr .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P1, self, 'arg' getattribute $P2, self, 'type' null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: $P2 = $P1.'checkresult'() null $S2 if_null $P2, __label_2 set $S2, $P2 __label_2: isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'IndexExpr' ] if $I1 goto __label_5 isa $I2, $P1, [ 'Winxed'; 'Compiler'; 'CallExpr' ] if $I2 goto __label_6 eq $S2, $S1, __label_7 $P2 = $P1.'isnull'() set $I3, $P2 if $I3 goto __label_8 goto __label_4 __label_5: # case __label_6: # case __label_7: # case $P1.'emit'(__ARG_1, __ARG_2) goto __label_3 # break __label_8: # case __ARG_1.'emitnull'(__ARG_2) goto __label_3 # break __label_4: # default $P3 = $P1.'emit_get'(__ARG_1) null $S3 if_null $P3, __label_9 set $S3, $P3 __label_9: __ARG_1.'emitset'(__ARG_2, $S3) __label_3: # switch end .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'CastExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'FinalExpr' ] addparent $P0, $P1 addattribute $P0, 'arg' addattribute $P0, 'type' .end .namespace [ 'Winxed'; 'Compiler'; 'IntCastExpr' ] .sub 'IntCastExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'CastExpr'(__ARG_1, __ARG_2, __ARG_3, "I") .end # IntCastExpr .sub 'checkresult' :method .return("I") .end # checkresult .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'IntCastExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'CastExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'FloatCastExpr' ] .sub 'FloatCastExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'CastExpr'(__ARG_1, __ARG_2, __ARG_3, "N") .end # FloatCastExpr .sub 'checkresult' :method .return("N") .end # checkresult .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'FloatCastExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'CastExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'StringCastExpr' ] .sub 'StringCastExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'CastExpr'(__ARG_1, __ARG_2, __ARG_3, "S") .end # StringCastExpr .sub 'checkresult' :method .return("S") .end # checkresult .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'StringCastExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'CastExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'BoxExpr' ] .sub 'BoxExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'Expr'(__ARG_1, __ARG_2) setattribute self, 'arg', __ARG_3 .end # BoxExpr .sub 'checkresult' :method .return("P") .end # checkresult .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P1, self, 'arg' $P2 = $P1.'emit_get'(__ARG_1) null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: self.'annotate'(__ARG_1) __ARG_1.'emitbox'(__ARG_2, $S1) .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'BoxExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'FinalExpr' ] addparent $P0, $P1 addattribute $P0, 'arg' .end .namespace [ 'Winxed'; 'Compiler'; 'VarCastExpr' ] .sub 'VarCastExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'Expr'(__ARG_1, __ARG_2) setattribute self, 'arg', __ARG_3 .end # VarCastExpr .sub 'checkresult' :method .return("P") .end # checkresult .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P1, self, 'arg' $P9 = $P1.'checkresult'() null $S1 if_null $P9, __label_1 set $S1, $P9 __label_1: null $P2 isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'FunctionId' ] if $I1 goto __label_4 isa $I2, $P1, [ 'Winxed'; 'Compiler'; 'IdentifierExpr' ] if $I2 goto __label_5 isa $I3, $P1, [ 'Winxed'; 'Compiler'; 'MemberExpr' ] if $I3 goto __label_6 goto __label_3 __label_4: # case $P1.'emitvar'(__ARG_1, __ARG_2) goto __label_2 # break __label_5: # case $P9 = $P1.'getName'() null $S2 if_null $P9, __label_7 set $S2, $P9 __label_7: $P10 = $P1.'checkIdentifier'() null $S3 if_null $P10, __label_8 set $S3, $P10 __label_8: $P3 = $P1.'checkVar'() eq $S3, "", __label_9 if_null $P3, __label_9 $P11 = $P3.'issubid'() if $P11 goto __label_9 $P1.'emit'(__ARG_1, __ARG_2) goto __label_10 __label_9: # else root_new $P9, ['parrot';'ResizablePMCArray'] assign $P9, 1 $P9[0] = $S2 $P2 = $P1.'scopesearch'($P9, 0) if_null $P2, __label_11 isa $I1, $P2, [ 'Winxed'; 'Compiler'; 'FunctionStatement' ] unless $I1 goto __label_11 getattribute $P9, $P2, 'owner' $P4 = $P9.'getpath'() self.'annotate'(__ARG_1) set $P5, $P4 null $S4 elements $I1, $P5 unless $I1 goto __label_12 join $S9, "'; '", $P5 concat $S10, "[ '", $S9 concat $S10, $S10, "' ]" set $S4, $S10 __label_12: # endif set $S8, $S4 __ARG_1.'emitget_hll_global'(__ARG_2, $S2, $S8) __label_11: # endif __label_10: # endif goto __label_2 # break __label_6: # case new $P6, ['ResizableStringArray'] $P1.'buildkey'($P6) getattribute $P9, self, 'owner' $P2 = $P9.'scopesearch'($P6, 0) if_null $P2, __label_13 isa $I1, $P2, [ 'Winxed'; 'Compiler'; 'FunctionStatement' ] unless $I1 goto __label_13 getattribute $P10, $P2, 'owner' $P7 = $P10.'getpath'() getattribute $P10, $P2, 'name' $P9 = $P10.'getidentifier'() null $S5 if_null $P9, __label_15 set $S5, $P9 __label_15: self.'annotate'(__ARG_1) $P9 = $P7.'getparrotkey'() __ARG_1.'emitget_hll_global'(__ARG_2, $S5, $P9) goto __label_14 __label_13: # else $P9 = $P6[0] set $S9, $P9 ne $S9, "self", __label_16 getattribute $P12, self, 'owner' $P11 = $P12.'getouter'() $P10 = $P11.'ismethod'() unless $P10 goto __label_16 $P1.'emit'(__ARG_1, __ARG_2) goto __label_17 __label_16: # else $P9 = $P6.'pop'() null $S6 if_null $P9, __label_18 set $S6, $P9 __label_18: self.'annotate'(__ARG_1) set $P8, $P6 null $S7 elements $I1, $P8 unless $I1 goto __label_19 join $S9, "'; '", $P8 concat $S10, "[ '", $S9 concat $S10, $S10, "' ]" set $S7, $S10 __label_19: # endif set $S11, $S7 __ARG_1.'emitget_hll_global'(__ARG_2, $S6, $S11) __label_17: # endif __label_14: # endif goto __label_2 # break __label_3: # default self.'annotate'(__ARG_1) $P1.'emit'(__ARG_1, __ARG_2) __label_2: # switch end .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'VarCastExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'FinalExpr' ] addparent $P0, $P1 addattribute $P0, 'arg' .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'builtinexpr_intcast' :subid('bindmethod2') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' integerValue = "integerValue" $P3 = __ARG_3.'getarg'(0) getattribute $P1, $P3, 'arg' $P3 = $P1.'hascompilevalue'() if_null $P3, __label_1 unless $P3 goto __label_1 set $P2, $P1 $P3 = $P2.'getIntegerValue'() set $I1, $P3 set $I2, $I1 .tailcall integerValue(__ARG_1, __ARG_2, $I2) goto __label_2 __label_1: # else new $P4, [ 'Winxed'; 'Compiler'; 'IntCastExpr' ] $P4.'IntCastExpr'(__ARG_1, __ARG_2, $P1) set $P3, $P4 .return($P3) __label_2: # endif .end # builtinexpr_intcast .sub 'builtinexpr_floatcast' :subid('bindmethod3') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' WSubId_100 = "WSubId_100" $P3 = __ARG_3.'getarg'(0) getattribute $P1, $P3, 'arg' $P3 = $P1.'hascompilevalue'() if_null $P3, __label_1 unless $P3 goto __label_1 set $P2, $P1 $P3 = $P2.'getFloatValue'() set $N1, $P3 set $N2, $N1 .tailcall WSubId_100(__ARG_1, __ARG_2, $N2) goto __label_2 __label_1: # else new $P4, [ 'Winxed'; 'Compiler'; 'FloatCastExpr' ] $P4.'FloatCastExpr'(__ARG_1, __ARG_2, $P1) set $P3, $P4 .return($P3) __label_2: # endif .end # builtinexpr_floatcast .sub 'builtinexpr_stringcast' :subid('bindmethod4') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' bindmethod0 = "bindmethod0" $P3 = __ARG_3.'getarg'(0) getattribute $P1, $P3, 'arg' $P3 = $P1.'hascompilevalue'() if_null $P3, __label_1 unless $P3 goto __label_1 set $P2, $P1 $P3 = $P2.'getStringValue'() null $S1 if_null $P3, __label_3 set $S1, $P3 __label_3: set $S2, $S1 .tailcall bindmethod0(__ARG_1, __ARG_2, $S2) goto __label_2 __label_1: # else new $P4, [ 'Winxed'; 'Compiler'; 'StringCastExpr' ] $P4.'StringCastExpr'(__ARG_1, __ARG_2, $P1) set $P3, $P4 .return($P3) __label_2: # endif .end # builtinexpr_stringcast .sub 'builtinexpr_varcast' :subid('bindmethod5') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 $P2 = __ARG_3.'getarg'(0) getattribute $P1, $P2, 'arg' $P2 = $P1.'checkresult'() null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: if_null $S1, __label_2 length $I1, $S1 ne $I1, 1, __label_2 ord $I1, $S1 if $I1 == 73 goto __label_4 if $I1 == 78 goto __label_5 if $I1 == 83 goto __label_6 goto __label_2 __label_4: # case __label_5: # case __label_6: # case new $P3, [ 'Winxed'; 'Compiler'; 'BoxExpr' ] $P3.'BoxExpr'(__ARG_1, __ARG_2, $P1) set $P2, $P3 .return($P2) __label_2: # default new $P5, [ 'Winxed'; 'Compiler'; 'VarCastExpr' ] $P5.'VarCastExpr'(__ARG_1, __ARG_2, $P1) set $P4, $P5 .return($P4) __label_3: # switch end .end # builtinexpr_varcast .namespace [ 'Winxed'; 'Compiler'; 'CallBuiltinExpr' ] .sub 'CallBuiltinExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'Expr'(__ARG_1, __ARG_2) setattribute self, 'builtin', __ARG_3 setattribute self, 'args', __ARG_4 .end # CallBuiltinExpr .sub 'checkresult' :method getattribute $P2, self, 'builtin' $P1 = $P2.'result'() null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: ne $S1, ":", __label_2 getattribute $P4, self, 'args' $P3 = $P4[0] getattribute $P2, $P3, 'arg' $P1 = $P2.'checkresult'() set $S1, $P1 __label_2: # endif .return($S1) .end # checkresult .sub 'emit_void' :method .param pmc __ARG_1 self.'emit'(__ARG_1, "") .end # emit_void .sub 'emit_get' :method .param pmc __ARG_1 .const 'Sub' SyntaxError = "SyntaxError" .const 'Sub' InternalError = "InternalError" $P1 = self.'checkresult'() null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: if_null $S1, __label_2 length $I1, $S1 ne $I1, 1, __label_2 ord $I1, $S1 if $I1 == 73 goto __label_4 if $I1 == 78 goto __label_5 if $I1 == 83 goto __label_6 if $I1 == 80 goto __label_7 if $I1 == 118 goto __label_8 goto __label_2 __label_4: # case __label_5: # case __label_6: # case __label_7: # case goto __label_3 # break __label_8: # case SyntaxError("Can't use result of a void builtin", self) __label_2: # default concat $S3, "Unexpected result type '", $S1 concat $S3, $S3, "'" InternalError($S3, self) __label_3: # switch end $P1 = self.'tempreg'($S1) null $S2 if_null $P1, __label_9 set $S2, $P1 __label_9: self.'emit'(__ARG_1, $S2) .return($S2) .end # emit_get .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P1, self, 'owner' getattribute $P2, self, 'start' getattribute $P3, self, 'builtin' getattribute $P4, self, 'args' new $P5, ['ResizableStringArray'] null $P6 $P10 = $P3.'params'() set $I3, $P10 if $I3 == -1 goto __label_3 if $I3 == -2 goto __label_4 goto __label_1 __label_3: # case new $P11, [ 'Winxed'; 'Compiler'; 'CollectValues' ] $P11.'CollectValues'($P1, __ARG_1) set $P7, $P11 if_null $P4, __label_6 iter $P12, $P4 set $P12, 0 __label_5: # for iteration unless $P12 goto __label_6 shift $P6, $P12 getattribute $P14, $P6, 'arg' $P13 = $P7.'add'($P14) push $P5, $P13 goto __label_5 __label_6: # endfor goto __label_2 # break __label_4: # case root_new $P8, ['parrot';'ResizablePMCArray'] if_null $P4, __label_8 iter $P15, $P4 set $P15, 0 __label_7: # for iteration unless $P15 goto __label_8 shift $P6, $P15 getattribute $P16, $P6, 'arg' push $P8, $P16 goto __label_7 __label_8: # endfor $P3.'expand'(__ARG_1, $P1, $P2, __ARG_2, $P8) .return() __label_1: # default elements $I1, $P4 new $P17, [ 'Winxed'; 'Compiler'; 'CollectValues' ] $P17.'CollectValues'($P1, __ARG_1) set $P9, $P17 null $I2 __label_11: # for condition ge $I2, $I1, __label_10 $P18 = $P4[$I2] getattribute $P6, $P18, 'arg' $P10 = $P6.'checkresult'() null $S1 if_null $P10, __label_12 set $S1, $P10 __label_12: $P10 = $P3.'paramtype'($I2) null $S2 if_null $P10, __label_13 set $S2, $P10 __label_13: null $S3 $P10 = $P6.'isnull'() if_null $P10, __label_14 unless $P10 goto __label_14 if_null $S2, __label_16 length $I3, $S2 ne $I3, 1, __label_16 ord $I3, $S2 if $I3 == 73 goto __label_18 if $I3 == 78 goto __label_19 if $I3 == 83 goto __label_20 goto __label_16 __label_18: # case __label_19: # case __label_20: # case $P11 = self.'tempreg'($S2) set $S3, $P11 __ARG_1.'emitnull'($S3) goto __label_17 # break __label_16: # default $P13 = $P9.'add'($P6) set $S3, $P13 __label_17: # switch end goto __label_15 __label_14: # else iseq $I3, $S1, $S2 if $I3 goto __label_24 iseq $I3, $S2, "?" __label_24: if $I3 goto __label_23 iseq $I3, $S2, "p" unless $I3 goto __label_25 iseq $I3, $S1, "S" if $I3 goto __label_26 iseq $I3, $S1, "P" __label_26: __label_25: __label_23: unless $I3 goto __label_21 $P10 = $P6.'emit_get'(__ARG_1) set $S3, $P10 goto __label_22 __label_21: # else ne $S2, "p", __label_27 set $S2, "P" __label_27: # endif $P10 = $P6.'emit_get'(__ARG_1) null $S4 if_null $P10, __label_28 set $S4, $P10 __label_28: if_null $S2, __label_29 length $I3, $S2 ne $I3, 1, __label_29 ord $I3, $S2 if $I3 == 80 goto __label_31 if $I3 == 73 goto __label_32 if $I3 == 78 goto __label_33 if $I3 == 83 goto __label_34 goto __label_29 __label_31: # case if_null $S1, __label_35 length $I4, $S1 ne $I4, 1, __label_35 ord $I4, $S1 if $I4 == 73 goto __label_37 if $I4 == 78 goto __label_38 if $I4 == 83 goto __label_39 goto __label_35 __label_37: # case __label_38: # case __label_39: # case $P10 = self.'tempreg'($S2) set $S3, $P10 __ARG_1.'emitbox'($S3, $S4) goto __label_36 # break __label_35: # default set $S3, $S4 __label_36: # switch end goto __label_30 # break __label_32: # case __label_33: # case __label_34: # case $P11 = self.'tempreg'($S2) set $S3, $P11 __ARG_1.'emitset'($S3, $S4) goto __label_30 # break __label_29: # default set $S3, $S4 __label_30: # switch end __label_22: # endif __label_15: # endif push $P5, $S3 __label_9: # for iteration inc $I2 goto __label_11 __label_10: # for end __label_2: # switch end $P3.'expand'(__ARG_1, $P1, $P2, __ARG_2, $P5) .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'CallBuiltinExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'FinalExpr' ] addparent $P0, $P1 addattribute $P0, 'builtin' addattribute $P0, 'args' .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'gencallbuiltin' :subid('WSubId_108') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 .const 'Sub' SyntaxError = "SyntaxError" .const 'Sub' WSubId_107 = "WSubId_107" $P1 = __ARG_3.'getname'() $P8 = $P1.'getidentifier'() null $S1 if_null $P8, __label_1 set $S1, $P8 __label_1: __ARG_1.'use_builtin'($S1) unless_null __ARG_4, __label_3 null $I1 goto __label_2 __label_3: $P8 = __ARG_4.'numargs'() set $I1, $P8 __label_2: if $I1 goto __label_5 root_new $P8, ['parrot';'ResizablePMCArray'] set $P2, $P8 goto __label_4 __label_5: $P9 = __ARG_4.'getrawargs'() set $P2, $P9 __label_4: getattribute $P3, __ARG_3, 'variants' null $P4 if_null $P3, __label_7 iter $P10, $P3 set $P10, 0 __label_6: # for iteration unless $P10 goto __label_7 shift $P5, $P10 getattribute $P8, $P5, 'nparams' set $I2, $P8 iseq $I3, $I2, $I1 if $I3 goto __label_10 iseq $I3, $I2, -1 __label_10: if $I3 goto __label_9 iseq $I3, $I2, -2 unless $I3 goto __label_11 iseq $I3, $I1, 1 __label_11: __label_9: unless $I3 goto __label_8 set $P4, $P5 __label_8: # endif goto __label_6 __label_7: # endfor unless_null $P4, __label_12 SyntaxError("Wrong arguments for builtin", __ARG_2) __label_12: # endif $P8 = $P4.'isreplaceexpr'() if_null $P8, __label_13 unless $P8 goto __label_13 .tailcall $P4.'replaceexpr'(__ARG_1, __ARG_2, __ARG_4) __label_13: # endif $P8 = $P4.'iscompileevaluable'() if_null $P8, __label_14 unless $P8 goto __label_14 $P9 = WSubId_107($P2) if_null $P9, __label_15 unless $P9 goto __label_15 getattribute $P6, $P4, 'evalfun' new $P8, 'ExceptionHandler' set_label $P8, __label_16 push_eh $P8 getattribute $P11, __ARG_1, 'owner' getattribute $P12, __ARG_1, 'start' $P9 = $P6($P11, $P12, $P2) .return($P9) pop_eh goto __label_17 __label_16: .get_results($P7) finalize $P7 pop_eh $S2 = $P7["message"] concat $S3, "Compile time evaluation of builtin ", $S1 concat $S3, $S3, " failed: '" concat $S3, $S3, $S2 concat $S3, $S3, "'" SyntaxError($S3, __ARG_2) __label_17: __label_15: # endif __label_14: # endif new $P9, [ 'Winxed'; 'Compiler'; 'CallBuiltinExpr' ] $P9.'CallBuiltinExpr'(__ARG_1, __ARG_2, $P4, $P2) set $P8, $P9 .return($P8) .end # gencallbuiltin .namespace [ 'Winxed'; 'Compiler'; 'CallExpr' ] .sub 'CallExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'Expr'(__ARG_2, __ARG_3) setattribute self, 'funref', __ARG_4 $P1 = __ARG_1.'get'() $P2 = $P1.'isop'(")") if $P2 goto __label_1 __ARG_1.'unget'($P1) new $P4, [ 'Winxed'; 'Compiler'; 'ArgumentList' ] $P4.'ArgumentList'(__ARG_2, __ARG_3, __ARG_1, ")") set $P3, $P4 setattribute self, 'args', $P3 __label_1: # endif .end # CallExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'CallExpr' ] getattribute $P3, self, 'start' $P1.'Expr'(__ARG_1, $P3) getattribute $P5, self, 'funref' $P4 = $P5.'clone'(__ARG_1) setattribute $P1, 'funref', $P4 getattribute $P2, self, 'args' if_null $P2, __label_1 $P4 = $P2.'clone'(__ARG_1) setattribute $P1, 'args', $P4 __label_1: # endif .return($P1) .end # clone .sub 'checkresult' :method .return("P") .end # checkresult .sub 'optimize' :method .const 'Sub' WSubId_108 = "WSubId_108" .const 'Sub' InternalError = "InternalError" getattribute $P7, self, 'funref' $P1 = $P7.'optimize'() setattribute self, 'funref', $P1 getattribute $P2, self, 'args' if_null $P2, __label_1 $P2 = $P2.'optimize'() setattribute self, 'args', $P2 __label_1: # endif getattribute $P3, self, 'owner' isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'MemberExpr' ] unless $I1 goto __label_2 $P4 = $P1.'search_nonmember'() getattribute $P5, self, 'start' if_null $P4, __label_5 isa $I1, $P4, [ 'Winxed'; 'Compiler'; 'FunctionStatement' ] if $I1 goto __label_6 isa $I2, $P4, [ 'Winxed'; 'Compiler'; 'FunctionExtern' ] if $I2 goto __label_7 isa $I3, $P4, [ 'Winxed'; 'Compiler'; 'Builtin' ] if $I3 goto __label_8 goto __label_4 __label_5: # case new $P8, [ 'Winxed'; 'Compiler'; 'CallMemberExpr' ] $P8.'CallMemberExpr'(self, $P1, $P2) set $P7, $P8 .return($P7) __label_6: # case $P9 = $P4.'ismulti'() if $P9 goto __label_9 $P10 = $P4.'makesubid'() null $S1 if_null $P10, __label_11 set $S1, $P10 __label_11: self.'usesubid'($S1) new $P8, [ 'Winxed'; 'Compiler'; 'CallSubid' ] $P8.'CallSubid'(self, $P1, $P2, $S1) set $P7, $P8 .return($P7) goto __label_10 __label_9: # else new $P9, [ 'Winxed'; 'Compiler'; 'FunctionRef' ] $P9.'FunctionRef'($P3, $P5, $P4) set $P8, $P9 setattribute self, 'funref', $P8 .return(self) __label_10: # endif goto __label_3 # break __label_7: # case new $P9, [ 'Winxed'; 'Compiler'; 'FunctionRef' ] $P9.'FunctionRef'($P3, $P5, $P4) set $P8, $P9 setattribute self, 'funref', $P8 .return(self) __label_8: # case getattribute $P10, $P1, 'start' .tailcall WSubId_108($P3, $P10, $P4, $P2) goto __label_3 # break __label_4: # default InternalError("unexpected type found in scope", $P5) __label_3: # switch end __label_2: # endif isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'MemberRefExpr' ] unless $I1 goto __label_12 new $P8, [ 'Winxed'; 'Compiler'; 'CallMemberRefExpr' ] $P8.'CallMemberRefExpr'(self, $P1, $P2) set $P7, $P8 .return($P7) __label_12: # endif isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'InlineRef' ] unless $I1 goto __label_13 new $P8, [ 'Winxed'; 'Compiler'; 'CallInlineExpr' ] $P8.'CallInlineExpr'($P3, $P1, $P2) set $P7, $P8 .return($P7) __label_13: # endif $P7 = $P1.'isidentifier'() if_null $P7, __label_14 unless $P7 goto __label_14 $P8 = $P1.'checkIdentifier'() set $S2, $P8 ne $S2, "", __label_15 root_new $P9, ['parrot';'ResizablePMCArray'] assign $P9, 1 $P10 = $P1.'getName'() $P9[0] = $P10 $P6 = self.'scopesearch'($P9, 0) if_null $P6, __label_16 isa $I1, $P6, [ 'Winxed'; 'Compiler'; 'Builtin' ] unless $I1 goto __label_16 getattribute $P7, $P1, 'start' .tailcall WSubId_108($P3, $P7, $P6, $P2) __label_16: # endif __label_15: # endif __label_14: # endif .return(self) .end # optimize .sub 'cantailcall' :method .return(1) .end # cantailcall .sub 'emitcall' :method .param pmc __ARG_1 .const 'Sub' InternalError = "InternalError" getattribute $P1, self, 'funref' null $S1 $P3 = $P1.'isidentifier'() if_null $P3, __label_1 unless $P3 goto __label_1 $P4 = $P1.'checkIdentifier'() set $S1, $P4 ne $S1, "", __label_3 root_new $P3, ['parrot';'ResizablePMCArray'] assign $P3, 1 $P4 = $P1.'getName'() $P3[0] = $P4 $P2 = self.'scopesearch'($P3, 0) if_null $P2, __label_6 isa $I1, $P2, [ 'Winxed'; 'Compiler'; 'FunctionExtern' ] if $I1 goto __label_7 isa $I2, $P2, [ 'Winxed'; 'Compiler'; 'Builtin' ] if $I2 goto __label_8 goto __label_5 __label_6: # case root_new $P3, ['parrot';'ResizablePMCArray'] assign $P3, 3 $P3[0] = "'" $P4 = $P1.'getName'() $P3[1] = $P4 $P3[2] = "'" join $S1, "", $P3 goto __label_4 # break __label_7: # case $P5 = $P2.'emit_get'(__ARG_1, self) set $S1, $P5 goto __label_4 # break __label_8: # case InternalError("Builtin unexpected here", self) __label_5: # default root_new $P6, ['parrot';'ResizablePMCArray'] assign $P6, 3 $P6[0] = "'" $P7 = $P1.'getName'() $P6[1] = $P7 $P6[2] = "'" join $S1, "", $P6 __label_4: # switch end __label_3: # endif goto __label_2 __label_1: # else $P3 = $P1.'emit_get'(__ARG_1) set $S1, $P3 __label_2: # endif .return($S1) .end # emitcall .sub 'prepareargs' :method .param pmc __ARG_1 getattribute $P1, self, 'args' if_null $P1, __label_1 $P1.'getargvalues'(__ARG_1) __label_1: # endif .end # prepareargs .sub 'emitargs' :method .param pmc __ARG_1 __ARG_1.'print'("(") getattribute $P1, self, 'args' if_null $P1, __label_1 $P1.'emitargs'(__ARG_1) __label_1: # endif __ARG_1.'say'(")") .end # emitargs .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 $P1 = self.'emitcall'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: self.'prepareargs'(__ARG_1) self.'annotate'(__ARG_1) __ARG_1.'print'(" ") ne __ARG_2, ".tailcall", __label_2 __ARG_1.'print'(".tailcall ") goto __label_3 __label_2: # else __ARG_1.'print'(__ARG_2, " = ") __label_3: # endif __ARG_1.'print'($S1) self.'emitargs'(__ARG_1) .end # emit .sub 'emit_void' :method .param pmc __ARG_1 $P1 = self.'emitcall'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: self.'prepareargs'(__ARG_1) self.'annotate'(__ARG_1) __ARG_1.'print'(" ") __ARG_1.'print'($S1) self.'emitargs'(__ARG_1) .end # emit_void .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'CallExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Expr' ] addparent $P0, $P1 addattribute $P0, 'funref' addattribute $P0, 'args' .end .namespace [ 'Winxed'; 'Compiler'; 'CallSubid' ] .sub 'CallSubid' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param string __ARG_4 getattribute $P1, __ARG_1, 'owner' getattribute $P2, __ARG_1, 'start' self.'Expr'($P1, $P2) setattribute self, 'funref', __ARG_2 setattribute self, 'args', __ARG_3 box $P1, __ARG_4 setattribute self, 'subid', $P1 .end # CallSubid .sub 'emitcall' :method .param pmc __ARG_1 getattribute $P1, self, 'subid' .return($P1) .end # emitcall .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'CallSubid' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'CallExpr' ] addparent $P0, $P1 addattribute $P0, 'subid' .end .namespace [ 'Winxed'; 'Compiler'; 'CallMemberExpr' ] .sub 'CallMemberExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 getattribute $P1, __ARG_1, 'owner' getattribute $P2, __ARG_1, 'start' self.'Expr'($P1, $P2) setattribute self, 'funref', __ARG_2 setattribute self, 'args', __ARG_3 .end # CallMemberExpr .sub 'emitcall' :method .param pmc __ARG_1 getattribute $P1, self, 'funref' getattribute $P2, $P1, 'left' __label_2: # while isa $I1, $P2, [ 'Winxed'; 'Compiler'; 'MemberExpr' ] unless $I1 goto __label_1 getattribute $P2, $P2, 'left' goto __label_2 __label_1: # endwhile $P6 = $P2.'isidentifier'() if_null $P6, __label_3 unless $P6 goto __label_3 $P7 = $P2.'checkIdentifier'() null $S1 if_null $P7, __label_4 set $S1, $P7 __label_4: isnull $I1, $S1 if $I1 goto __label_6 iseq $I1, $S1, "" __label_6: unless $I1 goto __label_5 new $P3, ['ResizableStringArray'] $P1.'buildkey'($P3) $P6 = $P3.'pop'() null $S2 if_null $P6, __label_7 set $S2, $P6 __label_7: $P4 = self.'tempreg'("P") self.'annotate'(__ARG_1) set $P5, $P3 null $S3 elements $I1, $P5 unless $I1 goto __label_8 join $S5, "'; '", $P5 concat $S6, "[ '", $S5 concat $S6, $S6, "' ]" set $S3, $S6 __label_8: # endif set $S4, $S3 __ARG_1.'emitget_hll_global'($P4, $S2, $S4) .return($P4) __label_5: # endif __label_3: # endif root_new $P6, ['parrot';'ResizablePMCArray'] assign $P6, 4 $P7 = $P1.'emit_left_get'(__ARG_1) $P6[0] = $P7 $P6[1] = ".'" $P8 = $P1.'get_member'() $P6[2] = $P8 $P6[3] = "'" join $S5, "", $P6 .return($S5) .end # emitcall .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'CallMemberExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'CallExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'CallMemberRefExpr' ] .sub 'CallMemberRefExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 getattribute $P1, __ARG_1, 'owner' getattribute $P2, __ARG_1, 'start' self.'Expr'($P1, $P2) setattribute self, 'funref', __ARG_2 setattribute self, 'args', __ARG_3 .end # CallMemberRefExpr .sub 'emitcall' :method .param pmc __ARG_1 .const 'Sub' SyntaxError = "SyntaxError" getattribute $P1, self, 'funref' getattribute $P2, $P1, 'right' $P3 = $P2.'checkresult'() set $S3, $P3 eq $S3, "P", __label_1 set $S4, $P3 eq $S4, "S", __label_1 SyntaxError("Invalid expression type in '.*'", $P1) __label_1: # endif $P4 = $P1.'emit_left_get'(__ARG_1) null $S1 if_null $P4, __label_2 set $S1, $P4 __label_2: $P4 = $P2.'emit_get'(__ARG_1) null $S2 if_null $P4, __label_3 set $S2, $P4 __label_3: concat $S3, $S1, "." concat $S3, $S3, $S2 .return($S3) .end # emitcall .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'CallMemberRefExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'CallExpr' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'MemberExprBase' ] .sub 'MemberExprBase' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'Expr'(__ARG_1, __ARG_2) setattribute self, 'left', __ARG_3 .end # MemberExprBase .sub 'emit_left_get' :method .param pmc __ARG_1 getattribute $P1, self, 'left' .tailcall $P1.'emit_getvar'(__ARG_1) .end # emit_left_get .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'MemberExprBase' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Expr' ] addparent $P0, $P1 addattribute $P0, 'left' .end .namespace [ 'Winxed'; 'Compiler'; 'MemberExpr' ] .sub 'MemberExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'MemberExprBase'(__ARG_1, __ARG_2, __ARG_3) setattribute self, 'right', __ARG_4 .end # MemberExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'MemberExpr' ] getattribute $P2, self, 'start' getattribute $P4, self, 'left' $P3 = $P4.'clone'(__ARG_1) $P1.'MemberExprBase'(__ARG_1, $P2, $P3) getattribute $P3, self, 'right' setattribute $P1, 'right', $P3 .return($P1) .end # clone .sub 'checkresult' :method .return("P") .end # checkresult .sub 'search_nonmember' :method null $P1 getattribute $P2, self, 'left' __label_2: # while isa $I1, $P2, [ 'Winxed'; 'Compiler'; 'MemberExpr' ] unless $I1 goto __label_1 getattribute $P2, $P2, 'left' goto __label_2 __label_1: # endwhile isa $I1, $P2, [ 'Winxed'; 'Compiler'; 'IdentifierExpr' ] unless $I1 goto __label_3 $P3 = $P2.'checkIdentifier'() isnull $I1, $P3 if $I1 goto __label_5 set $S1, $P3 iseq $I1, $S1, "" __label_5: unless $I1 goto __label_4 root_new $P4, ['parrot';'ResizablePMCArray'] self.'buildkey'($P4) .tailcall self.'scopesearch'($P4, 0) __label_4: # endif __label_3: # endif null $P5 .return($P5) .end # search_nonmember .sub 'optimize' :method getattribute $P4, self, 'left' $P3 = $P4.'optimize'() setattribute self, 'left', $P3 $P1 = self.'search_nonmember'() if_null $P1, __label_3 isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'FunctionStatement' ] if $I1 goto __label_4 isa $I2, $P1, [ 'Winxed'; 'Compiler'; 'FunctionExtern' ] if $I2 goto __label_5 isa $I3, $P1, [ 'Winxed'; 'Compiler'; 'VarData' ] box $P2, $I3 unless $P2 goto __label_7 $P2 = $P1.'isconst'() __label_7: set $I4, $P2 if $I4 goto __label_6 goto __label_2 __label_3: # case goto __label_1 # break __label_4: # case $P3 = $P1.'ismulti'() if_null $P3, __label_8 unless $P3 goto __label_8 new $P5, [ 'Winxed'; 'Compiler'; 'FunctionRef' ] getattribute $P6, self, 'owner' getattribute $P7, self, 'start' $P5.'FunctionRef'($P6, $P7, $P1) set $P4, $P5 .return($P4) __label_8: # endif goto __label_1 # break __label_5: # case new $P9, [ 'Winxed'; 'Compiler'; 'FunctionRef' ] getattribute $P10, self, 'owner' getattribute $P11, self, 'start' $P9.'FunctionRef'($P10, $P11, $P1) set $P8, $P9 .return($P8) __label_6: # case .tailcall $P1.'getvalue'() __label_2: # default __label_1: # switch end .return(self) .end # optimize .sub 'buildkey' :method .param pmc __ARG_1 getattribute $P1, self, 'left' isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'IdentifierExpr' ] unless $I1 goto __label_1 $P2 = $P1.'getName'() push __ARG_1, $P2 goto __label_2 __label_1: # else $P1.'buildkey'(__ARG_1) __label_2: # endif getattribute $P3, self, 'right' $P2 = $P3.'getidentifier'() push __ARG_1, $P2 .end # buildkey .sub 'get_member' :method getattribute $P1, self, 'right' .return($P1) .end # get_member .sub '__emit_get_left' :method .param pmc __ARG_1 .const 'Sub' SyntaxError = "SyntaxError" getattribute $P1, self, 'left' $P2 = $P1.'checkresult'() set $S1, $P2 eq $S1, "P", __label_1 SyntaxError("non-var at left of '.'", self) __label_1: # endif .tailcall $P1.'emit_get_nonull'(__ARG_1) .end # __emit_get_left .sub 'emit_get' :method .param pmc __ARG_1 $P1 = self.'tempreg'("P") null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: self.'emit'(__ARG_1, $S1) .return($S1) .end # emit_get .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 $P1 = self.'__emit_get_left'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: getattribute $P2, self, 'right' $P1 = $P2.'getidentifier'() null $S2 if_null $P1, __label_2 set $S2, $P1 __label_2: self.'annotate'(__ARG_1) __ARG_1.'say'(" ", "getattribute ", __ARG_2, ", ", $S1, ", '", $S2, "'") .end # emit .sub 'emit_assign_get' :method .param pmc __ARG_1 .param pmc __ARG_2 $P1 = self.'__emit_get_left'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: $P1 = self.'tempreg'("P") null $S2 if_null $P1, __label_2 set $S2, $P1 __label_2: $P1 = __ARG_2.'isnull'() if_null $P1, __label_3 unless $P1 goto __label_3 __ARG_1.'emitnull'($S2) goto __label_4 __label_3: # else $P2 = __ARG_2.'emit_get'(__ARG_1) null $S3 if_null $P2, __label_5 set $S3, $P2 __label_5: $P1 = __ARG_2.'checkresult'() set $S5, $P1 eq $S5, "P", __label_6 __ARG_1.'emitbox'($S2, $S3) goto __label_7 __label_6: # else set $S2, $S3 __label_7: # endif __label_4: # endif getattribute $P2, self, 'right' $P1 = $P2.'getidentifier'() null $S4 if_null $P1, __label_8 set $S4, $P1 __label_8: self.'annotate'(__ARG_1) __ARG_1.'say'(" ", "setattribute ", $S1, ", '", $S4, "', ", $S2) .return($S2) .end # emit_assign_get .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'MemberExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'MemberExprBase' ] addparent $P0, $P1 addattribute $P0, 'right' .end .namespace [ 'Winxed'; 'Compiler'; 'MemberRefExpr' ] .sub 'MemberRefExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'MemberExprBase'(__ARG_1, __ARG_2, __ARG_3) setattribute self, 'right', __ARG_4 .end # MemberRefExpr .sub 'clone' :method .param pmc __ARG_1 new $P2, [ 'Winxed'; 'Compiler'; 'MemberRefExpr' ] getattribute $P3, self, 'start' getattribute $P5, self, 'left' $P4 = $P5.'clone'(__ARG_1) getattribute $P7, self, 'right' $P6 = $P7.'clone'(__ARG_1) $P2.'MemberRefExpr'(__ARG_1, $P3, $P4, $P6) set $P1, $P2 .return($P1) .end # clone .sub 'checkresult' :method .return("P") .end # checkresult .sub 'optimize' :method getattribute $P3, self, 'left' $P2 = $P3.'optimize'() setattribute self, 'left', $P2 getattribute $P3, self, 'right' $P2 = $P3.'optimize'() setattribute self, 'right', $P2 .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 .const 'Sub' Expected = "Expected" getattribute $P1, self, 'left' getattribute $P2, self, 'right' $P3 = $P2.'checkresult'() set $S3, $P3 eq $S3, "S", __label_1 Expected("string expression", $P2) __label_1: # endif $P3 = $P1.'emit_get_nonull'(__ARG_1) null $S1 if_null $P3, __label_2 set $S1, $P3 __label_2: $P3 = $P2.'emit_get'(__ARG_1) null $S2 if_null $P3, __label_3 set $S2, $P3 __label_3: self.'annotate'(__ARG_1) __ARG_1.'say'(" ", "getattribute ", __ARG_2, ", ", $S1, ", ", $S2) .end # emit .sub 'emit_assign_get' :method .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' Expected = "Expected" getattribute $P1, self, 'left' getattribute $P2, self, 'right' $P3 = $P2.'checkresult'() set $S5, $P3 eq $S5, "S", __label_1 Expected("string expression", $P2) __label_1: # endif $P3 = $P1.'emit_get_nonull'(__ARG_1) null $S1 if_null $P3, __label_2 set $S1, $P3 __label_2: $P3 = $P2.'emit_get'(__ARG_1) null $S2 if_null $P3, __label_3 set $S2, $P3 __label_3: null $S3 $P3 = __ARG_2.'isnull'() set $I1, $P3 if $I1 goto __label_6 $P4 = __ARG_2.'checkresult'() set $S5, $P4 eq $S5, "P", __label_7 goto __label_5 __label_6: # case $P5 = self.'tempreg'("P") set $S3, $P5 self.'annotate'(__ARG_1) __ARG_1.'emitnull'($S3) goto __label_4 # break __label_7: # case $P6 = __ARG_2.'emit_get'(__ARG_1) set $S3, $P6 goto __label_4 # break __label_5: # default $P7 = self.'tempreg'("P") set $S3, $P7 $P8 = __ARG_2.'emit_get'(__ARG_1) null $S4 if_null $P8, __label_8 set $S4, $P8 __label_8: self.'annotate'(__ARG_1) __ARG_1.'emitbox'($S3, $S4) __label_4: # switch end self.'annotate'(__ARG_1) __ARG_1.'say'(" ", "setattribute ", $S1, ", ", $S2, ", ", $S3) .return($S3) .end # emit_assign_get .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'MemberRefExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'MemberExprBase' ] addparent $P0, $P1 addattribute $P0, 'right' .end .namespace [ 'Winxed'; 'Compiler'; 'StringIndexExpr' ] .sub 'StringIndexExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'Expr'(__ARG_1, __ARG_2) setattribute self, 'left', __ARG_3 setattribute self, 'arg', __ARG_4 .end # StringIndexExpr .sub 'checkresult' :method .return("S") .end # checkresult .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 .const 'Sub' sformat = "sformat" getattribute $P2, self, 'left' $P1 = $P2.'emit_get'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: getattribute $P2, self, 'arg' $P1 = $P2.'emit_getint'(__ARG_1) null $S2 if_null $P1, __label_2 set $S2, $P1 __label_2: self.'annotate'(__ARG_1) $P1 = sformat(" substr %0, %1, %2, 1", __ARG_2, $S1, $S2) __ARG_1.'say'($P1) .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'StringIndexExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Expr' ] addparent $P0, $P1 addattribute $P0, 'left' addattribute $P0, 'arg' .end .namespace [ 'Winxed'; 'Compiler'; 'IndexExpr' ] .sub 'IndexExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'Expr'(__ARG_2, __ARG_3) setattribute self, 'left', __ARG_4 new $P3, [ 'Winxed'; 'Compiler'; 'SimpleArgList' ] $P3.'SimpleArgList'(__ARG_1, __ARG_2, "]") set $P2, $P3 setattribute self, 'args', $P2 .end # IndexExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'IndexExpr' ] getattribute $P2, self, 'start' $P1.'Expr'(__ARG_1, $P2) getattribute $P4, self, 'left' $P3 = $P4.'clone'(__ARG_1) setattribute $P1, 'left', $P3 getattribute $P4, self, 'args' $P3 = $P4.'clone'(__ARG_1) setattribute $P1, 'args', $P3 .return($P1) .end # clone .sub 'checkresult' :method .return("P") .end # checkresult .sub 'optimize' :method .const 'Sub' SyntaxError = "SyntaxError" .const 'Sub' bindmethod0 = "bindmethod0" getattribute $P4, self, 'left' $P1 = $P4.'optimize'() setattribute self, 'left', $P1 getattribute $P2, self, 'args' $P2.'optimizeargs'() $P4 = $P1.'checkresult'() set $S2, $P4 if_null $S2, __label_1 length $I2, $S2 ne $I2, 1, __label_1 ord $I2, $S2 if $I2 == 83 goto __label_3 if $I2 == 80 goto __label_4 goto __label_1 __label_3: # case $P5 = $P2.'numargs'() set $I3, $P5 eq $I3, 1, __label_5 SyntaxError("Bad string index", self) __label_5: # endif $P3 = $P2.'getarg'(0) $P6 = $P1.'isstringliteral'() unless $P6 goto __label_6 $P7 = $P3.'isintegerliteral'() unless $P7 goto __label_6 $P8 = $P3.'getIntegerValue'() set $I1, $P8 $P4 = $P1.'getStringValue'() null $S1 if_null $P4, __label_7 set $S1, $P4 __label_7: getattribute $P4, self, 'owner' getattribute $P5, self, 'start' substr $S2, $S1, $I1, 1 .tailcall bindmethod0($P4, $P5, $S2) __label_6: # endif new $P5, [ 'Winxed'; 'Compiler'; 'StringIndexExpr' ] getattribute $P6, self, 'owner' getattribute $P7, self, 'start' $P5.'StringIndexExpr'($P6, $P7, $P1, $P3) set $P4, $P5 .return($P4) __label_4: # case goto __label_2 # break __label_1: # default SyntaxError("Type not valid for indexing", $P1) __label_2: # switch end .return(self) .end # optimize .sub 'emit_prep' :method .param pmc __ARG_1 .const 'Sub' InternalError = "InternalError" getattribute $P2, self, 'regleft' isnull $I1, $P2 not $I1 if $I1 goto __label_2 getattribute $P3, self, 'argregs' isnull $I1, $P3 not $I1 __label_2: unless $I1 goto __label_1 getattribute $P4, self, 'start' InternalError("wrong call to IndexExpr.emit_args", $P4) __label_1: # endif getattribute $P1, self, 'left' $P4 = $P1.'isidentifier'() if_null $P4, __label_4 unless $P4 goto __label_4 $P3 = $P1.'getIdentifier'() goto __label_3 __label_4: $P5 = $P1.'emit_get'(__ARG_1) set $P3, $P5 __label_3: setattribute self, 'regleft', $P3 getattribute $P4, self, 'args' $P3 = $P4.'getargvalues'(__ARG_1) setattribute self, 'argregs', $P3 .end # emit_prep .sub 'emit_aux' :method .param pmc __ARG_1 .const 'Sub' InternalError = "InternalError" getattribute $P1, self, 'regleft' getattribute $P2, self, 'argregs' isnull $I1, $P1 if $I1 goto __label_2 isnull $I1, $P2 __label_2: unless $I1 goto __label_1 getattribute $P3, self, 'start' InternalError("wrong call to IndexExpr.emit_aux", $P3) __label_1: # endif getattribute $P3, self, 'regleft' __ARG_1.'print'($P3, "[") join $S1, "; ", $P2 __ARG_1.'print'($S1) __ARG_1.'print'("]") .end # emit_aux .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 self.'emit_prep'(__ARG_1) self.'annotate'(__ARG_1) __ARG_1.'print'(" ", __ARG_2, " = ") self.'emit_aux'(__ARG_1) __ARG_1.'say'("") .end # emit .sub 'emit_getint' :method .param pmc __ARG_1 $P1 = self.'tempreg'("I") null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: self.'emit'(__ARG_1, $S1) .return($S1) .end # emit_getint .sub 'emit_assign_get' :method .param pmc __ARG_1 .param pmc __ARG_2 self.'emit_prep'(__ARG_1) null $S1 $P1 = __ARG_2.'isnull'() if_null $P1, __label_1 unless $P1 goto __label_1 $P2 = self.'tempreg'("P") set $S1, $P2 __ARG_1.'emitnull'($S1) goto __label_2 __label_1: # else $P1 = __ARG_2.'emit_get'(__ARG_1) set $S1, $P1 __label_2: # endif self.'annotate'(__ARG_1) __ARG_1.'print'(" ") self.'emit_aux'(__ARG_1) __ARG_1.'say'(" = ", $S1) .return($S1) .end # emit_assign_get .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'IndexExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Expr' ] addparent $P0, $P1 addattribute $P0, 'left' addattribute $P0, 'regleft' addattribute $P0, 'args' addattribute $P0, 'argregs' .end .namespace [ 'Winxed'; 'Compiler'; 'ArrayExpr' ] .sub 'ArrayExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' parseListOrEmpty = "parseListOrEmpty" .const 'Sub' WSubId_75 = "WSubId_75" self.'Expr'(__ARG_2, __ARG_3) $P2 = parseListOrEmpty(__ARG_1, __ARG_2, WSubId_75, "]") setattribute self, 'values', $P2 .end # ArrayExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'ArrayExpr' ] getattribute $P8, self, 'start' $P1.'Expr'(__ARG_1, $P8) getattribute $P8, self, 'values' if_null $P8, __label_1 getattribute $P2, self, 'values' set $P3, __ARG_1 .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" set $P4, $P2 root_new $P5, ['parrot';'ResizablePMCArray'] $P11 = bindmethod("clone") $P6 = bindlast($P11, $P3) if_null $P4, __label_3 iter $P12, $P4 set $P12, 0 __label_2: # for iteration unless $P12 goto __label_3 shift $P7, $P12 $P13 = $P6($P7) push $P5, $P13 goto __label_2 __label_3: # endfor set $P10, $P5 set $P8, $P10 setattribute $P1, 'values', $P8 __label_1: # endif .return($P1) .end # clone .sub 'checkresult' :method .return("P") .end # checkresult .sub 'optimize' :method getattribute $P1, self, 'values' if_null $P1, __label_2 elements $I1, $P1 goto __label_1 __label_2: null $I1 __label_1: null $I2 __label_5: # for condition ge $I2, $I1, __label_4 $P3 = $P1[$I2] $P2 = $P3.'optimize'() $P1[$I2] = $P2 __label_3: # for iteration inc $I2 goto __label_5 __label_4: # for end .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 $P1 = self.'emit_get'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: __ARG_1.'emitset'(__ARG_2, $S1) .end # emit .sub 'emit_void' :method .param pmc __ARG_1 self.'emit_init'(__ARG_1, "") .end # emit_void .sub 'emit_get' :method .param pmc __ARG_1 $P1 = self.'tempreg'("P") null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: self.'emit_init'(__ARG_1, $S1) .return($S1) .end # emit_get .sub 'emit_init' :method .param pmc __ARG_1 .param string __ARG_2 .const 'Sub' sformat = "sformat" self.'annotate'(__ARG_1) getattribute $P1, self, 'values' unless_null $P1, __label_2 null $I1 goto __label_1 __label_2: elements $I1, $P1 __label_1: eq __ARG_2, "", __label_3 __ARG_1.'say'(" ", "root_new ", __ARG_2, ", ['parrot';'ResizablePMCArray']") le $I1, 0, __label_4 __ARG_1.'emitassign'(__ARG_2, $I1) __label_4: # endif __label_3: # endif new $P4, [ 'Winxed'; 'Compiler'; 'CollectValues' ] getattribute $P5, self, 'owner' $P4.'CollectValues'($P5, __ARG_1) set $P2, $P4 null $I2 if_null $P1, __label_6 iter $P6, $P1 set $P6, 0 __label_5: # for iteration unless $P6 goto __label_6 shift $P3, $P6 $P4 = $P2.'add'($P3) null $S1 if_null $P4, __label_7 set $S1, $P4 __label_7: eq __ARG_2, "", __label_8 self.'annotate'(__ARG_1) $P4 = sformat(" %0[%1] = %2", __ARG_2, $I2, $S1) __ARG_1.'say'($P4) inc $I2 __label_8: # endif goto __label_5 __label_6: # endfor .end # emit_init .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ArrayExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Expr' ] addparent $P0, $P1 addattribute $P0, 'values' .end .namespace [ 'Winxed'; 'Compiler'; 'HashExpr' ] .sub 'HashExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' WSubId_75 = "WSubId_75" .const 'Sub' ExpectOp = "ExpectOp" .const 'Sub' Expected = "Expected" self.'Expr'(__ARG_2, __ARG_3) $P1 = __ARG_1.'get'() root_new $P2, ['parrot';'ResizablePMCArray'] root_new $P3, ['parrot';'ResizablePMCArray'] $P6 = $P1.'isop'("}") if $P6 goto __label_1 __ARG_1.'unget'($P1) __label_2: # do $P4 = WSubId_75(__ARG_1, __ARG_2) ExpectOp(":", __ARG_1) $P5 = WSubId_75(__ARG_1, __ARG_2) push $P2, $P4 push $P3, $P5 __label_4: # continue $P1 = __ARG_1.'get'() $P6 = $P1.'isop'(",") if_null $P6, __label_3 if $P6 goto __label_2 __label_3: # enddo $P6 = $P1.'isop'("}") if $P6 goto __label_5 Expected("',' or '}'", $P1) __label_5: # endif __label_1: # endif setattribute self, 'keys', $P2 setattribute self, 'values', $P3 .end # HashExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'HashExpr' ] getattribute $P14, self, 'start' $P1.'Expr'(__ARG_1, $P14) getattribute $P2, self, 'keys' set $P3, __ARG_1 .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" set $P4, $P2 root_new $P5, ['parrot';'ResizablePMCArray'] $P16 = bindmethod("clone") $P6 = bindlast($P16, $P3) if_null $P4, __label_2 iter $P17, $P4 set $P17, 0 __label_1: # for iteration unless $P17 goto __label_2 shift $P7, $P17 $P18 = $P6($P7) push $P5, $P18 goto __label_1 __label_2: # endfor set $P15, $P5 set $P14, $P15 setattribute $P1, 'keys', $P14 getattribute $P8, self, 'values' set $P9, __ARG_1 .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" set $P10, $P8 root_new $P11, ['parrot';'ResizablePMCArray'] $P16 = bindmethod("clone") $P12 = bindlast($P16, $P9) if_null $P10, __label_4 iter $P20, $P10 set $P20, 0 __label_3: # for iteration unless $P20 goto __label_4 shift $P13, $P20 $P18 = $P12($P13) push $P11, $P18 goto __label_3 __label_4: # endfor set $P19, $P11 set $P14, $P19 setattribute $P1, 'values', $P14 .return($P1) .end # clone .sub 'checkresult' :method .return("P") .end # checkresult .sub 'optimize' :method getattribute $P1, self, 'keys' if_null $P1, __label_2 elements $I1, $P1 goto __label_1 __label_2: null $I1 __label_1: null $I2 __label_5: # for condition ge $I2, $I1, __label_4 $P4 = $P1[$I2] $P3 = $P4.'optimize'() $P1[$I2] = $P3 __label_3: # for iteration inc $I2 goto __label_5 __label_4: # for end getattribute $P2, self, 'values' if_null $P2, __label_7 elements $I3, $P2 goto __label_6 __label_7: null $I3 __label_6: null $I4 __label_10: # for condition ge $I4, $I3, __label_9 $P4 = $P2[$I4] $P3 = $P4.'optimize'() $P2[$I4] = $P3 __label_8: # for iteration inc $I4 goto __label_10 __label_9: # for end .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 self.'annotate'(__ARG_1) eq __ARG_2, "", __label_1 __ARG_1.'say'(" ", "root_new ", __ARG_2, ", ['parrot';'Hash']") __label_1: # endif getattribute $P1, self, 'keys' getattribute $P2, self, 'values' new $P5, [ 'Winxed'; 'Compiler'; 'CollectValues' ] getattribute $P6, self, 'owner' $P5.'CollectValues'($P6, __ARG_1) set $P3, $P5 set $I1, $P1 null $I2 __label_4: # for condition ge $I2, $I1, __label_3 $P4 = $P1[$I2] null $S1 $P5 = $P4.'isidentifier'() unless $P5 goto __label_5 $P6 = $P4.'checkIdentifier'() set $S4, $P6 ne $S4, "", __label_5 $P7 = $P4.'getName'() null $S2 if_null $P7, __label_7 set $S2, $P7 __label_7: $P5 = self.'tempreg'("P") set $S1, $P5 __ARG_1.'emitget_hll_global'($S1, $S2) goto __label_6 __label_5: # else $P5 = $P4.'emit_get'(__ARG_1) set $S1, $P5 __label_6: # endif $P6 = $P2[$I2] $P5 = $P3.'add'($P6) null $S3 if_null $P5, __label_8 set $S3, $P5 __label_8: eq __ARG_2, "", __label_9 __ARG_1.'say'(" ", __ARG_2, "[", $S1, "] = ", $S3) __label_9: # endif __label_2: # for iteration inc $I2 goto __label_4 __label_3: # for end .end # emit .sub 'emit_void' :method .param pmc __ARG_1 self.'emit'(__ARG_1, "") .end # emit_void .sub 'emit_get' :method .param pmc __ARG_1 $P1 = self.'tempreg'("P") null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: self.'emit'(__ARG_1, $S1) .return($S1) .end # emit_get .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'HashExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Expr' ] addparent $P0, $P1 addattribute $P0, 'keys' addattribute $P0, 'values' .end .namespace [ 'Winxed'; 'Compiler'; 'NewBaseExpr' ] .sub 'checkresult' :method .return("P") .end # checkresult .sub 'parseinitializer' :method .param pmc __ARG_1 new $P3, [ 'Winxed'; 'Compiler'; 'ArgumentList' ] getattribute $P4, self, 'owner' getattribute $P5, self, 'start' $P3.'ArgumentList'($P4, $P5, __ARG_1, ")") set $P2, $P3 setattribute self, 'initializer', $P2 .end # parseinitializer .sub 'numargs' :method getattribute $P1, self, 'initializer' unless_null $P1, __label_2 set $I1, -1 goto __label_1 __label_2: $I1 = $P1.'numargs'() __label_1: .return($I1) .end # numargs .sub 'optimize_initializer' :method getattribute $P1, self, 'initializer' if_null $P1, __label_1 $P3 = $P1.'optimize'() setattribute self, 'initializer', $P3 __label_1: # endif .end # optimize_initializer .sub 'optimize' :method self.'optimize_initializer'() .return(self) .end # optimize .sub 'emit_constructor' :method .param pmc __ARG_1 .param string __ARG_2 .param string __ARG_3 getattribute $P1, self, 'initializer' if_null $P1, __label_1 $P1.'getargvalues'(__ARG_1) __label_1: # endif __ARG_1.'print'(" ", __ARG_2, ".'", __ARG_3, "'(") if_null $P1, __label_2 $P1.'emitargs'(__ARG_1) __label_2: # endif __ARG_1.'say'(")") .end # emit_constructor .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'NewBaseExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Expr' ] addparent $P0, $P1 addattribute $P0, 'initializer' .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'warn_class_unknown' :subid('WSubId_109') .param pmc __ARG_1 .param string __ARG_2 .param pmc __ARG_3 concat $S1, "class ", __ARG_2 concat $S1, $S1, " not found at compile time" __ARG_1.'warn'($S1, __ARG_3) .end # warn_class_unknown .namespace [ 'Winxed'; 'Compiler'; 'NewExpr' ] .sub 'NewExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 .const 'Sub' SyntaxError = "SyntaxError" self.'Expr'(__ARG_2, __ARG_3) $P2 = __ARG_4.'isstring'() if $P2 goto __label_2 $P2 = __ARG_4.'isidentifier'() __label_2: if $P2 goto __label_1 SyntaxError("Unimplemented", __ARG_4) __label_1: # endif setattribute self, 'value', __ARG_4 $P1 = __ARG_1.'get'() $P2 = $P1.'isop'("(") if_null $P2, __label_3 unless $P2 goto __label_3 self.'parseinitializer'(__ARG_1) goto __label_4 __label_3: # else __ARG_1.'unget'($P1) __label_4: # endif .end # NewExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'NewExpr' ] getattribute $P2, self, 'start' $P1.'Expr'(__ARG_1, $P2) getattribute $P3, self, 'value' setattribute $P1, 'value', $P3 getattribute $P2, self, 'initializer' if_null $P2, __label_1 getattribute $P5, self, 'initializer' $P4 = $P5.'clone'(__ARG_1) setattribute $P1, 'initializer', $P4 __label_1: # endif .return($P1) .end # clone .sub 'optimize' :method .const 'Sub' SyntaxError = "SyntaxError" getattribute $P1, self, 'value' $P3 = $P1.'isidentifier'() if_null $P3, __label_1 unless $P3 goto __label_1 getattribute $P4, self, 'owner' $P2 = $P4.'getvar'($P1) if_null $P2, __label_2 $P3 = $P2.'isconst'() unless $P3 goto __label_2 $P1 = $P2.'getvalue'() isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'StringLiteral' ] if $I1 goto __label_3 SyntaxError("Constant value must evaluate to a string", $P1) __label_3: # endif getattribute $P4, $P1, 'strval' setattribute self, 'value', $P4 __label_2: # endif __label_1: # endif self.'optimize_initializer'() .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 .param int __ARG_3 :optional .const 'Sub' SyntaxError = "SyntaxError" .const 'Sub' WSubId_109 = "WSubId_109" .const 'Sub' InternalError = "InternalError" self.'annotate'(__ARG_1) getattribute $P1, self, 'initializer' getattribute $P2, self, 'value' $P8 = self.'numargs'() set $I1, $P8 $P8 = $P2.'isstring'() if_null $P8, __label_2 unless $P8 goto __label_2 null $I2 goto __label_1 __label_2: $P9 = $P2.'isidentifier'() if_null $P9, __label_4 unless $P9 goto __label_4 set $I2, 1 goto __label_3 __label_4: set $I2, -1 __label_3: __label_1: set $S1, "" set $S2, __ARG_2 null $S3 if $I1 == -1 goto __label_7 if $I1 == 0 goto __label_8 if $I1 == 1 goto __label_9 goto __label_5 __label_7: # case __label_8: # case goto __label_6 # break __label_9: # case ne $I2, 1, __label_10 if __ARG_3 goto __label_12 $P8 = self.'tempreg'("P") set $S2, $P8 __label_12: # endif goto __label_11 __label_10: # else $P3 = $P1.'getfreearg'(0) $P8 = $P3.'emit_get'(__ARG_1) set $S1, $P8 concat $S5, ", ", $S1 set $S1, $S5 __label_11: # endif goto __label_6 # break __label_5: # default eq $I2, 1, __label_13 SyntaxError("Multiple init arguments not allowed here", self) __label_13: # endif if __ARG_3 goto __label_14 $P8 = self.'tempreg'("P") set $S2, $P8 __label_14: # endif __label_6: # switch end ne $S2, "", __label_15 $P8 = self.'tempreg'("P") set $S2, $P8 __label_15: # endif if $I2 == 0 goto __label_18 if $I2 == 1 goto __label_19 goto __label_16 __label_18: # case $P8 = $P2.'rawstring'() null $S4 if_null $P8, __label_20 set $S4, $P8 __label_20: get_class $P4, $S4 unless_null $P4, __label_21 WSubId_109(__ARG_1, $S4, $P2) __label_21: # endif __ARG_1.'say'(" ", "new ", $S2, ", [ ", $P2, " ]", $S1) le $I1, 1, __label_22 __ARG_1.'say'($S2, ".'", $P2, "'()") __label_22: # endif goto __label_17 # break __label_19: # case getattribute $P8, self, 'owner' $P5 = $P8.'getvar'($P2) unless_null $P5, __label_23 getattribute $P9, self, 'owner' $P6 = $P9.'checkclass'($P2) if_null $P6, __label_25 $P7 = $P6.'getpath'() $P7.'emit_new'(__ARG_1, self, $S2, $S1) goto __label_26 __label_25: # else root_new $P8, ['parrot';'ResizablePMCArray'] assign $P8, 1 $P8[0] = $P2 $P5 = self.'scopesearch'($P8, 2) if_null $P5, __label_27 $P8 = $P5.'getclasskey'() __ARG_1.'say'(" ", "new ", $S2, ", ", $P8, $S1) goto __label_28 __label_27: # else $P9 = $P2.'getidentifier'() WSubId_109(__ARG_1, $P9, $P2) __ARG_1.'say'(" ", "new ", $S2, ", ['", $P2, "']", $S1) __label_28: # endif __label_26: # endif set $S3, $P2 goto __label_24 __label_23: # else $P8 = $P5.'getreg'() __ARG_1.'say'(" ", "new ", $S2, ", ", $P8, "", $S1) __label_24: # endif goto __label_17 # break __label_16: # default InternalError("Unexpected type in new") __label_17: # switch end isgt $I3, $I1, 1 if $I3 goto __label_30 isge $I3, $I1, 0 unless $I3 goto __label_31 iseq $I3, $I2, 1 __label_31: __label_30: unless $I3 goto __label_29 self.'emit_constructor'(__ARG_1, $S2, $S3) if __ARG_3 goto __label_32 __ARG_1.'emitset'(__ARG_2, $S2) __label_32: # endif __label_29: # endif .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'NewExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'NewBaseExpr' ] addparent $P0, $P1 addattribute $P0, 'value' .end .namespace [ 'Winxed'; 'Compiler'; 'NewIndexedExpr' ] .sub 'NewIndexedExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'Expr'(__ARG_2, __ARG_3) setattribute self, 'owner', __ARG_2 new $P3, [ 'Winxed'; 'Compiler'; 'ClassSpecifierParrotKey' ] $P3.'ClassSpecifierParrotKey'(__ARG_1, __ARG_2, __ARG_3) set $P1, $P3 setattribute self, 'nskey', $P1 $P2 = __ARG_1.'get'() $P3 = $P2.'isop'("(") if_null $P3, __label_1 unless $P3 goto __label_1 self.'parseinitializer'(__ARG_1) goto __label_2 __label_1: # else __ARG_1.'unget'($P2) __label_2: # endif .end # NewIndexedExpr .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 .const 'Sub' SyntaxError = "SyntaxError" null $S1 $P3 = self.'numargs'() set $I1, $P3 if $I1 == -1 goto __label_3 if $I1 == 0 goto __label_4 if $I1 == 1 goto __label_5 goto __label_1 __label_3: # case __label_4: # case goto __label_2 # break __label_5: # case getattribute $P4, self, 'initializer' $P1 = $P4.'getfreearg'(0) $P5 = $P1.'emit_get'(__ARG_1) set $S1, $P5 goto __label_2 # break __label_1: # default SyntaxError("Multiple init arguments not allowed here", self) __label_2: # switch end getattribute $P2, self, 'nskey' __ARG_1.'print'(" ") $P3 = $P2.'hasHLL'() if_null $P3, __label_6 unless $P3 goto __label_6 __ARG_1.'print'("root_") __label_6: # endif __ARG_1.'print'("new ", __ARG_2, ", ") null $P3 $P2.'emit'(__ARG_1, $P3) if_null $S1, __label_7 __ARG_1.'print'(", ", $S1) __label_7: # endif __ARG_1.'say'() .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'NewIndexedExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'NewBaseExpr' ] addparent $P0, $P1 addattribute $P0, 'nskey' .end .namespace [ 'Winxed'; 'Compiler'; 'NewQualifiedExpr' ] .sub 'NewQualifiedExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'Expr'(__ARG_2, __ARG_3) setattribute self, 'owner', __ARG_2 new $P3, [ 'Winxed'; 'Compiler'; 'ClassSpecifierId' ] $P3.'ClassSpecifierId'(__ARG_1, __ARG_2, __ARG_3) set $P1, $P3 setattribute self, 'nskey', $P1 $P2 = __ARG_1.'get'() $P3 = $P2.'isop'("(") if_null $P3, __label_1 unless $P3 goto __label_1 self.'parseinitializer'(__ARG_1) goto __label_2 __label_1: # else __ARG_1.'unget'($P2) __label_2: # endif .end # NewQualifiedExpr .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 $P2 = self.'numargs'() set $I1, $P2 set $S1, __ARG_2 le $I1, 0, __label_1 $P2 = self.'tempreg'("P") set $S1, $P2 __label_1: # endif getattribute $P1, self, 'nskey' ne $S1, "", __label_2 $P2 = self.'tempreg'("P") set $S1, $P2 __label_2: # endif $P1.'emit_new'(__ARG_1, self, $S1) lt $I1, 0, __label_3 $P2 = $P1.'last'() null $S2 if_null $P2, __label_4 set $S2, $P2 __label_4: self.'emit_constructor'(__ARG_1, $S1, $S2) __ARG_1.'emitset'(__ARG_2, $S1) __label_3: # endif .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'NewQualifiedExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'NewBaseExpr' ] addparent $P0, $P1 addattribute $P0, 'nskey' .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'parseNew' :subid('WSubId_110') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 $P1 = __ARG_1.'get'() $P3 = $P1.'isop'("(") set $I1, $P3 if $I1 goto __label_3 $P4 = $P1.'isop'("[") set $I1, $P4 if $I1 goto __label_4 $P5 = $P1.'isidentifier'() set $I1, $P5 if $I1 goto __label_5 goto __label_2 __label_3: # case new $P7, [ 'Winxed'; 'Compiler'; 'CallExpr' ] new $P9, [ 'Winxed'; 'Compiler'; 'StringLiteral' ] $P9.'StringLiteral'(__ARG_2, __ARG_3) set $P8, $P9 $P7.'CallExpr'(__ARG_1, __ARG_2, __ARG_3, $P8) set $P6, $P7 .return($P6) __label_4: # case new $P11, [ 'Winxed'; 'Compiler'; 'NewIndexedExpr' ] $P11.'NewIndexedExpr'(__ARG_1, __ARG_2, __ARG_3) set $P10, $P11 .return($P10) __label_5: # case $P2 = __ARG_1.'get'() __ARG_1.'unget'($P2) $P12 = $P2.'isop'(".") if_null $P12, __label_6 unless $P12 goto __label_6 new $P14, [ 'Winxed'; 'Compiler'; 'NewQualifiedExpr' ] $P14.'NewQualifiedExpr'(__ARG_1, __ARG_2, $P1) set $P13, $P14 .return($P13) __label_6: # endif __label_2: # default new $P4, [ 'Winxed'; 'Compiler'; 'NewExpr' ] $P4.'NewExpr'(__ARG_1, __ARG_2, __ARG_3, $P1) set $P3, $P4 .return($P3) __label_1: # switch end .end # parseNew .namespace [ 'Winxed'; 'Compiler'; 'OpInstanceOfExpr' ] .sub 'OpInstanceOfExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 .const 'Sub' WSubId_103 = "WSubId_103" self.'Expr'(__ARG_1, __ARG_2) setattribute self, 'lexpr', __ARG_3 $P2 = WSubId_103(__ARG_4, __ARG_1) setattribute self, 'checked', $P2 .end # OpInstanceOfExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpInstanceOfExpr' ] getattribute $P2, self, 'start' $P1.'Expr'(__ARG_1, $P2) getattribute $P4, self, 'lexpr' $P3 = $P4.'clone'(__ARG_1) setattribute $P1, 'lexpr', $P3 getattribute $P4, self, 'checked' $P3 = $P4.'clone'(__ARG_1) setattribute $P1, 'checked', $P3 .return($P1) .end # clone .sub 'optimize' :method getattribute $P3, self, 'lexpr' $P2 = $P3.'optimize'() setattribute self, 'lexpr', $P2 .return(self) .end # optimize .sub 'checkresult' :method .return("I") .end # checkresult .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 .const 'Sub' SyntaxError = "SyntaxError" getattribute $P1, self, 'lexpr' $P3 = $P1.'checkresult'() null $S1 if_null $P3, __label_1 set $S1, $P3 __label_1: eq $S1, "P", __label_2 SyntaxError("Invalid instanceof left operand", $P1) __label_2: # endif getattribute $P2, self, 'checked' $P3 = $P1.'emit_get'(__ARG_1) null $S2 if_null $P3, __label_3 set $S2, $P3 __label_3: self.'annotate'(__ARG_1) __ARG_1.'print'(" isa ", __ARG_2, ", ", $S2, ", ") getattribute $P3, self, 'owner' $P2.'emit'(__ARG_1, $P3) __ARG_1.'say'() .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpInstanceOfExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Expr' ] addparent $P0, $P1 addattribute $P0, 'lexpr' addattribute $P0, 'checked' .end .namespace [ 'Winxed'; 'Compiler'; 'OpConditionalExpr' ] .sub 'OpConditionalExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 .param pmc __ARG_5 self.'Expr'(__ARG_1, __ARG_2) new $P3, [ 'Winxed'; 'Compiler'; 'Condition' ] $P2 = $P3.'set'(__ARG_3) setattribute self, 'condition', $P2 setattribute self, 'etrue', __ARG_4 setattribute self, 'efalse', __ARG_5 .return(self) .end # OpConditionalExpr .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'OpConditionalExpr' ] getattribute $P2, self, 'start' $P1.'Expr'(__ARG_1, $P2) new $P4, [ 'Winxed'; 'Compiler'; 'Condition' ] getattribute $P7, self, 'condition' getattribute $P6, $P7, 'condexpr' $P5 = $P6.'clone'(__ARG_1) $P3 = $P4.'set'($P5) setattribute $P1, 'condition', $P3 getattribute $P4, self, 'etrue' $P3 = $P4.'clone'(__ARG_1) setattribute $P1, 'etrue', $P3 getattribute $P4, self, 'efalse' $P3 = $P4.'clone'(__ARG_1) setattribute $P1, 'efalse', $P3 .return($P1) .end # clone .sub 'optimize' :method getattribute $P3, self, 'condition' $P2 = $P3.'optimize'() setattribute self, 'condition', $P2 getattribute $P2, self, 'condition' $P1 = $P2.'getvalue'() set $I1, $P1 if $I1 == 1 goto __label_3 if $I1 == 2 goto __label_4 goto __label_1 __label_3: # case getattribute $P3, self, 'etrue' .tailcall $P3.'optimize'() __label_4: # case getattribute $P4, self, 'efalse' .tailcall $P4.'optimize'() __label_1: # default getattribute $P7, self, 'etrue' $P6 = $P7.'optimize'() setattribute self, 'etrue', $P6 getattribute $P10, self, 'efalse' $P9 = $P10.'optimize'() setattribute self, 'efalse', $P9 .return(self) __label_2: # switch end .end # optimize .sub 'checkresult' :method getattribute $P1, self, 'etrue' $P2 = $P1.'isnull'() if_null $P2, __label_1 unless $P2 goto __label_1 getattribute $P3, self, 'efalse' .tailcall $P3.'checkresult'() goto __label_2 __label_1: # else .tailcall $P1.'checkresult'() __label_2: # endif .end # checkresult .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 $P4 = self.'genlabel'() null $S1 if_null $P4, __label_1 set $S1, $P4 __label_1: $P4 = self.'genlabel'() null $S2 if_null $P4, __label_2 set $S2, $P4 __label_2: getattribute $P4, self, 'condition' $P4.'emit_else'(__ARG_1, $S2) getattribute $P1, self, 'etrue' $P4 = self.'checkresult'() null $S3 if_null $P4, __label_3 set $S3, $P4 __label_3: $P4 = $P1.'isnull'() if_null $P4, __label_4 unless $P4 goto __label_4 __ARG_1.'emitnull'(__ARG_2) goto __label_5 __label_4: # else $P1.'emit'(__ARG_1, __ARG_2) __label_5: # endif __ARG_1.'emitgoto'($S1) __ARG_1.'emitlabel'($S2) getattribute $P2, self, 'efalse' $P4 = $P2.'isnull'() if_null $P4, __label_6 unless $P4 goto __label_6 __ARG_1.'emitnull'(__ARG_2) goto __label_7 __label_6: # else $P5 = $P2.'checkresult'() null $S4 if_null $P5, __label_8 set $S4, $P5 __label_8: ne $S3, "P", __label_9 eq $S4, "P", __label_9 $P4 = $P2.'emit_get'(__ARG_1) null $S5 if_null $P4, __label_11 set $S5, $P4 __label_11: __ARG_1.'emitbox'(__ARG_2, $S5) goto __label_10 __label_9: # else ne $S4, "P", __label_12 $P3 = $P2.'emit_get'(__ARG_1) __ARG_1.'emitset'(__ARG_2, $P3) goto __label_13 __label_12: # else $P2.'emit'(__ARG_1, __ARG_2) __label_13: # endif __label_10: # endif __label_7: # endif __ARG_1.'emitlabel'($S1) .end # emit .sub 'emit_void' :method .param pmc __ARG_1 $P1 = self.'genlabel'() null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: $P1 = self.'genlabel'() null $S2 if_null $P1, __label_2 set $S2, $P1 __label_2: getattribute $P1, self, 'condition' $P1.'emit_else'(__ARG_1, $S2) getattribute $P1, self, 'etrue' $P1.'emit_void'(__ARG_1) __ARG_1.'emitgoto'($S1) __ARG_1.'emitlabel'($S2) getattribute $P1, self, 'efalse' $P1.'emit_void'(__ARG_1) __ARG_1.'emitlabel'($S1) .end # emit_void .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'OpConditionalExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Expr' ] addparent $P0, $P1 addattribute $P0, 'condition' addattribute $P0, 'etrue' addattribute $P0, 'efalse' .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'getOpCode_2' :subid('WSubId_112') .param pmc __ARG_1 $P1 = __ARG_1.'checkop'() set $S1, $P1 if_null $S1, __label_1 length $I1, $S1 ne $I1, 1, __label_1 ord $I1, $S1 if $I1 == 40 goto __label_3 if $I1 == 91 goto __label_4 if $I1 == 46 goto __label_5 goto __label_1 __label_3: # case .return(1) __label_4: # case .return(2) __label_5: # case .return(3) __label_1: # default .return(0) __label_2: # switch end .end # getOpCode_2 .sub 'getOpCode_4' :subid('WSubId_114') .param pmc __ARG_1 $P1 = __ARG_1.'checkop'() set $S1, $P1 if $S1 == "-" goto __label_3 if $S1 == "!" goto __label_4 if $S1 == "~" goto __label_5 if $S1 == "++" goto __label_6 if $S1 == "--" goto __label_7 goto __label_1 __label_3: # case .return(8) __label_4: # case .return(11) __label_5: # case .return(34) __label_6: # case .return(9) __label_7: # case .return(10) __label_1: # default $P2 = __ARG_1.'iskeyword'("delete") if_null $P2, __label_8 unless $P2 goto __label_8 .return(32) goto __label_9 __label_8: # else $P3 = __ARG_1.'iskeyword'("exists") if_null $P3, __label_10 unless $P3 goto __label_10 .return(33) goto __label_11 __label_10: # else $P4 = __ARG_1.'iskeyword'("defined") if_null $P4, __label_12 unless $P4 goto __label_12 .return(35) goto __label_13 __label_12: # else .return(0) __label_13: # endif __label_11: # endif __label_9: # endif __label_2: # switch end .end # getOpCode_4 .sub 'getOpCode_5' :subid('WSubId_117') .param pmc __ARG_1 $P1 = __ARG_1.'checkop'() set $S1, $P1 if $S1 == "*" goto __label_3 if $S1 == "/" goto __label_4 if $S1 == "%" goto __label_5 if $S1 == "%%" goto __label_6 goto __label_1 __label_3: # case .return(19) __label_4: # case .return(20) __label_5: # case .return(21) __label_6: # case .return(22) __label_1: # default .return(0) __label_2: # switch end .end # getOpCode_5 .sub 'getOpCode_7' :subid('WSubId_120') .param pmc __ARG_1 $P1 = __ARG_1.'checkop'() set $S1, $P1 if $S1 == "<<" goto __label_3 if $S1 == ">>" goto __label_4 if $S1 == ">>>" goto __label_5 goto __label_1 __label_3: # case .return(28) __label_4: # case .return(29) __label_5: # case .return(30) __label_1: # default .return(0) __label_2: # switch end .end # getOpCode_7 .sub 'getOpCode_8' :subid('WSubId_122') .param pmc __ARG_1 $P1 = __ARG_1.'checkop'() set $S1, $P1 if $S1 == "<" goto __label_3 if $S1 == ">" goto __label_4 if $S1 == "<=" goto __label_5 if $S1 == ">=" goto __label_6 goto __label_1 __label_3: # case .return(14) __label_4: # case .return(16) __label_5: # case .return(15) __label_6: # case .return(17) __label_1: # default $P2 = __ARG_1.'iskeyword'("instanceof") if_null $P2, __label_7 unless $P2 goto __label_7 .return(27) goto __label_8 __label_7: # else .return(0) __label_8: # endif __label_2: # switch end .end # getOpCode_8 .sub 'getOpCode_9' :subid('WSubId_124') .param pmc __ARG_1 $P1 = __ARG_1.'checkop'() set $S1, $P1 if $S1 == "==" goto __label_3 if $S1 == "!=" goto __label_4 if $S1 == "===" goto __label_5 if $S1 == "!==" goto __label_6 goto __label_1 __label_3: # case .return(12) __label_4: # case .return(13) __label_5: # case .return(25) __label_6: # case .return(26) __label_1: # default .return(0) __label_2: # switch end .end # getOpCode_9 .sub 'getOpCode_16' :subid('WSubId_133') .param pmc __ARG_1 $P1 = __ARG_1.'checkop'() set $S1, $P1 if $S1 == "=" goto __label_3 if $S1 == "=:" goto __label_4 if $S1 == "+=" goto __label_5 if $S1 == "-=" goto __label_6 if $S1 == "*=" goto __label_7 if $S1 == "/=" goto __label_8 if $S1 == "%=" goto __label_9 goto __label_1 __label_3: # case .return(4) __label_4: # case .return(5) __label_5: # case .return(6) __label_6: # case .return(18) __label_7: # case .return(23) __label_8: # case .return(24) __label_9: # case .return(31) __label_1: # default .return(0) __label_2: # switch end .end # getOpCode_16 .sub 'parseExpr_0' :subid('WSubId_111') .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_75 = "WSubId_75" .const 'Sub' ExpectOp = "ExpectOp" .const 'Sub' integerValue = "integerValue" .const 'Sub' WSubId_110 = "WSubId_110" .const 'Sub' Expected = "Expected" $P1 = __ARG_1.'get'() null $P2 $P3 = $P1.'isop'("(") set $I1, $P3 if $I1 goto __label_3 $P4 = $P1.'isop'("[") set $I1, $P4 if $I1 goto __label_4 $P5 = $P1.'isop'("{") set $I1, $P5 if $I1 goto __label_5 $P6 = $P1.'isstring'() set $I1, $P6 if $I1 goto __label_6 $P7 = $P1.'isint'() set $I1, $P7 if $I1 goto __label_7 $P8 = $P1.'isfloat'() set $I1, $P8 if $I1 goto __label_8 $P9 = $P1.'iskeyword'("new") set $I1, $P9 if $I1 goto __label_9 $P10 = $P1.'iskeyword'("function") set $I1, $P10 if $I1 goto __label_10 $P11 = $P1.'iskeyword'("class") set $I1, $P11 if $I1 goto __label_11 $P12 = $P1.'iskeyword'("namespace") set $I1, $P12 if $I1 goto __label_12 $P13 = $P1.'isidentifier'() set $I1, $P13 if $I1 goto __label_13 goto __label_2 __label_3: # case $P2 = WSubId_75(__ARG_1, __ARG_2) ExpectOp(")", __ARG_1) .return($P2) __label_4: # case new $P15, [ 'Winxed'; 'Compiler'; 'ArrayExpr' ] $P15.'ArrayExpr'(__ARG_1, __ARG_2, $P1) set $P14, $P15 .return($P14) __label_5: # case new $P17, [ 'Winxed'; 'Compiler'; 'HashExpr' ] $P17.'HashExpr'(__ARG_1, __ARG_2, $P1) set $P16, $P17 .return($P16) __label_6: # case new $P19, [ 'Winxed'; 'Compiler'; 'StringLiteral' ] $P19.'StringLiteral'(__ARG_2, $P1) set $P18, $P19 .return($P18) __label_7: # case $P20 = $P1.'getintvalue'() .tailcall integerValue(__ARG_2, $P1, $P20) __label_8: # case new $P22, [ 'Winxed'; 'Compiler'; 'FloatLiteral' ] $P22.'FloatLiteral'(__ARG_2, $P1) set $P21, $P22 .return($P21) __label_9: # case .tailcall WSubId_110(__ARG_1, __ARG_2, $P1) __label_10: # case new $P24, [ 'Winxed'; 'Compiler'; 'FunctionExpr' ] $P24.'FunctionExpr'(__ARG_1, __ARG_2, $P1) set $P23, $P24 .return($P23) __label_11: # case new $P26, [ 'Winxed'; 'Compiler'; 'OpClassExpr' ] $P26.'OpClassExpr'(__ARG_1, __ARG_2, $P1) set $P25, $P26 .return($P25) __label_12: # case new $P28, [ 'Winxed'; 'Compiler'; 'OpNamespaceExpr' ] $P28.'OpNamespaceExpr'(__ARG_1, __ARG_2, $P1) set $P27, $P28 .return($P27) __label_13: # case new $P30, [ 'Winxed'; 'Compiler'; 'IdentifierExpr' ] $P30.'IdentifierExpr'(__ARG_2, $P1) set $P29, $P30 .return($P29) __label_2: # default Expected("expression", $P1) __label_1: # switch end .end # parseExpr_0 .sub 'parseExpr_2' :subid('WSubId_113') .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_111 = "WSubId_111" .const 'Sub' WSubId_112 = "WSubId_112" .const 'Sub' InternalError = "InternalError" $P1 = WSubId_111(__ARG_1, __ARG_2) null $P2 null $P3 null $I1 __label_2: # while $P2 = __ARG_1.'get'() $P5 = WSubId_112($P2) set $I1, $P5 unless $I1 goto __label_1 if $I1 == 1 goto __label_5 if $I1 == 2 goto __label_6 if $I1 == 3 goto __label_7 goto __label_3 __label_5: # case new $P6, [ 'Winxed'; 'Compiler'; 'CallExpr' ] $P6.'CallExpr'(__ARG_1, __ARG_2, $P2, $P1) set $P1, $P6 goto __label_4 # break __label_6: # case new $P7, [ 'Winxed'; 'Compiler'; 'IndexExpr' ] $P7.'IndexExpr'(__ARG_1, __ARG_2, $P2, $P1) set $P1, $P7 goto __label_4 # break __label_7: # case set $P3, $P2 $P2 = __ARG_1.'get'() $P8 = $P2.'isop'("*") if_null $P8, __label_8 unless $P8 goto __label_8 $P4 = WSubId_111(__ARG_1, __ARG_2) new $P5, [ 'Winxed'; 'Compiler'; 'MemberRefExpr' ] $P5.'MemberRefExpr'(__ARG_2, $P2, $P1, $P4) set $P1, $P5 goto __label_9 __label_8: # else new $P5, [ 'Winxed'; 'Compiler'; 'MemberExpr' ] $P5.'MemberExpr'(__ARG_2, $P3, $P1, $P2) set $P1, $P5 __label_9: # endif goto __label_4 # break __label_3: # default InternalError("Unexpected code in parseExpr_2") __label_4: # switch end goto __label_2 __label_1: # endwhile __ARG_1.'unget'($P2) .return($P1) .end # parseExpr_2 .sub 'parseExpr_3' :subid('WSubId_116') .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_113 = "WSubId_113" $P1 = WSubId_113(__ARG_1, __ARG_2) $P2 = __ARG_1.'get'() $P3 = $P2.'isop'("++") set $I1, $P3 if $I1 goto __label_3 $P4 = $P2.'isop'("--") set $I1, $P4 if $I1 goto __label_4 goto __label_2 __label_3: # case new $P6, [ 'Winxed'; 'Compiler'; 'OpPostIncExpr' ] $P6.'OpPostIncExpr'(__ARG_2, $P2, $P1) set $P5, $P6 .return($P5) __label_4: # case new $P8, [ 'Winxed'; 'Compiler'; 'OpPostDecExpr' ] $P8.'OpPostDecExpr'(__ARG_2, $P2, $P1) set $P7, $P8 .return($P7) __label_2: # default __ARG_1.'unget'($P2) .return($P1) __label_1: # switch end .end # parseExpr_3 .sub 'parseExpr_4' :subid('WSubId_115') .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_114 = "WSubId_114" .const 'Sub' WSubId_115 = "WSubId_115" .const 'Sub' InternalError = "InternalError" .const 'Sub' WSubId_116 = "WSubId_116" $P1 = __ARG_1.'get'() $P3 = WSubId_114($P1) set $I1, $P3 unless $I1 goto __label_1 $P2 = WSubId_115(__ARG_1, __ARG_2) if $I1 == 8 goto __label_5 if $I1 == 11 goto __label_6 if $I1 == 34 goto __label_7 if $I1 == 9 goto __label_8 if $I1 == 10 goto __label_9 if $I1 == 32 goto __label_10 if $I1 == 33 goto __label_11 if $I1 == 35 goto __label_12 goto __label_3 __label_5: # case new $P4, [ 'Winxed'; 'Compiler'; 'OpUnaryMinusExpr' ] $P4.'OpUnaryMinusExpr'(__ARG_2, $P1, $P2) set $P3, $P4 .return($P3) __label_6: # case new $P6, [ 'Winxed'; 'Compiler'; 'OpNotExpr' ] $P6.'OpNotExpr'(__ARG_2, $P1, $P2) set $P5, $P6 .return($P5) __label_7: # case new $P8, [ 'Winxed'; 'Compiler'; 'OpBinNotExpr' ] $P8.'OpBinNotExpr'(__ARG_2, $P1, $P2) set $P7, $P8 .return($P7) __label_8: # case new $P10, [ 'Winxed'; 'Compiler'; 'OpPreIncExpr' ] $P10.'OpPreIncExpr'(__ARG_2, $P1, $P2) set $P9, $P10 .return($P9) __label_9: # case new $P12, [ 'Winxed'; 'Compiler'; 'OpPreDecExpr' ] $P12.'OpPreDecExpr'(__ARG_2, $P1, $P2) set $P11, $P12 .return($P11) __label_10: # case new $P14, [ 'Winxed'; 'Compiler'; 'OpDeleteExpr' ] $P14.'OpDeleteExpr'(__ARG_2, $P1, $P2) set $P13, $P14 .return($P13) __label_11: # case new $P16, [ 'Winxed'; 'Compiler'; 'OpExistsExpr' ] $P16.'OpExistsExpr'(__ARG_2, $P1, $P2) set $P15, $P16 .return($P15) __label_12: # case new $P18, [ 'Winxed'; 'Compiler'; 'OpDefinedExpr' ] $P18.'OpDefinedExpr'(__ARG_2, $P1, $P2) set $P17, $P18 .return($P17) __label_3: # default InternalError("Invalid code in parseExpr_4", $P1) __label_4: # switch end goto __label_2 __label_1: # else __ARG_1.'unget'($P1) .tailcall WSubId_116(__ARG_1, __ARG_2) __label_2: # endif .end # parseExpr_4 .sub 'parseExpr_5' :subid('WSubId_118') .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_115 = "WSubId_115" .const 'Sub' WSubId_117 = "WSubId_117" .const 'Sub' InternalError = "InternalError" $P1 = WSubId_115(__ARG_1, __ARG_2) null $P2 null $I1 __label_2: # while $P2 = __ARG_1.'get'() $P4 = WSubId_117($P2) set $I1, $P4 unless $I1 goto __label_1 $P3 = WSubId_115(__ARG_1, __ARG_2) if $I1 == 19 goto __label_5 if $I1 == 20 goto __label_6 if $I1 == 21 goto __label_7 if $I1 == 22 goto __label_8 goto __label_3 __label_5: # case new $P4, [ 'Winxed'; 'Compiler'; 'OpMulExpr' ] $P4.'OpMulExpr'(__ARG_2, $P2, $P1, $P3) set $P1, $P4 goto __label_4 # break __label_6: # case new $P5, [ 'Winxed'; 'Compiler'; 'OpDivExpr' ] $P5.'OpDivExpr'(__ARG_2, $P2, $P1, $P3) set $P1, $P5 goto __label_4 # break __label_7: # case new $P6, [ 'Winxed'; 'Compiler'; 'OpModExpr' ] $P6.'OpModExpr'(__ARG_2, $P2, $P1, $P3) set $P1, $P6 goto __label_4 # break __label_8: # case new $P7, [ 'Winxed'; 'Compiler'; 'OpCModExpr' ] $P7.'OpCModExpr'(__ARG_2, $P2, $P1, $P3) set $P1, $P7 goto __label_4 # break __label_3: # default InternalError("Invalid code in parseExpr_5", $P2) __label_4: # switch end goto __label_2 __label_1: # endwhile __ARG_1.'unget'($P2) .return($P1) .end # parseExpr_5 .sub 'parseExpr_6' :subid('WSubId_119') .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_118 = "WSubId_118" $P1 = WSubId_118(__ARG_1, __ARG_2) null $P2 __label_2: # while $P2 = __ARG_1.'get'() $P5 = $P2.'isop'("+") if $P5 goto __label_3 $P5 = $P2.'isop'("-") __label_3: if_null $P5, __label_1 unless $P5 goto __label_1 $P3 = WSubId_118(__ARG_1, __ARG_2) null $P4 $P5 = $P2.'isop'("+") if_null $P5, __label_4 unless $P5 goto __label_4 new $P6, [ 'Winxed'; 'Compiler'; 'OpAddExpr' ] $P6.'OpAddExpr'(__ARG_2, $P2, $P1, $P3) set $P4, $P6 goto __label_5 __label_4: # else new $P7, [ 'Winxed'; 'Compiler'; 'OpSubExpr' ] $P7.'OpSubExpr'(__ARG_2, $P2, $P1, $P3) set $P4, $P7 __label_5: # endif set $P1, $P4 goto __label_2 __label_1: # endwhile __ARG_1.'unget'($P2) .return($P1) .end # parseExpr_6 .sub 'parseExpr_7' :subid('WSubId_121') .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_119 = "WSubId_119" .const 'Sub' WSubId_120 = "WSubId_120" .const 'Sub' InternalError = "InternalError" $P1 = WSubId_119(__ARG_1, __ARG_2) null $P2 null $P3 null $I1 __label_2: # while $P3 = __ARG_1.'get'() $P4 = WSubId_120($P3) set $I1, $P4 unless $I1 goto __label_1 if $I1 == 28 goto __label_5 if $I1 == 29 goto __label_6 if $I1 == 30 goto __label_7 goto __label_3 __label_5: # case $P2 = WSubId_119(__ARG_1, __ARG_2) new $P5, [ 'Winxed'; 'Compiler'; 'OpShiftleftExpr' ] $P5.'OpShiftleftExpr'(__ARG_2, $P3, $P1, $P2) set $P1, $P5 goto __label_4 # break __label_6: # case $P2 = WSubId_119(__ARG_1, __ARG_2) new $P6, [ 'Winxed'; 'Compiler'; 'OpShiftrightExpr' ] $P6.'OpShiftrightExpr'(__ARG_2, $P3, $P1, $P2) set $P1, $P6 goto __label_4 # break __label_7: # case $P2 = WSubId_119(__ARG_1, __ARG_2) new $P7, [ 'Winxed'; 'Compiler'; 'OpShiftlrightExpr' ] $P7.'OpShiftlrightExpr'(__ARG_2, $P3, $P1, $P2) set $P1, $P7 goto __label_4 # break __label_3: # default InternalError("Invalid code in parseExpr_7", $P3) __label_4: # switch end goto __label_2 __label_1: # endwhile __ARG_1.'unget'($P3) .return($P1) .end # parseExpr_7 .sub 'parseExpr_8' :subid('WSubId_123') .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_121 = "WSubId_121" .const 'Sub' WSubId_122 = "WSubId_122" .const 'Sub' InternalError = "InternalError" $P1 = WSubId_121(__ARG_1, __ARG_2) null $P2 null $P3 null $I1 __label_2: # while $P3 = __ARG_1.'get'() $P4 = WSubId_122($P3) set $I1, $P4 unless $I1 goto __label_1 if $I1 == 14 goto __label_5 if $I1 == 16 goto __label_6 if $I1 == 15 goto __label_7 if $I1 == 17 goto __label_8 if $I1 == 27 goto __label_9 goto __label_3 __label_5: # case $P2 = WSubId_121(__ARG_1, __ARG_2) new $P5, [ 'Winxed'; 'Compiler'; 'OpLessExpr' ] $P1 = $P5.'set'(__ARG_2, $P3, $P1, $P2) goto __label_4 # break __label_6: # case $P2 = WSubId_121(__ARG_1, __ARG_2) new $P6, [ 'Winxed'; 'Compiler'; 'OpGreaterExpr' ] $P1 = $P6.'set'(__ARG_2, $P3, $P1, $P2) goto __label_4 # break __label_7: # case $P2 = WSubId_121(__ARG_1, __ARG_2) new $P7, [ 'Winxed'; 'Compiler'; 'OpLessEqualExpr' ] $P1 = $P7.'set'(__ARG_2, $P3, $P1, $P2) goto __label_4 # break __label_8: # case $P2 = WSubId_121(__ARG_1, __ARG_2) new $P8, [ 'Winxed'; 'Compiler'; 'OpGreaterEqualExpr' ] $P1 = $P8.'set'(__ARG_2, $P3, $P1, $P2) goto __label_4 # break __label_9: # case new $P9, [ 'Winxed'; 'Compiler'; 'OpInstanceOfExpr' ] $P9.'OpInstanceOfExpr'(__ARG_2, $P3, $P1, __ARG_1) set $P1, $P9 goto __label_4 # break __label_3: # default InternalError("Invalid code in parseExpr_9", $P3) __label_4: # switch end goto __label_2 __label_1: # endwhile __ARG_1.'unget'($P3) .return($P1) .end # parseExpr_8 .sub 'parseExpr_9' :subid('WSubId_125') .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_123 = "WSubId_123" .const 'Sub' WSubId_124 = "WSubId_124" .const 'Sub' InternalError = "InternalError" $P1 = WSubId_123(__ARG_1, __ARG_2) null $P2 null $P3 null $I1 __label_2: # while $P3 = __ARG_1.'get'() $P4 = WSubId_124($P3) set $I1, $P4 unless $I1 goto __label_1 if $I1 == 12 goto __label_5 if $I1 == 13 goto __label_6 if $I1 == 25 goto __label_7 if $I1 == 26 goto __label_8 goto __label_3 __label_5: # case $P2 = WSubId_123(__ARG_1, __ARG_2) new $P5, [ 'Winxed'; 'Compiler'; 'OpEqualExpr' ] $P5.'OpEqualExpr'(__ARG_2, $P3, $P1, $P2, 1) set $P1, $P5 goto __label_4 # break __label_6: # case $P2 = WSubId_123(__ARG_1, __ARG_2) new $P6, [ 'Winxed'; 'Compiler'; 'OpEqualExpr' ] $P6.'OpEqualExpr'(__ARG_2, $P3, $P1, $P2, 0) set $P1, $P6 goto __label_4 # break __label_7: # case $P2 = WSubId_123(__ARG_1, __ARG_2) new $P7, [ 'Winxed'; 'Compiler'; 'OpSameExpr' ] $P7.'OpSameExpr'(__ARG_2, $P3, $P1, $P2, 1) set $P1, $P7 goto __label_4 # break __label_8: # case $P2 = WSubId_123(__ARG_1, __ARG_2) new $P8, [ 'Winxed'; 'Compiler'; 'OpSameExpr' ] $P8.'OpSameExpr'(__ARG_2, $P3, $P1, $P2, 0) set $P1, $P8 goto __label_4 # break __label_3: # default InternalError("Invalid code in parseExpr_8", $P3) __label_4: # switch end goto __label_2 __label_1: # endwhile __ARG_1.'unget'($P3) .return($P1) .end # parseExpr_9 .sub 'parseExpr_10' :subid('WSubId_126') .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_125 = "WSubId_125" $P1 = WSubId_125(__ARG_1, __ARG_2) null $P2 __label_2: # while $P2 = __ARG_1.'get'() $P4 = $P2.'isop'("&") if_null $P4, __label_1 unless $P4 goto __label_1 $P3 = WSubId_125(__ARG_1, __ARG_2) new $P4, [ 'Winxed'; 'Compiler'; 'OpBinAndExpr' ] $P4.'OpBinAndExpr'(__ARG_2, $P2, $P1, $P3) set $P1, $P4 goto __label_2 __label_1: # endwhile __ARG_1.'unget'($P2) .return($P1) .end # parseExpr_10 .sub 'parseExpr_11' :subid('WSubId_127') .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_126 = "WSubId_126" $P1 = WSubId_126(__ARG_1, __ARG_2) null $P2 __label_2: # while $P2 = __ARG_1.'get'() $P4 = $P2.'isop'("^") if_null $P4, __label_1 unless $P4 goto __label_1 $P3 = WSubId_126(__ARG_1, __ARG_2) new $P4, [ 'Winxed'; 'Compiler'; 'OpBinXorExpr' ] $P4.'OpBinXorExpr'(__ARG_2, $P2, $P1, $P3) set $P1, $P4 goto __label_2 __label_1: # endwhile __ARG_1.'unget'($P2) .return($P1) .end # parseExpr_11 .sub 'parseExpr_12' :subid('WSubId_128') .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_127 = "WSubId_127" $P1 = WSubId_127(__ARG_1, __ARG_2) null $P2 __label_2: # while $P2 = __ARG_1.'get'() $P4 = $P2.'isop'("|") if_null $P4, __label_1 unless $P4 goto __label_1 $P3 = WSubId_127(__ARG_1, __ARG_2) new $P4, [ 'Winxed'; 'Compiler'; 'OpBinOrExpr' ] $P4.'OpBinOrExpr'(__ARG_2, $P2, $P1, $P3) set $P1, $P4 goto __label_2 __label_1: # endwhile __ARG_1.'unget'($P2) .return($P1) .end # parseExpr_12 .sub 'parseExpr_13' :subid('WSubId_129') .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_128 = "WSubId_128" $P1 = WSubId_128(__ARG_1, __ARG_2) null $P2 __label_2: # while $P2 = __ARG_1.'get'() $P4 = $P2.'isop'("&&") if_null $P4, __label_1 unless $P4 goto __label_1 $P3 = WSubId_128(__ARG_1, __ARG_2) new $P4, [ 'Winxed'; 'Compiler'; 'OpBoolAndExpr' ] $P4.'OpBoolAndExpr'(__ARG_2, $P2, $P1, $P3) set $P1, $P4 goto __label_2 __label_1: # endwhile __ARG_1.'unget'($P2) .return($P1) .end # parseExpr_13 .sub 'parseExpr_14' :subid('WSubId_130') .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_129 = "WSubId_129" .const 'Sub' WSubId_128 = "WSubId_128" $P1 = WSubId_129(__ARG_1, __ARG_2) null $P2 __label_2: # while $P2 = __ARG_1.'get'() $P4 = $P2.'isop'("||") if_null $P4, __label_1 unless $P4 goto __label_1 $P3 = WSubId_128(__ARG_1, __ARG_2) new $P4, [ 'Winxed'; 'Compiler'; 'OpBoolOrExpr' ] $P4.'OpBoolOrExpr'(__ARG_2, $P2, $P1, $P3) set $P1, $P4 goto __label_2 __label_1: # endwhile __ARG_1.'unget'($P2) .return($P1) .end # parseExpr_14 .sub 'parseExpr_15' :subid('WSubId_132') .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_130 = "WSubId_130" .const 'Sub' WSubId_131 = "WSubId_131" .const 'Sub' ExpectOp = "ExpectOp" $P1 = WSubId_130(__ARG_1, __ARG_2) $P2 = __ARG_1.'get'() $P5 = $P2.'isop'("?") if_null $P5, __label_1 unless $P5 goto __label_1 $P3 = WSubId_131(__ARG_1, __ARG_2) ExpectOp(":", __ARG_1) $P4 = WSubId_131(__ARG_1, __ARG_2) new $P6, [ 'Winxed'; 'Compiler'; 'OpConditionalExpr' ] $P6.'OpConditionalExpr'(__ARG_2, $P2, $P1, $P3, $P4) set $P5, $P6 .return($P5) goto __label_2 __label_1: # else __ARG_1.'unget'($P2) .return($P1) __label_2: # endif .end # parseExpr_15 .sub 'parseExpr_16' :subid('WSubId_131') .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_132 = "WSubId_132" .const 'Sub' WSubId_133 = "WSubId_133" .const 'Sub' WSubId_131 = "WSubId_131" .const 'Sub' InternalError = "InternalError" $P1 = WSubId_132(__ARG_1, __ARG_2) null $P2 null $I1 __label_2: # while $P2 = __ARG_1.'get'() $P5 = WSubId_133($P2) set $I1, $P5 unless $I1 goto __label_1 $P3 = WSubId_131(__ARG_1, __ARG_2) null $P4 if $I1 == 4 goto __label_5 if $I1 == 5 goto __label_6 if $I1 == 6 goto __label_7 if $I1 == 18 goto __label_8 if $I1 == 23 goto __label_9 if $I1 == 24 goto __label_10 if $I1 == 31 goto __label_11 goto __label_3 __label_5: # case new $P4, [ 'Winxed'; 'Compiler'; 'OpAssignExpr' ] goto __label_4 # break __label_6: # case new $P4, [ 'Winxed'; 'Compiler'; 'OpAssignToExpr' ] goto __label_4 # break __label_7: # case new $P4, [ 'Winxed'; 'Compiler'; 'OpAddToExpr' ] goto __label_4 # break __label_8: # case new $P4, [ 'Winxed'; 'Compiler'; 'OpSubToExpr' ] goto __label_4 # break __label_9: # case new $P4, [ 'Winxed'; 'Compiler'; 'OpMulToExpr' ] goto __label_4 # break __label_10: # case new $P4, [ 'Winxed'; 'Compiler'; 'OpDivToExpr' ] goto __label_4 # break __label_11: # case new $P4, [ 'Winxed'; 'Compiler'; 'OpModToExpr' ] goto __label_4 # break __label_3: # default InternalError("Unexpected code in parseExpr_16", $P2) __label_4: # switch end $P4.'set'(__ARG_2, $P2, $P1, $P3) set $P1, $P4 goto __label_2 __label_1: # endwhile __ARG_1.'unget'($P2) .return($P1) .end # parseExpr_16 .sub 'parseExpr' :subid('WSubId_75') .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_131 = "WSubId_131" .tailcall WSubId_131(__ARG_1, __ARG_2) .end # parseExpr .namespace [ 'Winxed'; 'Compiler'; 'Breakable' ] .sub 'genbreaklabel' :method .const 'Sub' InternalError = "InternalError" getattribute $P1, self, 'brlabel' if_null $P1, __label_1 InternalError("attempt to generate break label twice") __label_1: # endif $P1 = self.'genlabel'() null $S1 if_null $P1, __label_2 set $S1, $P1 __label_2: box $P1, $S1 setattribute self, 'brlabel', $P1 .return($S1) .end # genbreaklabel .sub 'getbreaklabel' :method .param pmc __ARG_1 .const 'Sub' InternalError = "InternalError" getattribute $P1, self, 'brlabel' unless_null $P1, __label_1 InternalError("attempt to get break label before creating it") __label_1: # endif .return($P1) .end # getbreaklabel .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'Breakable' ] addattribute $P0, 'brlabel' .end .namespace [ 'Winxed'; 'Compiler'; 'Continuable' ] .sub 'gencontinuelabel' :method .const 'Sub' InternalError = "InternalError" getattribute $P1, self, 'cntlabel' if_null $P1, __label_1 InternalError("attempt to generate continue label twice") __label_1: # endif $P1 = self.'genlabel'() null $S1 if_null $P1, __label_2 set $S1, $P1 __label_2: box $P1, $S1 setattribute self, 'cntlabel', $P1 .return($S1) .end # gencontinuelabel .sub 'getcontinuelabel' :method .param pmc __ARG_1 .const 'Sub' InternalError = "InternalError" getattribute $P1, self, 'cntlabel' unless_null $P1, __label_1 InternalError("attempt to get continue label before creating it") __label_1: # endif .return($P1) .end # getcontinuelabel .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'Continuable' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Breakable' ] addparent $P0, $P1 addattribute $P0, 'cntlabel' .end .namespace [ 'Winxed'; 'Compiler'; 'ReturnYieldStatement' ] .sub 'parse' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'Statement'(__ARG_1, __ARG_3) $P1 = __ARG_2.'get'() $P2 = $P1.'isop'(";") if $P2 goto __label_1 __ARG_2.'unget'($P1) new $P4, [ 'Winxed'; 'Compiler'; 'ArgumentList' ] $P4.'ArgumentList'(__ARG_3, __ARG_1, __ARG_2, ";") set $P3, $P4 setattribute self, 'values', $P3 __label_1: # endif .end # parse .sub 'optimize' :method getattribute $P1, self, 'values' if_null $P1, __label_1 $P1 = $P1.'optimize'() __label_1: # endif .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 getattribute $P1, self, 'values' unless_null $P1, __label_2 null $I1 goto __label_1 __label_2: $I1 = $P1.'numargs'() __label_1: ne $I1, 1, __label_3 isa $I2, self, [ 'Winxed'; 'Compiler'; 'ReturnStatement' ] unless $I2 goto __label_3 $P2 = $P1.'getfreearg'(0) $P3 = $P2.'cantailcall'() unless $P3 goto __label_4 getattribute $P5, self, 'owner' $P4 = $P5.'allowtailcall'() unless $P4 goto __label_4 self.'annotate'(__ARG_1) .tailcall $P2.'emit'(__ARG_1, ".tailcall") __label_4: # endif __label_3: # endif le $I1, 0, __label_5 $P1.'getargvalues'(__ARG_1) __label_5: # endif self.'annotate'(__ARG_1) self.'emitret'(__ARG_1) le $I1, 0, __label_6 $P1.'emitargs'(__ARG_1) __label_6: # endif __ARG_1.'say'(")") .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ReturnYieldStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Statement' ] addparent $P0, $P1 addattribute $P0, 'values' .end .namespace [ 'Winxed'; 'Compiler'; 'ReturnStatement' ] .sub 'ReturnStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'parse'(__ARG_1, __ARG_2, __ARG_3) .end # ReturnStatement .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'ReturnStatement' ] getattribute $P2, self, 'start' $P1.'Statement'($P2, __ARG_1) getattribute $P2, self, 'values' if_null $P2, __label_1 getattribute $P5, self, 'values' $P4 = $P5.'clone'(__ARG_1) setattribute $P1, 'values', $P4 __label_1: # endif .return($P1) .end # clone .sub 'emitret' :method .param pmc __ARG_1 __ARG_1.'print'(" ", ".return(") .end # emitret .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ReturnStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'ReturnYieldStatement' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'YieldStatement' ] .sub 'YieldStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'parse'(__ARG_1, __ARG_2, __ARG_3) .end # YieldStatement .sub 'clone' :method .param pmc __ARG_1 .const 'Sub' SyntaxError = "SyntaxError" SyntaxError("inlined yield not allowed", self) .end # clone .sub 'emitret' :method .param pmc __ARG_1 __ARG_1.'print'(" ", ".yield(") .end # emitret .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'YieldStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'ReturnYieldStatement' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'InlineReturnStatement' ] .sub 'InlineReturnStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' WSubId_75 = "WSubId_75" .const 'Sub' ExpectOp = "ExpectOp" self.'Statement'(__ARG_1, __ARG_3) $P1 = __ARG_2.'get'() $P2 = $P1.'isop'(";") if $P2 goto __label_1 __ARG_2.'unget'($P1) $P3 = WSubId_75(__ARG_2, __ARG_3) setattribute self, 'expr', $P3 ExpectOp(";", __ARG_2) __label_1: # endif .end # InlineReturnStatement .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'InlineReturnStatement' ] getattribute $P3, self, 'start' $P1.'Statement'($P3, __ARG_1) getattribute $P2, self, 'expr' if_null $P2, __label_1 $P4 = $P2.'clone'(__ARG_1) setattribute $P1, 'expr', $P4 __label_1: # endif .return($P1) .end # clone .sub 'optimize' :method getattribute $P1, self, 'expr' if_null $P1, __label_1 $P3 = $P1.'optimize'() setattribute self, 'expr', $P3 __label_1: # endif .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 getattribute $P3, self, 'owner' $P1 = $P3.'getouter'() getattribute $P2, self, 'expr' if_null $P2, __label_1 self.'annotate'(__ARG_1) $P1.'emitret'(__ARG_1, $P2) __label_1: # endif $P3 = $P1.'islaststatement'(self) if $P3 goto __label_2 $P4 = $P1.'getendlabel'() null $S1 if_null $P4, __label_3 set $S1, $P4 __label_3: self.'annotate'(__ARG_1) __ARG_1.'emitgoto'($S1) __label_2: # endif .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'InlineReturnStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Statement' ] addparent $P0, $P1 addattribute $P0, 'expr' .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'parseReturn' :subid('WSubId_88') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 $P1 = __ARG_3.'getouter'() isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'InlineStatement' ] unless $I1 goto __label_1 new $P3, [ 'Winxed'; 'Compiler'; 'InlineReturnStatement' ] $P3.'InlineReturnStatement'(__ARG_1, __ARG_2, __ARG_3) set $P2, $P3 .return($P2) goto __label_2 __label_1: # else new $P5, [ 'Winxed'; 'Compiler'; 'ReturnStatement' ] $P5.'ReturnStatement'(__ARG_1, __ARG_2, __ARG_3) set $P4, $P5 .return($P4) __label_2: # endif .end # parseReturn .namespace [ 'Winxed'; 'Compiler'; 'LabelStatement' ] .sub 'LabelStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 self.'Statement'(__ARG_1, __ARG_2) setattribute self, 'name', __ARG_1 $P2 = self.'createlabel'(__ARG_1) setattribute self, 'value', $P2 .end # LabelStatement .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'LabelStatement' ] getattribute $P2, self, 'start' $P1.'Statement'($P2, __ARG_1) getattribute $P3, self, 'name' setattribute $P1, 'name', $P3 getattribute $P4, $P1, 'name' $P3 = $P1.'createlabel'($P4) setattribute $P1, 'value', $P3 .return($P1) .end # clone .sub 'optimize' :method .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 self.'annotate'(__ARG_1) getattribute $P1, self, 'value' getattribute $P2, self, 'name' set $S1, $P2 concat $S2, "label ", $S1 __ARG_1.'emitlabel'($P1, $S2) .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'LabelStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Statement' ] addparent $P0, $P1 addattribute $P0, 'name' addattribute $P0, 'value' .end .namespace [ 'Winxed'; 'Compiler'; 'Reflabel' ] .sub 'Reflabel' :method .param pmc __ARG_1 .param pmc __ARG_2 setattribute self, 'owner', __ARG_1 setattribute self, 'label', __ARG_2 .end # Reflabel .sub 'clone' :method .param pmc __ARG_1 new $P2, [ 'Winxed'; 'Compiler'; 'Reflabel' ] getattribute $P3, self, 'label' $P2.'Reflabel'(__ARG_1, $P3) set $P1, $P2 .return($P1) .end # clone .sub 'optimize' :method .return(self) .end # optimize .sub 'emit_get' :method .param pmc __ARG_1 .const 'Sub' SyntaxError = "SyntaxError" getattribute $P2, self, 'owner' getattribute $P4, self, 'label' $P3 = $P4.'getidentifier'() $P1 = $P2.'getlabel'($P3) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: unless_null $S1, __label_2 getattribute $P1, self, 'label' SyntaxError("No such label", $P1) __label_2: # endif .return($S1) .end # emit_get .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'Reflabel' ] addattribute $P0, 'owner' addattribute $P0, 'label' .end .namespace [ 'Winxed'; 'Compiler'; 'GotoStatement' ] .sub 'GotoStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'Statement'(__ARG_1, __ARG_2) setattribute self, 'label', __ARG_3 .end # GotoStatement .sub 'clone' :method .param pmc __ARG_1 new $P2, [ 'Winxed'; 'Compiler'; 'GotoStatement' ] getattribute $P3, self, 'start' getattribute $P4, self, 'label' $P2.'GotoStatement'($P3, __ARG_1, $P4) set $P1, $P2 .return($P1) .end # clone .sub 'optimize' :method .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .const 'Sub' SyntaxError = "SyntaxError" self.'annotate'(__ARG_1) getattribute $P1, self, 'label' null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: $P1 = self.'getlabel'($S1) null $S2 if_null $P1, __label_2 set $S2, $P1 __label_2: unless_null $S2, __label_3 getattribute $P1, self, 'label' SyntaxError("No such label", $P1) __label_3: # endif concat $S3, "goto ", $S1 __ARG_1.'emitgoto'($S2, $S3) .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'GotoStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Statement' ] addparent $P0, $P1 addattribute $P0, 'label' .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'parseGoto' :subid('WSubId_89') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' RequireIdentifier = "RequireIdentifier" .const 'Sub' ExpectOp = "ExpectOp" $P1 = __ARG_2.'get'() RequireIdentifier($P1) ExpectOp(";", __ARG_2) new $P3, [ 'Winxed'; 'Compiler'; 'GotoStatement' ] $P3.'GotoStatement'(__ARG_1, __ARG_3, $P1) set $P2, $P3 .return($P2) .end # parseGoto .namespace [ 'Winxed'; 'Compiler'; 'ConditionalStatement' ] .sub 'parseconditionshort' :method .param pmc __ARG_1 .const 'Sub' WSubId_75 = "WSubId_75" $P1 = WSubId_75(__ARG_1, self) self.'set'($P1) .end # parseconditionshort .sub 'parsecondition' :method .param pmc __ARG_1 .const 'Sub' ExpectOp = "ExpectOp" .const 'Sub' WSubId_75 = "WSubId_75" ExpectOp("(", __ARG_1) $P1 = WSubId_75(__ARG_1, self) self.'set'($P1) ExpectOp(")", __ARG_1) .end # parsecondition .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ConditionalStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Statement' ] addparent $P0, $P1 get_class $P2, [ 'Winxed'; 'Compiler'; 'Condition' ] addparent $P0, $P2 .end .namespace [ 'Winxed'; 'Compiler'; 'IfStatement' ] .sub 'IfStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' WSubId_134 = "WSubId_134" self.'Statement'(__ARG_1, __ARG_3) self.'parsecondition'(__ARG_2) $P3 = WSubId_134(__ARG_2, self) setattribute self, 'truebranch', $P3 $P1 = __ARG_2.'get'() $P2 = $P1.'iskeyword'("else") if_null $P2, __label_1 unless $P2 goto __label_1 $P4 = WSubId_134(__ARG_2, self) setattribute self, 'falsebranch', $P4 goto __label_2 __label_1: # else new $P6, [ 'Winxed'; 'Compiler'; 'EmptyStatement' ] setattribute self, 'falsebranch', $P6 __ARG_2.'unget'($P1) __label_2: # endif .end # IfStatement .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'IfStatement' ] getattribute $P2, self, 'start' $P1.'Statement'($P2, __ARG_1) getattribute $P4, self, 'condexpr' $P3 = $P4.'clone'(__ARG_1) setattribute $P1, 'condexpr', $P3 getattribute $P4, self, 'truebranch' $P3 = $P4.'clone'(__ARG_1) setattribute $P1, 'truebranch', $P3 getattribute $P4, self, 'falsebranch' $P3 = $P4.'clone'(__ARG_1) setattribute $P1, 'falsebranch', $P3 .return($P1) .end # clone .sub 'optimize' :method self.'optimize_condition'() getattribute $P3, self, 'truebranch' $P2 = $P3.'optimize'() setattribute self, 'truebranch', $P2 getattribute $P3, self, 'falsebranch' $P2 = $P3.'optimize'() setattribute self, 'falsebranch', $P2 $P1 = self.'getvalue'() set $I1, $P1 if $I1 == 1 goto __label_3 if $I1 == 2 goto __label_4 goto __label_1 __label_3: # case getattribute $P2, self, 'truebranch' .return($P2) __label_4: # case getattribute $P3, self, 'falsebranch' .return($P3) __label_1: # default __label_2: # switch end .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 getattribute $P1, self, 'truebranch' getattribute $P2, self, 'falsebranch' $P3 = $P1.'isempty'() set $I1, $P3 $P3 = $P2.'isempty'() set $I2, $P3 set $S1, "" if $I2 goto __label_1 $P3 = self.'genlabel'() set $S1, $P3 __label_1: # endif $P3 = self.'genlabel'() null $S2 if_null $P3, __label_2 set $S2, $P3 __label_2: unless $I2 goto __label_4 set $S3, $S2 goto __label_3 __label_4: set $S3, $S1 __label_3: self.'annotate'(__ARG_1) self.'emit_else'(__ARG_1, $S3) $P1.'emit'(__ARG_1) if $I2 goto __label_5 __ARG_1.'emitgoto'($S2) __ARG_1.'emitlabel'($S1, "else") $P2.'emit'(__ARG_1) __label_5: # endif __ARG_1.'emitlabel'($S2, "endif") .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'IfStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'ConditionalStatement' ] addparent $P0, $P1 addattribute $P0, 'truebranch' addattribute $P0, 'falsebranch' .end .namespace [ 'Winxed'; 'Compiler'; 'LoopStatement' ] .sub 'parsebody' :method .param pmc __ARG_1 .const 'Sub' WSubId_134 = "WSubId_134" $P2 = WSubId_134(__ARG_1, self) setattribute self, 'body', $P2 .end # parsebody .sub 'emit_infinite' :method .param pmc __ARG_1 $P1 = self.'genbreaklabel'() null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: $P1 = self.'gencontinuelabel'() null $S2 if_null $P1, __label_2 set $S2, $P1 __label_2: self.'annotate'(__ARG_1) __ARG_1.'emitlabel'($S2, "Infinite loop") getattribute $P1, self, 'body' $P1.'emit'(__ARG_1) __ARG_1.'emitgoto'($S2) __ARG_1.'emitlabel'($S1, "Infinite loop end") .end # emit_infinite .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'LoopStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Continuable' ] addparent $P0, $P1 addattribute $P0, 'body' .end .namespace [ 'Winxed'; 'Compiler'; 'WhileStatement' ] .sub 'WhileStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'Statement'(__ARG_1, __ARG_3) self.'parsecondition'(__ARG_2) self.'parsebody'(__ARG_2) .end # WhileStatement .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'WhileStatement' ] getattribute $P2, self, 'start' $P1.'Statement'($P2, __ARG_1) getattribute $P4, self, 'condexpr' $P3 = $P4.'clone'($P1) setattribute $P1, 'condexpr', $P3 getattribute $P4, self, 'body' $P3 = $P4.'clone'($P1) setattribute $P1, 'body', $P3 .return($P1) .end # clone .sub 'optimize' :method self.'optimize_condition'() getattribute $P3, self, 'body' $P2 = $P3.'optimize'() setattribute self, 'body', $P2 .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 $P1 = self.'getvalue'() set $I1, $P1 if $I1 == 1 goto __label_3 if $I1 == 2 goto __label_4 goto __label_1 __label_3: # case self.'emit_infinite'(__ARG_1) goto __label_2 # break __label_4: # case $P2 = __ARG_1.'getDebug'() if_null $P2, __label_5 unless $P2 goto __label_5 __ARG_1.'comment'("while(false) optimized out") __label_5: # endif goto __label_2 # break __label_1: # default $P3 = self.'genbreaklabel'() null $S1 if_null $P3, __label_6 set $S1, $P3 __label_6: $P4 = self.'gencontinuelabel'() null $S2 if_null $P4, __label_7 set $S2, $P4 __label_7: self.'annotate'(__ARG_1) __ARG_1.'emitlabel'($S2, "while") self.'emit_else'(__ARG_1, $S1) getattribute $P5, self, 'body' $P5.'emit'(__ARG_1) __ARG_1.'emitgoto'($S2) __ARG_1.'emitlabel'($S1, "endwhile") __label_2: # switch end .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'WhileStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'LoopStatement' ] addparent $P0, $P1 get_class $P2, [ 'Winxed'; 'Compiler'; 'ConditionalStatement' ] addparent $P0, $P2 .end .namespace [ 'Winxed'; 'Compiler'; 'DoStatement' ] .sub 'DoStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' WSubId_135 = "WSubId_135" self.'Statement'(__ARG_1, __ARG_3) self.'parsebody'(__ARG_2) WSubId_135("while", __ARG_2) self.'parsecondition'(__ARG_2) .end # DoStatement .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'DoStatement' ] getattribute $P2, self, 'start' $P1.'Statement'($P2, __ARG_1) getattribute $P4, self, 'condexpr' $P3 = $P4.'clone'($P1) setattribute $P1, 'condexpr', $P3 getattribute $P4, self, 'body' $P3 = $P4.'clone'($P1) setattribute $P1, 'body', $P3 .return($P1) .end # clone .sub 'optimize' :method self.'optimize_condition'() getattribute $P2, self, 'body' $P1 = $P2.'optimize'() $P2 = $P1.'isempty'() unless $P2 goto __label_1 $P3 = self.'getvalue'() set $I1, $P3 ne $I1, 2, __label_1 new $P4, [ 'Winxed'; 'Compiler'; 'EmptyStatement' ] .return($P4) __label_1: # endif setattribute self, 'body', $P1 .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 getattribute $P1, self, 'body' $P2 = self.'getvalue'() set $I1, $P2 if $I1 == 1 goto __label_3 goto __label_1 __label_3: # case self.'emit_infinite'(__ARG_1) goto __label_2 # break __label_1: # default $P2 = self.'genlabel'() null $S1 if_null $P2, __label_4 set $S1, $P2 __label_4: $P3 = self.'genbreaklabel'() null $S2 if_null $P3, __label_5 set $S2, $P3 __label_5: $P4 = self.'gencontinuelabel'() null $S3 if_null $P4, __label_6 set $S3, $P4 __label_6: self.'annotate'(__ARG_1) __ARG_1.'emitlabel'($S1, "do") $P1.'emit'(__ARG_1) __ARG_1.'emitlabel'($S3, "continue") eq $I1, 2, __label_7 self.'emit_if'(__ARG_1, $S1, $S2) __label_7: # endif __ARG_1.'emitlabel'($S2, "enddo") __label_2: # switch end .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'DoStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'LoopStatement' ] addparent $P0, $P1 get_class $P2, [ 'Winxed'; 'Compiler'; 'ConditionalStatement' ] addparent $P0, $P2 .end .namespace [ 'Winxed'; 'Compiler'; 'ContinueStatement' ] .sub 'ContinueStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' ExpectOp = "ExpectOp" self.'Statement'(__ARG_1, __ARG_3) ExpectOp(";", __ARG_2) .end # ContinueStatement .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'ContinueStatement' ] getattribute $P2, self, 'start' $P1.'Statement'($P2, __ARG_1) .return($P1) .end # clone .sub 'optimize' :method .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 self.'annotate'(__ARG_1) getattribute $P2, self, 'start' $P1 = self.'getcontinuelabel'($P2) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: __ARG_1.'emitgoto'($S1, "continue") .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ContinueStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Statement' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'BreakStatement' ] .sub 'BreakStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' ExpectOp = "ExpectOp" self.'Statement'(__ARG_1, __ARG_3) ExpectOp(";", __ARG_2) .end # BreakStatement .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'BreakStatement' ] getattribute $P2, self, 'start' $P1.'Statement'($P2, __ARG_1) .return($P1) .end # clone .sub 'optimize' :method .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 self.'annotate'(__ARG_1) getattribute $P2, self, 'start' $P1 = self.'getbreaklabel'($P2) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: __ARG_1.'emitgoto'($S1, "break") .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'BreakStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Statement' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'SwitchBaseStatement' ] .sub 'SwitchBaseStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 self.'Statement'(__ARG_1, __ARG_2) root_new $P2, ['parrot';'ResizablePMCArray'] setattribute self, 'case_value', $P2 root_new $P2, ['parrot';'ResizablePMCArray'] setattribute self, 'case_st', $P2 root_new $P2, ['parrot';'ResizablePMCArray'] setattribute self, 'default_st', $P2 .end # SwitchBaseStatement .sub 'cloneswitchto' :subid('WSubId_13') :method .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_14 = "WSubId_14" .lex '__WLEX_1', __ARG_1 getattribute $P17, self, 'start' __ARG_1.'Statement'($P17, __ARG_2) getattribute $P1, self, 'case_value' set $P2, __ARG_1 .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" set $P3, $P1 root_new $P4, ['parrot';'ResizablePMCArray'] $P19 = bindmethod("clone") $P5 = bindlast($P19, $P2) if_null $P3, __label_2 iter $P20, $P3 set $P20, 0 __label_1: # for iteration unless $P20 goto __label_2 shift $P6, $P20 $P21 = $P5($P6) push $P4, $P21 goto __label_1 __label_2: # endfor set $P18, $P4 set $P17, $P18 setattribute __ARG_1, 'case_value', $P17 getattribute $P7, self, 'case_st' root_new $P8, ['parrot';'ResizablePMCArray'] newclosure $P9, WSubId_14 if_null $P7, __label_4 iter $P23, $P7 set $P23, 0 __label_3: # for iteration unless $P23 goto __label_4 shift $P10, $P23 $P19 = $P9($P10) push $P8, $P19 goto __label_3 __label_4: # endfor set $P22, $P8 set $P17, $P22 setattribute __ARG_1, 'case_st', $P17 getattribute $P11, self, 'default_st' set $P12, __ARG_1 .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" set $P13, $P11 root_new $P14, ['parrot';'ResizablePMCArray'] $P19 = bindmethod("clone") $P15 = bindlast($P19, $P12) if_null $P13, __label_6 iter $P25, $P13 set $P25, 0 __label_5: # for iteration unless $P25 goto __label_6 shift $P16, $P25 $P21 = $P15($P16) push $P14, $P21 goto __label_5 __label_6: # endfor set $P24, $P14 set $P17, $P24 setattribute __ARG_1, 'default_st', $P17 .return(__ARG_1) .end # cloneswitchto .sub '' :anon :subid('WSubId_14') :outer('WSubId_13') .param pmc __ARG_3 find_lex $P1, '__WLEX_1' set $P2, __ARG_3 set $P3, $P1 .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" set $P4, $P2 root_new $P5, ['parrot';'ResizablePMCArray'] $P9 = bindmethod("clone") $P6 = bindlast($P9, $P3) if_null $P4, __label_2 iter $P10, $P4 set $P10, 0 __label_1: # for iteration unless $P10 goto __label_2 shift $P7, $P10 $P11 = $P6($P7) push $P5, $P11 goto __label_1 __label_2: # endfor set $P8, $P5 set $P9, $P8 .return($P9) .end # WSubId_14 .sub 'parse_switchbody' :method .param pmc __ARG_1 .const 'Sub' Expected = "Expected" $P1 = __ARG_1.'get'() $P2 = $P1.'isop'("}") set $I1, $P2 if $I1 goto __label_3 $P3 = $P1.'iskeyword'("default") set $I1, $P3 if $I1 goto __label_4 $P4 = $P1.'iskeyword'("case") set $I1, $P4 if $I1 goto __label_5 goto __label_2 __label_3: # case goto __label_1 # break __label_4: # case self.'parse_default'(__ARG_1) goto __label_1 # break __label_5: # case self.'parse_cases'(__ARG_1) goto __label_1 # break __label_2: # default Expected("switch cases", $P1) __label_1: # switch end .end # parse_switchbody .sub 'parse_cases' :method .param pmc __ARG_1 .const 'Sub' WSubId_75 = "WSubId_75" .const 'Sub' Expected = "Expected" .const 'Sub' WSubId_134 = "WSubId_134" null $P1 __label_1: # do getattribute $P3, self, 'case_value' $P4 = WSubId_75(__ARG_1, self) push $P3, $P4 $P1 = __ARG_1.'get'() $P3 = $P1.'isop'(":") if $P3 goto __label_4 Expected("':' in case", $P1) __label_4: # endif root_new $P2, ['parrot';'ResizablePMCArray'] __label_6: # while $P1 = __ARG_1.'get'() $P3 = $P1.'isop'("}") if $P3 goto __label_8 $P3 = $P1.'iskeyword'("case") __label_8: if $P3 goto __label_7 $P3 = $P1.'iskeyword'("default") __label_7: if $P3 goto __label_5 __ARG_1.'unget'($P1) $P3 = WSubId_134(__ARG_1, self) push $P2, $P3 goto __label_6 __label_5: # endwhile getattribute $P3, self, 'case_st' push $P3, $P2 __label_3: # continue $P3 = $P1.'iskeyword'("case") if_null $P3, __label_2 if $P3 goto __label_1 __label_2: # enddo $P3 = $P1.'iskeyword'("default") if_null $P3, __label_9 unless $P3 goto __label_9 self.'parse_default'(__ARG_1) __label_9: # endif .end # parse_cases .sub 'parse_default' :method .param pmc __ARG_1 .const 'Sub' Expected = "Expected" .const 'Sub' SyntaxError = "SyntaxError" .const 'Sub' WSubId_134 = "WSubId_134" $P1 = __ARG_1.'get'() $P2 = $P1.'isop'(":") if $P2 goto __label_1 Expected("':' in default", $P1) __label_1: # endif __label_3: # while $P1 = __ARG_1.'get'() $P2 = $P1.'isop'("}") if $P2 goto __label_2 $P3 = $P1.'iskeyword'("case") if_null $P3, __label_4 unless $P3 goto __label_4 SyntaxError("case after default", $P1) __label_4: # endif $P2 = $P1.'iskeyword'("default") if_null $P2, __label_5 unless $P2 goto __label_5 SyntaxError("default after default", $P1) __label_5: # endif __ARG_1.'unget'($P1) getattribute $P2, self, 'default_st' $P3 = WSubId_134(__ARG_1, self) push $P2, $P3 goto __label_3 __label_2: # endwhile .end # parse_default .sub 'optimize_cases' :method getattribute $P1, self, 'case_value' if_null $P1, __label_2 elements $I1, $P1 goto __label_1 __label_2: null $I1 __label_1: null $I2 __label_5: # for condition ge $I2, $I1, __label_4 $P6 = $P1[$I2] $P5 = $P6.'optimize'() $P1[$I2] = $P5 __label_3: # for iteration inc $I2 goto __label_5 __label_4: # for end getattribute $P5, self, 'case_st' if_null $P5, __label_7 iter $P7, $P5 set $P7, 0 __label_6: # for iteration unless $P7 goto __label_7 shift $P2, $P7 set $P3, $P2 if_null $P3, __label_9 elements $I3, $P3 goto __label_8 __label_9: null $I3 __label_8: null $I4 __label_12: # for condition ge $I4, $I3, __label_11 $P6 = $P3[$I4] $P5 = $P6.'optimize'() $P3[$I4] = $P5 __label_10: # for iteration inc $I4 goto __label_12 __label_11: # for end goto __label_6 __label_7: # endfor getattribute $P4, self, 'default_st' if_null $P4, __label_14 elements $I5, $P4 goto __label_13 __label_14: null $I5 __label_13: null $I6 __label_17: # for condition ge $I6, $I5, __label_16 $P6 = $P4[$I6] $P5 = $P6.'optimize'() $P4[$I6] = $P5 __label_15: # for iteration inc $I6 goto __label_17 __label_16: # for end .end # optimize_cases .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'SwitchBaseStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Breakable' ] addparent $P0, $P1 get_class $P2, [ 'Winxed'; 'Compiler'; 'Statement' ] addparent $P0, $P2 addattribute $P0, 'case_value' addattribute $P0, 'case_st' addattribute $P0, 'default_st' .end .namespace [ 'Winxed'; 'Compiler'; 'SwitchStatement' ] .sub 'SwitchStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' WSubId_75 = "WSubId_75" .const 'Sub' Expected = "Expected" self.'SwitchBaseStatement'(__ARG_1, __ARG_3) $P3 = WSubId_75(__ARG_2, self) setattribute self, 'condition', $P3 $P1 = __ARG_2.'get'() $P2 = $P1.'isop'(")") if $P2 goto __label_1 Expected("')' in switch", $P1) __label_1: # endif $P1 = __ARG_2.'get'() $P2 = $P1.'isop'("{") if $P2 goto __label_2 Expected("'{' in switch", $P1) __label_2: # endif self.'parse_switchbody'(__ARG_2) .end # SwitchStatement .sub 'clone' :method .param pmc __ARG_1 new $P2, [ 'Winxed'; 'Compiler'; 'SwitchStatement' ] $P1 = self.'cloneswitchto'($P2, __ARG_1) getattribute $P4, self, 'condition' $P3 = $P4.'clone'($P1) setattribute $P1, 'condition', $P3 .return($P1) .end # clone .sub 'optimize' :method getattribute $P3, self, 'condition' $P2 = $P3.'optimize'() setattribute self, 'condition', $P2 self.'optimize_cases'() .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .const 'Sub' SyntaxError = "SyntaxError" .const 'Sub' sformat = "sformat" set $S1, "" getattribute $P21, self, 'case_value' if_null $P21, __label_2 iter $P22, $P21 set $P22, 0 __label_1: # for iteration unless $P22 goto __label_2 shift $P1, $P22 $P23 = $P1.'checkresult'() null $S2 if_null $P23, __label_3 set $S2, $P23 __label_3: ne $S2, "N", __label_4 SyntaxError("Invalid type in case", self) __label_4: # endif ne $S2, "S", __label_5 iseq $I4, $S1, "" if $I4 goto __label_7 iseq $I4, $S1, "char" __label_7: unless $I4 goto __label_6 $P21 = $P1.'isstringliteral'() unless $P21 goto __label_8 set $P2, $P1 $P21 = $P2.'getStringValue'() null $S3 if_null $P21, __label_10 set $S3, $P21 __label_10: set $S13, $S3 length $I5, $S13 ne $I5, 1, __label_8 set $S2, "char" goto __label_9 __label_8: # else set $S1, "S" __label_9: # endif __label_6: # endif __label_5: # endif ne $S1, "", __label_11 set $S1, $S2 goto __label_12 __label_11: # else eq $S1, $S2, __label_13 set $S1, "P" __label_13: # endif __label_12: # endif goto __label_1 __label_2: # endfor getattribute $P3, self, 'condition' $P4 = $P3.'checkresult'() ne $S1, "", __label_14 set $S1, $P4 __label_14: # endif $P21 = __ARG_1.'getDebug'() if_null $P21, __label_15 unless $P21 goto __label_15 __ARG_1.'comment'("switch") __label_15: # endif self.'annotate'(__ARG_1) $P21 = self.'genlabel'() null $S4 if_null $P21, __label_16 set $S4, $P21 __label_16: null $S5 ne $S1, "char", __label_17 isa $I4, $P3, [ 'Winxed'; 'Compiler'; 'CallBuiltinExpr' ] unless $I4 goto __label_19 getattribute $P23, $P3, 'builtin' $P21 = $P23.'name'() set $S14, $P21 ne $S14, "chr", __label_19 getattribute $P5, $P3, 'args' $P21 = $P5[0] getattribute $P6, $P21, 'arg' $P21 = $P6.'emit_getint'(__ARG_1) set $S5, $P21 goto __label_20 __label_19: # else null $S6 set $S14, $P4 eq $S14, "S", __label_21 $P21 = $P3.'emit_get'(__ARG_1) null $S7 if_null $P21, __label_23 set $S7, $P21 __label_23: $P21 = self.'tempreg'("S") set $S6, $P21 __ARG_1.'emitset'($S6, $S7) goto __label_22 __label_21: # else $P21 = $P3.'emit_get'(__ARG_1) set $S6, $P21 __label_22: # endif __ARG_1.'emitif_null'($S6, $S4) $P21 = self.'tempreg'("I") set $S5, $P21 __ARG_1.'emitarg2'("length", $S5, $S6) __ARG_1.'emitarg3'("ne", $S5, "1", $S4) __ARG_1.'emitarg2'("ord", $S5, $S6) __label_20: # endif goto __label_18 __label_17: # else set $S14, $P4 ne $S14, $S1, __label_24 $P21 = $P3.'emit_get'(__ARG_1) set $S5, $P21 goto __label_25 __label_24: # else $P23 = self.'tempreg'($S1) set $S5, $P23 $P21 = $P3.'emit_get'(__ARG_1) null $S8 if_null $P21, __label_26 set $S8, $P21 __label_26: __ARG_1.'emitset'($S5, $S8) __label_25: # endif __label_18: # endif self.'genbreaklabel'() new $P7, ['ResizableStringArray'] null $S9 eq $S1, "char", __label_27 self.'tempreg'($S1) __label_27: # endif getattribute $P21, self, 'case_value' if_null $P21, __label_29 iter $P24, $P21 set $P24, 0 __label_28: # for iteration unless $P24 goto __label_29 shift $P8, $P24 $P23 = self.'genlabel'() null $S10 if_null $P23, __label_30 set $S10, $P23 __label_30: push $P7, $S10 null $S11 ne $S1, "I", __label_31 $P21 = $P8.'emit_getint'(__ARG_1) set $S11, $P21 goto __label_32 __label_31: # else ne $S1, "char", __label_33 set $P9, $P8 $P21 = $P9.'getStringValue'() null $S12 if_null $P21, __label_35 set $S12, $P21 __label_35: set $S15, $S12 ord $I1, $S15 set $S11, $I1 goto __label_34 __label_33: # else $P21 = $P8.'checkresult'() set $S14, $P21 ne $S1, $S14, __label_36 $P23 = $P8.'emit_get'(__ARG_1) set $S11, $P23 goto __label_37 __label_36: # else $P8.'emit'(__ARG_1, $S9) set $S11, $S9 __label_37: # endif __label_34: # endif __label_32: # endif $P8.'annotate'(__ARG_1) $P21 = sformat(" if %0 == %1 goto %2", $S5, $S11, $S10) __ARG_1.'say'($P21) goto __label_28 __label_29: # endfor __ARG_1.'emitgoto'($S4) self.'annotate'(__ARG_1) getattribute $P10, self, 'case_st' set $I2, $P10 null $I3 __label_40: # for condition ge $I3, $I2, __label_39 $P21 = $P7[$I3] __ARG_1.'emitlabel'($P21, "case") set $P11, __ARG_1 $P12 = $P10[$I3] .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" set $P13, $P12 $P21 = bindmethod("emit") $P14 = bindlast($P21, $P11) if_null $P13, __label_42 iter $P25, $P13 set $P25, 0 __label_41: # for iteration unless $P25 goto __label_42 shift $P15, $P25 $P14($P15) goto __label_41 __label_42: # endfor __label_38: # for iteration inc $I3 goto __label_40 __label_39: # for end __ARG_1.'emitlabel'($S4, "default") set $P16, __ARG_1 getattribute $P17, self, 'default_st' .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" set $P18, $P17 $P21 = bindmethod("emit") $P19 = bindlast($P21, $P16) if_null $P18, __label_44 iter $P26, $P18 set $P26, 0 __label_43: # for iteration unless $P26 goto __label_44 shift $P20, $P26 $P19($P20) goto __label_43 __label_44: # endfor getattribute $P23, self, 'start' $P21 = self.'getbreaklabel'($P23) __ARG_1.'emitlabel'($P21, "switch end") .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'SwitchStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'SwitchBaseStatement' ] addparent $P0, $P1 addattribute $P0, 'condition' .end .namespace [ 'Winxed'; 'Compiler'; 'SwitchCaseStatement' ] .sub 'SwitchCaseStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'SwitchBaseStatement'(__ARG_1, __ARG_3) self.'parse_switchbody'(__ARG_2) .end # SwitchCaseStatement .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'SwitchCaseStatement' ] .tailcall self.'cloneswitchto'($P1, __ARG_1) .end # clone .sub 'optimize' :method self.'optimize_cases'() .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 self.'genbreaklabel'() $P14 = self.'genlabel'() null $S1 if_null $P14, __label_1 set $S1, $P14 __label_1: new $P1, ['ResizableStringArray'] $P14 = __ARG_1.'getDebug'() if_null $P14, __label_2 unless $P14 goto __label_2 __ARG_1.'comment'("switch-case") __label_2: # endif null $S2 getattribute $P14, self, 'case_value' if_null $P14, __label_4 iter $P15, $P14 set $P15, 0 __label_3: # for iteration unless $P15 goto __label_4 shift $P2, $P15 $P16 = self.'genlabel'() null $S3 if_null $P16, __label_5 set $S3, $P16 __label_5: push $P1, $S3 isa $I3, $P2, [ 'Winxed'; 'Compiler'; 'ConditionFriendlyIf' ] unless $I3 goto __label_6 $P2.'emit_if'(__ARG_1, $S3) goto __label_7 __label_6: # else null $S4 $P14 = $P2.'checkresult'() set $S5, $P14 ne $S5, "I", __label_8 $P16 = $P2.'emit_get'(__ARG_1) set $S4, $P16 goto __label_9 __label_8: # else $P17 = $P2.'emit_get'(__ARG_1) set $S4, $P17 unless_null $S2, __label_10 $P14 = self.'tempreg'("I") set $S2, $P14 __label_10: # endif __ARG_1.'emitset'($S2, $S4) set $S4, $S2 __label_9: # endif __ARG_1.'emitif'($S4, $S3) __label_7: # endif goto __label_3 __label_4: # endfor __ARG_1.'emitgoto'($S1) self.'annotate'(__ARG_1) getattribute $P3, self, 'case_st' set $I1, $P3 null $I2 __label_13: # for condition ge $I2, $I1, __label_12 $P14 = $P1[$I2] __ARG_1.'emitlabel'($P14, "case") set $P4, __ARG_1 $P5 = $P3[$I2] .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" set $P6, $P5 $P14 = bindmethod("emit") $P7 = bindlast($P14, $P4) if_null $P6, __label_15 iter $P18, $P6 set $P18, 0 __label_14: # for iteration unless $P18 goto __label_15 shift $P8, $P18 $P7($P8) goto __label_14 __label_15: # endfor __label_11: # for iteration inc $I2 goto __label_13 __label_12: # for end __ARG_1.'emitlabel'($S1, "default") set $P9, __ARG_1 getattribute $P10, self, 'default_st' .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" set $P11, $P10 $P14 = bindmethod("emit") $P12 = bindlast($P14, $P9) if_null $P11, __label_17 iter $P19, $P11 set $P19, 0 __label_16: # for iteration unless $P19 goto __label_17 shift $P13, $P19 $P12($P13) goto __label_16 __label_17: # endfor getattribute $P16, self, 'start' $P14 = self.'getbreaklabel'($P16) __ARG_1.'emitlabel'($P14, "switch end") .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'SwitchCaseStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'SwitchBaseStatement' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'parseSwitch' :subid('WSubId_90') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' Expected = "Expected" $P1 = __ARG_2.'get'() $P2 = $P1.'isop'("(") if_null $P2, __label_1 unless $P2 goto __label_1 new $P4, [ 'Winxed'; 'Compiler'; 'SwitchStatement' ] $P4.'SwitchStatement'(__ARG_1, __ARG_2, __ARG_3) set $P3, $P4 .return($P3) __label_1: # endif $P2 = $P1.'isop'("{") if_null $P2, __label_2 unless $P2 goto __label_2 new $P4, [ 'Winxed'; 'Compiler'; 'SwitchCaseStatement' ] $P4.'SwitchCaseStatement'(__ARG_1, __ARG_2, __ARG_3) set $P3, $P4 .return($P3) __label_2: # endif Expected("'(' in switch", $P1) .end # parseSwitch .namespace [ 'Winxed'; 'Compiler'; 'ForStatement' ] .sub 'ForStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' WSubId_134 = "WSubId_134" .const 'Sub' ExpectOp = "ExpectOp" .const 'Sub' parseListOrEmpty = "parseListOrEmpty" .const 'Sub' WSubId_75 = "WSubId_75" self.'BlockStatement'(__ARG_1, __ARG_3) $P1 = __ARG_2.'get'() $P2 = $P1.'isop'(";") if $P2 goto __label_1 __ARG_2.'unget'($P1) $P3 = WSubId_134(__ARG_2, self) setattribute self, 'initializer', $P3 __label_1: # endif $P1 = __ARG_2.'get'() $P2 = $P1.'isop'(";") if $P2 goto __label_2 __ARG_2.'unget'($P1) self.'parseconditionshort'(__ARG_2) ExpectOp(";", __ARG_2) __label_2: # endif $P3 = parseListOrEmpty(__ARG_2, self, WSubId_75, ")") setattribute self, 'iteration', $P3 self.'parsebody'(__ARG_2) .end # ForStatement .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'ForStatement' ] getattribute $P8, self, 'start' $P1.'BlockStatement'($P8, __ARG_1) getattribute $P8, self, 'initializer' if_null $P8, __label_1 getattribute $P11, self, 'initializer' $P10 = $P11.'clone'($P1) setattribute $P1, 'initializer', $P10 __label_1: # endif getattribute $P8, self, 'condexpr' if_null $P8, __label_2 getattribute $P11, self, 'condexpr' $P10 = $P11.'clone'($P1) setattribute $P1, 'condexpr', $P10 __label_2: # endif getattribute $P8, self, 'iteration' if_null $P8, __label_3 getattribute $P2, self, 'iteration' set $P3, $P1 .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" set $P4, $P2 root_new $P5, ['parrot';'ResizablePMCArray'] $P10 = bindmethod("clone") $P6 = bindlast($P10, $P3) if_null $P4, __label_5 iter $P13, $P4 set $P13, 0 __label_4: # for iteration unless $P13 goto __label_5 shift $P7, $P13 $P11 = $P6($P7) push $P5, $P11 goto __label_4 __label_5: # endfor set $P12, $P5 set $P8, $P12 setattribute $P1, 'iteration', $P8 __label_3: # endif getattribute $P10, self, 'body' $P9 = $P10.'clone'($P1) setattribute $P1, 'body', $P9 .return($P1) .end # clone .sub 'optimize' :method getattribute $P1, self, 'initializer' if_null $P1, __label_1 $P1 = $P1.'optimize'() setattribute self, 'initializer', $P1 __label_1: # endif getattribute $P3, self, 'condexpr' if_null $P3, __label_2 self.'optimize_condition'() $P3 = self.'getvalue'() set $I3, $P3 ne $I3, 2, __label_3 if_null $P1, __label_4 .return($P1) goto __label_5 __label_4: # else new $P4, [ 'Winxed'; 'Compiler'; 'EmptyStatement' ] .return($P4) __label_5: # endif __label_3: # endif __label_2: # endif getattribute $P2, self, 'iteration' if_null $P2, __label_7 elements $I1, $P2 goto __label_6 __label_7: null $I1 __label_6: null $I2 __label_10: # for condition ge $I2, $I1, __label_9 $P4 = $P2[$I2] $P3 = $P4.'optimize'() $P2[$I2] = $P3 __label_8: # for iteration inc $I2 goto __label_10 __label_9: # for end getattribute $P5, self, 'body' $P4 = $P5.'optimize'() setattribute self, 'body', $P4 .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 getattribute $P1, self, 'iteration' isnull $I1, $P1 not $I1 getattribute $P3, self, 'initializer' unless_null $P3, __label_1 getattribute $P4, self, 'condexpr' unless_null $P4, __label_1 if $I1 goto __label_1 self.'emit_infinite'(__ARG_1) .return() __label_1: # endif $P3 = __ARG_1.'getDebug'() if_null $P3, __label_2 unless $P3 goto __label_2 __ARG_1.'comment'("for loop") __label_2: # endif $P3 = self.'gencontinuelabel'() null $S1 if_null $P3, __label_3 set $S1, $P3 __label_3: $P3 = self.'genbreaklabel'() null $S2 if_null $P3, __label_4 set $S2, $P3 __label_4: unless $I1 goto __label_6 $S3 = self.'genlabel'() goto __label_5 __label_6: set $S3, $S1 __label_5: getattribute $P3, self, 'initializer' if_null $P3, __label_7 getattribute $P4, self, 'initializer' $P4.'emit'(__ARG_1) __label_7: # endif __ARG_1.'emitlabel'($S3, "for condition") getattribute $P3, self, 'condexpr' if_null $P3, __label_8 self.'emit_else'(__ARG_1, $S2) __label_8: # endif getattribute $P3, self, 'body' $P3.'emit'(__ARG_1) unless $I1 goto __label_9 __ARG_1.'emitlabel'($S1, "for iteration") if_null $P1, __label_11 iter $P5, $P1 set $P5, 0 __label_10: # for iteration unless $P5 goto __label_11 shift $P2, $P5 $P2.'emit_void'(__ARG_1) goto __label_10 __label_11: # endfor __label_9: # endif __ARG_1.'emitgoto'($S3) __ARG_1.'emitlabel'($S2, "for end") .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ForStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'LoopStatement' ] addparent $P0, $P1 get_class $P2, [ 'Winxed'; 'Compiler'; 'BlockStatement' ] addparent $P0, $P2 get_class $P3, [ 'Winxed'; 'Compiler'; 'ConditionalStatement' ] addparent $P0, $P3 addattribute $P0, 'initializer' addattribute $P0, 'iteration' .end .namespace [ 'Winxed'; 'Compiler'; 'ForeachStatement' ] .sub 'ForeachStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 .param string __ARG_5 .const 'Sub' WSubId_75 = "WSubId_75" .const 'Sub' ExpectOp = "ExpectOp" self.'BlockStatement'(__ARG_1, __ARG_3) eq __ARG_5, "", __label_1 box $P1, __ARG_5 setattribute self, 'deftype', $P1 __label_1: # endif setattribute self, 'varname', __ARG_4 $P2 = WSubId_75(__ARG_2, self) setattribute self, 'container', $P2 ExpectOp(")", __ARG_2) self.'parsebody'(__ARG_2) .end # ForeachStatement .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'ForeachStatement' ] getattribute $P4, self, 'start' $P1.'BlockStatement'($P4, __ARG_1) getattribute $P2, self, 'deftype' getattribute $P3, self, 'varname' setattribute $P1, 'deftype', $P2 setattribute $P1, 'varname', $P3 getattribute $P6, self, 'container' $P5 = $P6.'clone'($P1) setattribute $P1, 'container', $P5 getattribute $P6, self, 'body' $P5 = $P6.'clone'($P1) setattribute $P1, 'body', $P5 .return($P1) .end # clone .sub 'optimize' :method getattribute $P1, self, 'deftype' if_null $P1, __label_1 getattribute $P3, self, 'varname' self.'createvar'($P3, $P1) __label_1: # endif getattribute $P3, self, 'container' $P2 = $P3.'optimize'() $P3 = $P2.'isnull'() if $P3 goto __label_3 $P3 = $P2.'isstringliteral'() unless $P3 goto __label_4 $P4 = $P2.'getStringValue'() set $S1, $P4 length $I2, $S1 iseq $I1, $I2, 0 box $P3, $I1 __label_4: __label_3: if_null $P3, __label_2 unless $P3 goto __label_2 new $P5, [ 'Winxed'; 'Compiler'; 'EmptyStatement' ] .return($P5) __label_2: # endif setattribute self, 'container', $P2 getattribute $P5, self, 'body' $P4 = $P5.'optimize'() setattribute self, 'body', $P4 .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .const 'Sub' WSubId_102 = "WSubId_102" self.'annotate'(__ARG_1) null $S1 getattribute $P3, self, 'container' $P2 = $P3.'checkresult'() set $S6, $P2 ne $S6, "S", __label_1 getattribute $P5, self, 'container' $P4 = $P5.'emit_get'(__ARG_1) null $S2 if_null $P4, __label_3 set $S2, $P4 __label_3: $P2 = self.'tempreg'("P") set $S1, $P2 __ARG_1.'emitbox'($S1, $S2) goto __label_2 __label_1: # else getattribute $P3, self, 'container' $P2 = $P3.'emit_get'(__ARG_1) set $S1, $P2 __label_2: # endif getattribute $P2, self, 'varname' $P1 = self.'getvar'($P2) unless_null $P1, __label_4 getattribute $P2, self, 'varname' WSubId_102($P2, self) __label_4: # endif $P2 = self.'createreg'("P") null $S3 if_null $P2, __label_5 set $S3, $P2 __label_5: $P2 = self.'gencontinuelabel'() null $S4 if_null $P2, __label_6 set $S4, $P2 __label_6: $P2 = self.'genbreaklabel'() null $S5 if_null $P2, __label_7 set $S5, $P2 __label_7: __ARG_1.'emitif_null'($S1, $S5) __ARG_1.'emitarg2'("iter", $S3, $S1) __ARG_1.'emitset'($S3, "0") __ARG_1.'emitlabel'($S4, "for iteration") __ARG_1.'emitunless'($S3, $S5) $P2 = $P1.'getreg'() __ARG_1.'emitarg2'("shift", $P2, $S3) getattribute $P2, self, 'body' $P2.'emit'(__ARG_1) __ARG_1.'emitgoto'($S4) __ARG_1.'emitlabel'($S5, "endfor") .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ForeachStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'LoopStatement' ] addparent $P0, $P1 get_class $P2, [ 'Winxed'; 'Compiler'; 'BlockStatement' ] addparent $P0, $P2 addattribute $P0, 'deftype' addattribute $P0, 'varname' addattribute $P0, 'container' .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'parseFor' :subid('WSubId_91') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' ExpectOp = "ExpectOp" .const 'Sub' WSubId_136 = "WSubId_136" ExpectOp("(", __ARG_2) $P1 = __ARG_2.'get'() $P4 = $P1.'isidentifier'() if_null $P4, __label_1 unless $P4 goto __label_1 $P2 = __ARG_2.'get'() $P4 = $P2.'isidentifier'() if_null $P4, __label_2 unless $P4 goto __label_2 $P5 = $P2.'iskeyword'("in") if_null $P5, __label_3 unless $P5 goto __label_3 new $P7, [ 'Winxed'; 'Compiler'; 'ForeachStatement' ] $P7.'ForeachStatement'(__ARG_1, __ARG_2, __ARG_3, $P1, "") set $P6, $P7 .return($P6) goto __label_4 __label_3: # else $P3 = __ARG_2.'get'() $P5 = $P1.'getidentifier'() $P4 = WSubId_136($P5) null $S1 if_null $P4, __label_5 set $S1, $P4 __label_5: $P4 = $P3.'iskeyword'("in") unless $P4 goto __label_6 eq $S1, "", __label_6 new $P6, [ 'Winxed'; 'Compiler'; 'ForeachStatement' ] $P6.'ForeachStatement'(__ARG_1, __ARG_2, __ARG_3, $P2, $S1) set $P5, $P6 .return($P5) __label_6: # endif __ARG_2.'unget'($P3) __label_4: # endif __label_2: # endif __ARG_2.'unget'($P2) __label_1: # endif __ARG_2.'unget'($P1) new $P5, [ 'Winxed'; 'Compiler'; 'ForStatement' ] $P5.'ForStatement'(__ARG_1, __ARG_2, __ARG_3) set $P4, $P5 .return($P4) .end # parseFor .namespace [ 'Winxed'; 'Compiler'; 'ThrowStatement' ] .sub 'ThrowStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' WSubId_75 = "WSubId_75" self.'Statement'(__ARG_1, __ARG_3) $P2 = WSubId_75(__ARG_2, self) setattribute self, 'excep', $P2 .end # ThrowStatement .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'ThrowStatement' ] getattribute $P2, self, 'start' $P1.'Statement'($P2, __ARG_1) getattribute $P4, self, 'excep' $P3 = $P4.'clone'(__ARG_1) setattribute $P1, 'excep', $P3 .return($P1) .end # clone .sub 'optimize' :method getattribute $P3, self, 'excep' $P2 = $P3.'optimize'() setattribute self, 'excep', $P2 .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .const 'Sub' sformat = "sformat" .const 'Sub' SyntaxError = "SyntaxError" getattribute $P1, self, 'excep' $P2 = $P1.'emit_get'(__ARG_1) null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: self.'annotate'(__ARG_1) $P2 = $P1.'checkresult'() set $S3, $P2 if_null $S3, __label_2 length $I1, $S3 ne $I1, 1, __label_2 ord $I1, $S3 if $I1 == 80 goto __label_4 if $I1 == 83 goto __label_5 goto __label_2 __label_4: # case goto __label_3 # break __label_5: # case set $S2, $S1 $P3 = self.'tempreg'("P") set $S1, $P3 $P4 = sformat(" root_new %0, ['parrot';'Exception']\n %0['message'] = %1\n", $S1, $S2) __ARG_1.'print'($P4) goto __label_3 # break __label_2: # default SyntaxError("Invalid throw argument", self) __label_3: # switch end __ARG_1.'emitarg1'("throw", $S1) .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ThrowStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Statement' ] addparent $P0, $P1 addattribute $P0, 'excep' .end .namespace [ 'Winxed'; 'Compiler'; 'TryModifierList' ] .sub 'TryModifierList' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 setattribute self, 'start', __ARG_1 self.'ModifierList'(__ARG_2, __ARG_3) .end # TryModifierList .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'TryModifierList' ] getattribute $P3, self, 'start' setattribute $P1, 'start', $P3 $P3 = self.'clonemodifiers'(__ARG_1) setattribute $P1, 'list', $P3 .return($P1) .end # clone .sub 'allowtailcall' :method $P1 = self.'pick'("allowtailcall") isnull $I1, $P1 not $I1 .return($I1) .end # allowtailcall .sub 'emitmodifiers' :method .param pmc __ARG_1 .param string __ARG_2 .const 'Sub' SyntaxError = "SyntaxError" .const 'Sub' sformat = "sformat" $P1 = self.'getlist'() if_null $P1, __label_2 iter $P6, $P1 set $P6, 0 __label_1: # for iteration unless $P6 goto __label_2 shift $P2, $P6 $P7 = $P2.'getname'() null $S1 if_null $P7, __label_3 set $S1, $P7 __label_3: $P7 = $P2.'numargs'() set $I1, $P7 if $S1 == "min_severity" goto __label_6 if $S1 == "max_severity" goto __label_7 if $S1 == "handle_types" goto __label_8 if $S1 == "handle_types_except" goto __label_9 if $S1 == "allowtailcall" goto __label_10 goto __label_4 __label_6: # case __label_7: # case eq $I1, 1, __label_11 SyntaxError("Wrong modifier args", self) __label_11: # endif $P3 = $P2.'getarg'(0) $P8 = $P3.'emit_get'(__ARG_1) $P7 = sformat(" %0.'%1'(%2)", __ARG_2, $S1, $P8) __ARG_1.'say'($P7) goto __label_5 # break __label_8: # case __label_9: # case new $P4, ['ResizableStringArray'] null $I2 __label_14: # for condition ge $I2, $I1, __label_13 $P5 = $P2.'getarg'($I2) $P7 = $P5.'emit_get'(__ARG_1) push $P4, $P7 __label_12: # for iteration inc $I2 goto __label_14 __label_13: # for end join $S2, ", ", $P4 $P7 = sformat(" %0.'%1'(%2)", __ARG_2, $S1, $S2) __ARG_1.'say'($P7) goto __label_5 # break __label_10: # case goto __label_5 # break __label_4: # default concat $S3, "Modifier '", $S1 concat $S3, $S3, "' not valid for try" getattribute $P8, self, 'start' SyntaxError($S3, $P8) __label_5: # switch end goto __label_1 __label_2: # endfor .end # emitmodifiers .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'TryModifierList' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'ModifierList' ] addparent $P0, $P1 addattribute $P0, 'start' .end .namespace [ 'Winxed'; 'Compiler'; 'TryStatement' ] .sub 'TryStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' WSubId_134 = "WSubId_134" .const 'Sub' WSubId_29 = "WSubId_29" .const 'Sub' Expected = "Expected" .const 'Sub' RequireIdentifier = "RequireIdentifier" self.'BlockStatement'(__ARG_1, __ARG_3) $P1 = __ARG_2.'get'() $P2 = $P1.'isop'("[") if_null $P2, __label_1 unless $P2 goto __label_1 new $P5, [ 'Winxed'; 'Compiler'; 'TryModifierList' ] $P5.'TryModifierList'($P1, __ARG_2, self) set $P4, $P5 setattribute self, 'modifiers', $P4 goto __label_2 __label_1: # else __ARG_2.'unget'($P1) __label_2: # endif $P3 = WSubId_134(__ARG_2, self) setattribute self, 'stry', $P3 $P1 = __ARG_2.'get'() $P2 = $P1.'iskeyword'("catch") if $P2 goto __label_3 WSubId_29("catch", $P1) __label_3: # endif $P1 = __ARG_2.'get'() $P2 = $P1.'isop'("(") if $P2 goto __label_4 Expected("'(' after 'catch'", $P1) __label_4: # endif $P1 = __ARG_2.'get'() $P2 = $P1.'isop'(")") if $P2 goto __label_5 RequireIdentifier($P1) setattribute self, 'exname', $P1 $P1 = __ARG_2.'get'() $P2 = $P1.'isop'(")") if $P2 goto __label_6 Expected("')' in 'catch'", $P1) __label_6: # endif __label_5: # endif $P3 = WSubId_134(__ARG_2, self) setattribute self, 'scatch', $P3 .end # TryStatement .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'TryStatement' ] getattribute $P2, self, 'start' $P1.'BlockStatement'($P2, __ARG_1) getattribute $P2, self, 'modifiers' if_null $P2, __label_1 getattribute $P5, self, 'modifiers' $P4 = $P5.'clone'($P1) setattribute $P1, 'modifiers', $P4 __label_1: # endif getattribute $P2, self, 'exname' if_null $P2, __label_2 getattribute $P4, self, 'exname' setattribute $P1, 'exname', $P4 __label_2: # endif getattribute $P4, self, 'stry' $P3 = $P4.'clone'($P1) setattribute $P1, 'stry', $P3 getattribute $P4, self, 'scatch' $P3 = $P4.'clone'($P1) setattribute $P1, 'scatch', $P3 .return($P1) .end # clone .sub 'allowtailcall' :method getattribute $P1, self, 'modifiers' if_null $P1, __label_1 getattribute $P2, self, 'modifiers' .tailcall $P2.'allowtailcall'() goto __label_2 __label_1: # else .return(0) __label_2: # endif .end # allowtailcall .sub 'optimize' :method getattribute $P1, self, 'modifiers' if_null $P1, __label_1 getattribute $P2, self, 'modifiers' $P2.'optimize'() __label_1: # endif getattribute $P3, self, 'stry' $P2 = $P3.'optimize'() setattribute self, 'stry', $P2 getattribute $P1, self, 'exname' if_null $P1, __label_2 getattribute $P2, self, 'exname' self.'createvar'($P2, "P") __label_2: # endif getattribute $P3, self, 'scatch' $P2 = $P3.'optimize'() setattribute self, 'scatch', $P2 .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .const 'Sub' sformat = "sformat" $P1 = self.'tempreg'("P") null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: $P1 = self.'genlabel'() null $S2 if_null $P1, __label_2 set $S2, $P1 __label_2: $P1 = self.'genlabel'() null $S3 if_null $P1, __label_3 set $S3, $P1 __label_3: getattribute $P2, self, 'exname' if_null $P2, __label_5 getattribute $P4, self, 'exname' $P3 = self.'getvar'($P4) $P1 = $P3.'getreg'() goto __label_4 __label_5: $P5 = self.'tempreg'("P") set $P1, $P5 __label_4: null $S4 if_null $P1, __label_6 set $S4, $P1 __label_6: $P1 = __ARG_1.'getDebug'() set $I1, $P1 self.'annotate'(__ARG_1) unless $I1 goto __label_7 __ARG_1.'comment'("try: create handler") __label_7: # endif $P1 = sformat(" new %0, 'ExceptionHandler'\n set_label %0, %1\n", $S1, $S2) __ARG_1.'print'($P1) getattribute $P1, self, 'modifiers' if_null $P1, __label_8 getattribute $P2, self, 'modifiers' $P2.'emitmodifiers'(__ARG_1, $S1) __label_8: # endif __ARG_1.'emitarg1'("push_eh", $S1) unless $I1 goto __label_9 __ARG_1.'comment'("try: begin") __label_9: # endif getattribute $P1, self, 'stry' $P1.'emit'(__ARG_1) unless $I1 goto __label_10 __ARG_1.'comment'("try: end") __label_10: # endif __ARG_1.'say'(" ", "pop_eh") self.'annotate'(__ARG_1) __ARG_1.'emitgoto'($S3) unless $I1 goto __label_11 __ARG_1.'comment'("catch") __label_11: # endif __ARG_1.'emitlabel'($S2) __ARG_1.'say'(" ", ".get_results(", $S4, ")") __ARG_1.'emitarg1'("finalize", $S4) __ARG_1.'say'(" ", "pop_eh") getattribute $P1, self, 'scatch' $P1.'emit'(__ARG_1) unless $I1 goto __label_12 __ARG_1.'comment'("catch end") __label_12: # endif __ARG_1.'emitlabel'($S3) .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'TryStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'BlockStatement' ] addparent $P0, $P1 addattribute $P0, 'stry' addattribute $P0, 'modifiers' addattribute $P0, 'exname' addattribute $P0, 'scatch' .end .namespace [ 'Winxed'; 'Compiler'; 'DeclarationModifierList' ] .sub 'DeclarationModifierList' :method .param pmc __ARG_1 .param pmc __ARG_2 self.'ModifierList'(__ARG_1, __ARG_2) .end # DeclarationModifierList .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'DeclarationModifierList' ] $P3 = self.'clonemodifiers'(__ARG_1) setattribute $P1, 'list', $P3 .return($P1) .end # clone .sub 'getlexicalname' :method .const 'Sub' SyntaxError = "SyntaxError" $P1 = self.'pick'("lexical") if_null $P1, __label_1 $P3 = $P1.'numargs'() set $I1, $P3 if $I1 == 0 goto __label_4 if $I1 == 1 goto __label_5 goto __label_2 __label_4: # case .return("") __label_5: # case $P2 = $P1.'getarg'(0) $P3 = $P2.'isstringliteral'() if $P3 goto __label_6 SyntaxError("Invalid lexical", self) __label_6: # endif .tailcall $P2.'getPirString'() __label_2: # default SyntaxError("invalid arguments in modifier", $P1) __label_3: # switch end __label_1: # endif null $P3 .return($P3) .end # getlexicalname .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'DeclarationModifierList' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'ModifierList' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'DeclareItem' ] .sub 'DeclareItem' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param string __ARG_4 .param int __ARG_5 self.'Statement'(__ARG_1, __ARG_2) setattribute self, 'name', __ARG_3 box $P1, __ARG_4 setattribute self, 'regtype', $P1 box $P1, __ARG_5 setattribute self, 'flags', $P1 .end # DeclareItem .sub 'parsemodifiers' :method .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' ExpectOp = "ExpectOp" ExpectOp("[", __ARG_2) new $P3, [ 'Winxed'; 'Compiler'; 'DeclarationModifierList' ] getattribute $P4, self, 'owner' $P3.'DeclarationModifierList'(__ARG_2, $P4) set $P2, $P3 setattribute self, 'modifiers', $P2 .end # parsemodifiers .sub 'optimizemodifiers' :method getattribute $P4, self, 'name' getattribute $P5, self, 'regtype' getattribute $P6, self, 'flags' $P1 = self.'createvar'($P4, $P5, $P6) $P5 = $P1.'getreg'() setattribute self, 'reg', $P5 getattribute $P2, self, 'modifiers' if_null $P2, __label_1 $P2.'optimize'() $P4 = $P2.'getlexicalname'() null $S1 if_null $P4, __label_2 set $S1, $P4 __label_2: if_null $S1, __label_3 ne $S1, "", __label_4 getattribute $P4, self, 'name' set $S1, $P4 __label_4: # endif getattribute $P4, self, 'name' $P3 = self.'getvar'($P4) $P3.'createlex'($S1) __label_3: # endif __label_1: # endif .end # optimizemodifiers .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'DeclareItem' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Statement' ] addparent $P0, $P1 addattribute $P0, 'name' addattribute $P0, 'regtype' addattribute $P0, 'reg' addattribute $P0, 'modifiers' addattribute $P0, 'flags' .end .namespace [ 'Winxed'; 'Compiler'; 'VarBaseStatement' ] .sub 'initvarbase' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param int __ARG_4 :optional self.'DeclareItem'(__ARG_1, __ARG_2, __ARG_3, "P", __ARG_4) .end # initvarbase .sub 'clonevarbase' :method .param pmc __ARG_1 .param pmc __ARG_2 getattribute $P1, __ARG_1, 'start' getattribute $P2, __ARG_1, 'name' getattribute $P3, __ARG_1, 'flags' self.'DeclareItem'($P1, __ARG_2, $P2, "P", $P3) .end # clonevarbase .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'VarBaseStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'DeclareItem' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'DeclareBase' ] .sub 'DeclareBase' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param string __ARG_4 .param string __ARG_5 self.'DeclareItem'(__ARG_1, __ARG_2, __ARG_3, __ARG_5, 0) box $P1, __ARG_4 setattribute self, 'basetype', $P1 .end # DeclareBase .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'DeclareBase' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'DeclareItem' ] addparent $P0, $P1 addattribute $P0, 'basetype' .end .namespace [ 'Winxed'; 'Compiler'; 'DeclareSingleStatement' ] .sub 'DeclareSingleStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param string __ARG_4 .param pmc __ARG_5 .const 'Sub' WSubId_75 = "WSubId_75" self.'DeclareBase'(__ARG_1, __ARG_2, __ARG_3, __ARG_4, __ARG_4) $P1 = __ARG_5.'get'() $P2 = $P1.'isop'(":") if_null $P2, __label_1 unless $P2 goto __label_1 self.'parsemodifiers'($P1, __ARG_5) $P1 = __ARG_5.'get'() __label_1: # endif $P2 = $P1.'isop'("=") if_null $P2, __label_2 unless $P2 goto __label_2 $P4 = WSubId_75(__ARG_5, self) setattribute self, 'init', $P4 goto __label_3 __label_2: # else __ARG_5.'unget'($P1) __label_3: # endif .end # DeclareSingleStatement .sub 'clonedeclare' :method .param pmc __ARG_1 .param pmc __ARG_2 getattribute $P1, self, 'start' getattribute $P2, self, 'name' getattribute $P3, self, 'basetype' getattribute $P4, self, 'regtype' __ARG_1.'DeclareBase'($P1, __ARG_2, $P2, $P3, $P4) getattribute $P1, self, 'init' if_null $P1, __label_1 getattribute $P4, self, 'init' $P3 = $P4.'clone'(__ARG_2) setattribute __ARG_1, 'init', $P3 __label_1: # endif .return(__ARG_1) .end # clonedeclare .sub 'optimize' :method self.'optimizemodifiers'() getattribute $P1, self, 'init' if_null $P1, __label_1 $P3 = $P1.'optimize'() setattribute self, 'init', $P3 __label_1: # endif .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .const 'Sub' InternalError = "InternalError" .const 'Sub' SyntaxError = "SyntaxError" self.'annotate'(__ARG_1) getattribute $P5, self, 'name' null $S1 if_null $P5, __label_1 set $S1, $P5 __label_1: getattribute $P5, self, 'reg' null $S2 if_null $P5, __label_2 set $S2, $P5 __label_2: null $S3 getattribute $P5, self, 'basetype' null $S4 if_null $P5, __label_3 set $S4, $P5 __label_3: getattribute $P1, self, 'init' $P5 = __ARG_1.'getDebug'() if_null $P5, __label_4 unless $P5 goto __label_4 __ARG_1.'comment'($S1, ": ", $S2) __label_4: # endif isnull $I2, $P1 box $P5, $I2 if $P5 goto __label_7 $P5 = $P1.'isnull'() __label_7: if_null $P5, __label_5 unless $P5 goto __label_5 __ARG_1.'emitnull'($S2) goto __label_6 __label_5: # else $P6 = $P1.'checkresult'() null $S5 if_null $P6, __label_8 set $S5, $P6 __label_8: ne $S5, $S4, __label_9 $P1.'emit_init'(__ARG_1, $S2) goto __label_10 __label_9: # else isa $I2, $P1, [ 'Winxed'; 'Compiler'; 'IndexExpr' ] unless $I2 goto __label_11 $P1.'emit'(__ARG_1, $S2) goto __label_12 __label_11: # else $P5 = $P1.'isliteral'() if_null $P5, __label_13 unless $P5 goto __label_13 if_null $S4, __label_15 length $I2, $S4 ne $I2, 1, __label_15 ord $I2, $S4 if $I2 == 73 goto __label_17 if $I2 == 78 goto __label_18 if $I2 == 83 goto __label_19 goto __label_15 __label_17: # case set $P2, $P1 $P5 = $P2.'getIntegerValue'() set $I1, $P5 set $I3, $I1 set $S3, $I3 __ARG_1.'emitset'($S2, $S3) goto __label_16 # break __label_18: # case set $P3, $P1 $P5 = $P3.'getFloatValue'() set $N1, $P5 set $N2, $N1 set $S3, $N2 __ARG_1.'emitset'($S2, $S3) goto __label_16 # break __label_19: # case set $P4, $P1 $P5 = $P4.'getStringValue'() null $S6 if_null $P5, __label_20 set $S6, $P5 __label_20: set $S3, $S6 __ARG_1.'emitset'($S2, $S3) goto __label_16 # break __label_15: # default InternalError("Wrong type", self) __label_16: # switch end goto __label_14 __label_13: # else if_null $S5, __label_21 length $I2, $S5 ne $I2, 1, __label_21 ord $I2, $S5 if $I2 == 118 goto __label_23 goto __label_21 __label_23: # case SyntaxError("Invalid initialization from void value", self) __label_21: # default $P5 = $P1.'emit_get'(__ARG_1) set $S3, $P5 __label_22: # switch end ne $S4, "S", __label_24 ne $S5, "P", __label_24 $P5 = self.'genlabel'() null $S7 if_null $P5, __label_26 set $S7, $P5 __label_26: __ARG_1.'emitnull'($S2) __ARG_1.'emitif_null'($S3, $S7) __ARG_1.'emitset'($S2, $S3) __ARG_1.'emitlabel'($S7) goto __label_25 __label_24: # else __ARG_1.'emitset'($S2, $S3) __label_25: # endif __label_14: # endif __label_12: # endif __label_10: # endif __label_6: # endif .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'DeclareSingleStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'DeclareBase' ] addparent $P0, $P1 addattribute $P0, 'init' .end .namespace [ 'Winxed'; 'Compiler'; 'DeclareArrayStatement' ] .sub 'DeclareArrayStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param string __ARG_4 .param string __ARG_5 .param pmc __ARG_6 .const 'Sub' WSubId_75 = "WSubId_75" .const 'Sub' ExpectOp = "ExpectOp" .const 'Sub' Expected = "Expected" .const 'Sub' parseListOrEmpty = "parseListOrEmpty" self.'DeclareBase'(__ARG_1, __ARG_2, __ARG_3, __ARG_4, "P") box $P2, __ARG_5 setattribute self, 'arraytype', $P2 $P1 = __ARG_6.'get'() $P2 = $P1.'isop'("]") if $P2 goto __label_1 __ARG_6.'unget'($P1) $P3 = WSubId_75(__ARG_6, self) setattribute self, 'size', $P3 ExpectOp("]", __ARG_6) __label_1: # endif $P1 = __ARG_6.'get'() $P2 = $P1.'isop'(":") if_null $P2, __label_2 unless $P2 goto __label_2 self.'parsemodifiers'($P1, __ARG_6) $P1 = __ARG_6.'get'() __label_2: # endif $P2 = $P1.'isop'("=") if_null $P2, __label_3 unless $P2 goto __label_3 $P1 = __ARG_6.'get'() $P2 = $P1.'isop'("[") if $P2 goto __label_5 Expected("array initializer", $P1) __label_5: # endif $P3 = parseListOrEmpty(__ARG_6, self, WSubId_75, "]") setattribute self, 'initarray', $P3 goto __label_4 __label_3: # else __ARG_6.'unget'($P1) __label_4: # endif .end # DeclareArrayStatement .sub 'clonedeclare' :method .param pmc __ARG_1 .param pmc __ARG_2 getattribute $P7, self, 'start' getattribute $P8, self, 'name' getattribute $P9, self, 'basetype' __ARG_1.'DeclareBase'($P7, __ARG_2, $P8, $P9, "P") getattribute $P8, self, 'arraytype' setattribute __ARG_1, 'arraytype', $P8 getattribute $P7, self, 'size' if_null $P7, __label_1 unless $P7 goto __label_1 getattribute $P10, self, 'size' $P9 = $P10.'clone'(__ARG_1) setattribute __ARG_1, 'size', $P9 __label_1: # endif getattribute $P7, self, 'initarray' if_null $P7, __label_2 getattribute $P1, self, 'initarray' set $P2, __ARG_2 .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" set $P3, $P1 root_new $P4, ['parrot';'ResizablePMCArray'] $P9 = bindmethod("clone") $P5 = bindlast($P9, $P2) if_null $P3, __label_4 iter $P12, $P3 set $P12, 0 __label_3: # for iteration unless $P12 goto __label_4 shift $P6, $P12 $P10 = $P5($P6) push $P4, $P10 goto __label_3 __label_4: # endfor set $P11, $P4 set $P7, $P11 setattribute __ARG_1, 'initarray', $P7 __label_2: # endif .return(__ARG_1) .end # clonedeclare .sub 'optimize' :method self.'optimizemodifiers'() getattribute $P2, self, 'size' if_null $P2, __label_1 getattribute $P5, self, 'size' $P4 = $P5.'optimize'() setattribute self, 'size', $P4 __label_1: # endif getattribute $P1, self, 'initarray' if_null $P1, __label_3 elements $I1, $P1 goto __label_2 __label_3: null $I1 __label_2: null $I2 __label_6: # for condition ge $I2, $I1, __label_5 $P3 = $P1[$I2] $P2 = $P3.'optimize'() $P1[$I2] = $P2 __label_4: # for iteration inc $I2 goto __label_6 __label_5: # for end .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .const 'Sub' sformat = "sformat" self.'annotate'(__ARG_1) getattribute $P6, self, 'reg' null $S1 if_null $P6, __label_1 set $S1, $P6 __label_1: getattribute $P1, self, 'size' getattribute $P2, self, 'initarray' getattribute $P3, self, 'basetype' getattribute $P4, self, 'arraytype' if_null $P1, __label_2 $P7 = $P1.'emit_get'(__ARG_1) $P6 = sformat(" new %0, ['Fixed%1Array'], %2", $S1, $P4, $P7) __ARG_1.'say'($P6) goto __label_3 __label_2: # else $P6 = sformat(" new %0, ['Resizable%1Array']", $S1, $P4) __ARG_1.'say'($P6) __label_3: # endif if_null $P2, __label_4 $P6 = self.'tempreg'($P3) null $S2 if_null $P6, __label_5 set $S2, $P6 __label_5: elements $I1, $P2 unless_null $P1, __label_6 unless $I1 goto __label_7 __ARG_1.'emitset'($S1, $I1) __label_7: # endif __label_6: # endif null $I2 if_null $P2, __label_9 iter $P8, $P2 set $P8, 0 __label_8: # for iteration unless $P8 goto __label_9 shift $P5, $P8 null $S3 $P6 = $P5.'isliteral'() if_null $P6, __label_10 unless $P6 goto __label_10 set $S5, $P3 if_null $S5, __label_12 length $I3, $S5 ne $I3, 1, __label_12 ord $I3, $S5 if $I3 == 73 goto __label_14 if $I3 == 78 goto __label_15 if $I3 == 83 goto __label_16 goto __label_12 __label_14: # case $P7 = $P5.'getIntegerValue'() set $S3, $P7 goto __label_13 # break __label_15: # case $P9 = $P5.'getFloatValue'() set $S3, $P9 goto __label_13 # break __label_16: # case $P10 = $P5.'isstringliteral'() if_null $P10, __label_17 unless $P10 goto __label_17 $P11 = $P5.'getPirString'() set $S3, $P11 goto __label_18 __label_17: # else $P12 = $P5.'getStringValue'() set $S4, $P12 concat $S6, "\"", $S4 concat $S6, $S6, "\"" set $S3, $S6 __label_18: # endif goto __label_13 # break __label_12: # default __label_13: # switch end goto __label_11 __label_10: # else $P5.'emit'(__ARG_1, $S2) set $S3, $S2 __label_11: # endif $P6 = sformat(" %0[%1] = %2", $S1, $I2, $S3) __ARG_1.'say'($P6) inc $I2 goto __label_8 __label_9: # endfor __label_4: # endif .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'DeclareArrayStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'DeclareBase' ] addparent $P0, $P1 addattribute $P0, 'size' addattribute $P0, 'initarray' addattribute $P0, 'arraytype' .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'parseDeclareHelper' :subid('WSubId_137') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 .param pmc __ARG_5 .const 'Sub' RequireIdentifier = "RequireIdentifier" .const 'Sub' bindlast1 = "bindlast1" null $P1 null $P2 __label_1: # do $P3 = __ARG_4.'get'() RequireIdentifier($P3) $P4 = __ARG_4.'get'() null $P5 $P8 = $P4.'isop'("[") if_null $P8, __label_4 unless $P8 goto __label_4 $P5 = __ARG_2(__ARG_3, __ARG_5, __ARG_4, $P3) goto __label_5 __label_4: # else __ARG_4.'unget'($P4) $P5 = __ARG_1(__ARG_3, __ARG_5, $P3, __ARG_4) __label_5: # endif set $P6, $P2 set $P7, $P5 if_null $P6, __label_8 isa $I1, $P6, [ 'Winxed'; 'Compiler'; 'MultiStatement' ] if $I1 goto __label_9 goto __label_7 __label_8: # case set $P2, $P7 goto __label_10 __label_9: # case $P2 = $P6.'push'($P7) goto __label_10 __label_7: # default new $P8, [ 'Winxed'; 'Compiler'; 'MultiStatement' ] $P8.'MultiStatement'($P6, $P7) set $P2, $P8 goto __label_10 __label_6: # switch end __label_10: $P1 = __ARG_4.'get'() __label_3: # continue $P8 = $P1.'isop'(",") if_null $P8, __label_2 if $P8 goto __label_1 __label_2: # enddo bindlast1(";", $P1) .return($P2) .end # parseDeclareHelper .namespace [ 'Winxed'; 'Compiler'; 'IntStatement' ] .sub 'IntStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'DeclareSingleStatement'(__ARG_1, __ARG_2, __ARG_3, "I", __ARG_4) .end # IntStatement .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'IntStatement' ] .tailcall self.'clonedeclare'($P1, __ARG_1) .end # clone .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'IntStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'DeclareSingleStatement' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'IntArrayStatement' ] .sub 'IntArrayStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'DeclareArrayStatement'(__ARG_1, __ARG_2, __ARG_3, "I", "Integer", __ARG_4) .end # IntArrayStatement .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'IntArrayStatement' ] .tailcall self.'clonedeclare'($P1, __ARG_1) .end # clone .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'IntArrayStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'DeclareArrayStatement' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'newIntSingle' :subid('WSubId_138') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 new $P2, [ 'Winxed'; 'Compiler'; 'IntStatement' ] $P2.'IntStatement'(__ARG_1, __ARG_2, __ARG_3, __ARG_4) set $P1, $P2 .return($P1) .end # newIntSingle .sub 'newIntArray' :subid('WSubId_139') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 new $P2, [ 'Winxed'; 'Compiler'; 'IntArrayStatement' ] $P2.'IntArrayStatement'(__ARG_1, __ARG_2, __ARG_4, __ARG_3) set $P1, $P2 .return($P1) .end # newIntArray .sub 'parseInt' :subid('WSubId_86') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' WSubId_137 = "WSubId_137" .const 'Sub' WSubId_138 = "WSubId_138" .const 'Sub' WSubId_139 = "WSubId_139" .tailcall WSubId_137(WSubId_138, WSubId_139, __ARG_1, __ARG_2, __ARG_3) .end # parseInt .namespace [ 'Winxed'; 'Compiler'; 'FloatStatement' ] .sub 'FloatStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'DeclareSingleStatement'(__ARG_1, __ARG_2, __ARG_3, "N", __ARG_4) .end # FloatStatement .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'FloatStatement' ] .tailcall self.'clonedeclare'($P1, __ARG_1) .end # clone .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'FloatStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'DeclareSingleStatement' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'FloatArrayStatement' ] .sub 'FloatArrayStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'DeclareArrayStatement'(__ARG_1, __ARG_2, __ARG_3, "N", "Float", __ARG_4) .end # FloatArrayStatement .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'FloatArrayStatement' ] .tailcall self.'clonedeclare'($P1, __ARG_1) .end # clone .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'FloatArrayStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'DeclareArrayStatement' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'newFloatSingle' :subid('WSubId_140') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 new $P2, [ 'Winxed'; 'Compiler'; 'FloatStatement' ] $P2.'FloatStatement'(__ARG_1, __ARG_2, __ARG_3, __ARG_4) set $P1, $P2 .return($P1) .end # newFloatSingle .sub 'newFloatArray' :subid('WSubId_141') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 new $P2, [ 'Winxed'; 'Compiler'; 'FloatArrayStatement' ] $P2.'FloatArrayStatement'(__ARG_1, __ARG_2, __ARG_4, __ARG_3) set $P1, $P2 .return($P1) .end # newFloatArray .sub 'parseFloat' :subid('WSubId_87') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' WSubId_137 = "WSubId_137" .const 'Sub' WSubId_140 = "WSubId_140" .const 'Sub' WSubId_141 = "WSubId_141" .tailcall WSubId_137(WSubId_140, WSubId_141, __ARG_1, __ARG_2, __ARG_3) .end # parseFloat .namespace [ 'Winxed'; 'Compiler'; 'StringStatement' ] .sub 'StringStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'DeclareSingleStatement'(__ARG_1, __ARG_2, __ARG_3, "S", __ARG_4) .end # StringStatement .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'StringStatement' ] .tailcall self.'clonedeclare'($P1, __ARG_1) .end # clone .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'StringStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'DeclareSingleStatement' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'StringArrayStatement' ] .sub 'StringArrayStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'DeclareArrayStatement'(__ARG_1, __ARG_2, __ARG_3, "S", "String", __ARG_4) .end # StringArrayStatement .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'StringArrayStatement' ] .tailcall self.'clonedeclare'($P1, __ARG_1) .end # clone .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'StringArrayStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'DeclareArrayStatement' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'newStringSingle' :subid('WSubId_142') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 new $P2, [ 'Winxed'; 'Compiler'; 'StringStatement' ] $P2.'StringStatement'(__ARG_1, __ARG_2, __ARG_3, __ARG_4) set $P1, $P2 .return($P1) .end # newStringSingle .sub 'newStringArray' :subid('WSubId_143') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 new $P2, [ 'Winxed'; 'Compiler'; 'StringArrayStatement' ] $P2.'StringArrayStatement'(__ARG_1, __ARG_2, __ARG_4, __ARG_3) set $P1, $P2 .return($P1) .end # newStringArray .sub 'parseString' :subid('WSubId_85') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' WSubId_137 = "WSubId_137" .const 'Sub' WSubId_142 = "WSubId_142" .const 'Sub' WSubId_143 = "WSubId_143" .tailcall WSubId_137(WSubId_142, WSubId_143, __ARG_1, __ARG_2, __ARG_3) .end # parseString .namespace [ 'Winxed'; 'Compiler'; 'ConstStatement' ] .sub 'ConstStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param string __ARG_4 .const 'Sub' WSubId_75 = "WSubId_75" self.'Statement'(__ARG_1, __ARG_3) box $P1, __ARG_4 setattribute self, 'type', $P1 setattribute self, 'name', __ARG_1 $P2 = WSubId_75(__ARG_2, self) setattribute self, 'value', $P2 $P2 = self.'createconst'(__ARG_1, __ARG_4) setattribute self, 'data', $P2 .end # ConstStatement .sub 'optimize' :method .const 'Sub' SyntaxError = "SyntaxError" .const 'Sub' InternalError = "InternalError" getattribute $P1, self, 'value' $P1 = $P1.'optimize'() $P2 = $P1.'hascompilevalue'() if $P2 goto __label_1 SyntaxError("Value for const is not evaluable at compile time", self) __label_1: # endif getattribute $P2, self, 'type' set $S1, $P2 if_null $S1, __label_2 length $I1, $S1 ne $I1, 1, __label_2 ord $I1, $S1 if $I1 == 73 goto __label_4 if $I1 == 78 goto __label_5 if $I1 == 83 goto __label_6 goto __label_2 __label_4: # case $P1 = $P1.'getLiteralInteger'() goto __label_3 # break __label_5: # case $P1 = $P1.'getLiteralFloat'() goto __label_3 # break __label_6: # case $P1 = $P1.'getLiteralString'() goto __label_3 # break __label_2: # default getattribute $P3, self, 'start' InternalError("Wrong const", $P3) __label_3: # switch end getattribute $P2, self, 'data' $P2.'setvalue'($P1) .return(self) .end # optimize .sub 'checkresult' :method .const 'Sub' InternalError = "InternalError" getattribute $P1, self, 'start' InternalError("Direct use of const", $P1) .end # checkresult .sub 'emit' :method .param pmc __ARG_1 $P2 = __ARG_1.'getDebug'() if_null $P2, __label_1 unless $P2 goto __label_1 getattribute $P3, self, 'data' $P1 = $P3.'getvalue'() null $S1 getattribute $P2, self, 'type' set $S2, $P2 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 if $I1 == 83 goto __label_6 goto __label_2 __label_4: # case $P3 = $P1.'getIntegerValue'() set $S1, $P3 goto __label_3 # break __label_5: # case $P4 = $P1.'getFloatValue'() set $S1, $P4 goto __label_3 # break __label_6: # case $P5 = $P1.'getPirString'() set $S1, $P5 goto __label_3 # break __label_2: # default __label_3: # switch end getattribute $P2, self, 'name' __ARG_1.'comment'("Constant '", $P2, "' set to: ", $S1) __label_1: # endif .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ConstStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Statement' ] addparent $P0, $P1 addattribute $P0, 'type' addattribute $P0, 'name' addattribute $P0, 'data' addattribute $P0, 'value' .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'parseConst' :subid('WSubId_82') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' WSubId_136 = "WSubId_136" .const 'Sub' SyntaxError = "SyntaxError" .const 'Sub' RequireIdentifier = "RequireIdentifier" .const 'Sub' ExpectOp = "ExpectOp" .const 'Sub' bindlast1 = "bindlast1" $P1 = __ARG_2.'get'() $P7 = $P1.'isidentifier'() if_null $P7, __label_2 unless $P7 goto __label_2 $P8 = $P1.'getidentifier'() $P6 = WSubId_136($P8) goto __label_1 __label_2: box $P6, "" __label_1: null $S1 if_null $P6, __label_3 set $S1, $P6 __label_3: eq $S1, "I", __label_4 eq $S1, "N", __label_4 eq $S1, "S", __label_4 SyntaxError("Invalid type for const", $P1) __label_4: # endif null $P2 __label_5: # do $P3 = __ARG_2.'get'() RequireIdentifier($P3) ExpectOp("=", __ARG_2) set $P4, $P2 new $P6, [ 'Winxed'; 'Compiler'; 'ConstStatement' ] $P6.'ConstStatement'($P3, __ARG_2, __ARG_3, $S1) set $P5, $P6 if_null $P4, __label_10 isa $I1, $P4, [ 'Winxed'; 'Compiler'; 'MultiStatement' ] if $I1 goto __label_11 goto __label_9 __label_10: # case set $P2, $P5 goto __label_12 __label_11: # case $P2 = $P4.'push'($P5) goto __label_12 __label_9: # default new $P7, [ 'Winxed'; 'Compiler'; 'MultiStatement' ] $P7.'MultiStatement'($P4, $P5) set $P2, $P7 goto __label_12 __label_8: # switch end __label_12: __label_7: # continue $P1 = __ARG_2.'get'() $P6 = $P1.'isop'(",") if_null $P6, __label_6 if $P6 goto __label_5 __label_6: # enddo bindlast1(";", $P1) .return($P2) .end # parseConst .namespace [ 'Winxed'; 'Compiler'; 'VarStatement' ] .sub 'VarStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 .param int __ARG_5 .const 'Sub' WSubId_75 = "WSubId_75" .const 'Sub' bindlast1 = "bindlast1" self.'initvarbase'(__ARG_1, __ARG_3, __ARG_4, __ARG_5) $P1 = __ARG_2.'get'() $P2 = $P1.'isop'(":") if_null $P2, __label_1 unless $P2 goto __label_1 self.'parsemodifiers'($P1, __ARG_2) $P1 = __ARG_2.'get'() __label_1: # endif $P2 = $P1.'isop'("=") if_null $P2, __label_2 unless $P2 goto __label_2 $P4 = WSubId_75(__ARG_2, self) setattribute self, 'init', $P4 $P1 = __ARG_2.'get'() __label_2: # endif bindlast1(";", $P1) .end # VarStatement .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'VarStatement' ] $P1.'clonevarbase'(self, __ARG_1) getattribute $P2, self, 'init' if_null $P2, __label_1 getattribute $P5, self, 'init' $P4 = $P5.'clone'($P1) setattribute $P1, 'init', $P4 __label_1: # endif getattribute $P2, self, 'modifiers' if_null $P2, __label_2 getattribute $P5, self, 'modifiers' $P4 = $P5.'clone'($P1) setattribute $P1, 'modifiers', $P4 __label_2: # endif .return($P1) .end # clone .sub 'optimize_init' :method getattribute $P1, self, 'init' if_null $P1, __label_1 getattribute $P4, self, 'init' $P3 = $P4.'optimize'() setattribute self, 'init', $P3 __label_1: # endif .return(self) .end # optimize_init .sub 'optimize' :method self.'optimizemodifiers'() .tailcall self.'optimize_init'() .end # optimize .sub 'emit' :method .param pmc __ARG_1 .const 'Sub' SyntaxError = "SyntaxError" self.'annotate'(__ARG_1) getattribute $P2, self, 'name' null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: getattribute $P2, self, 'reg' null $S2 if_null $P2, __label_2 set $S2, $P2 __label_2: getattribute $P1, self, 'init' $P2 = __ARG_1.'getDebug'() if_null $P2, __label_3 unless $P2 goto __label_3 __ARG_1.'comment'("var ", $S1, ": ", $S2) __label_3: # endif if_null $P1, __label_4 $P2 = $P1.'isnull'() if_null $P2, __label_5 unless $P2 goto __label_5 null $P1 __label_5: # endif __label_4: # endif if_null $P1, __label_6 $P2 = $P1.'checkresult'() set $S4, $P2 if_null $S4, __label_8 length $I1, $S4 ne $I1, 1, __label_8 ord $I1, $S4 if $I1 == 80 goto __label_10 if $I1 == 83 goto __label_11 if $I1 == 73 goto __label_12 if $I1 == 78 goto __label_13 if $I1 == 118 goto __label_14 goto __label_8 __label_10: # case $P1.'emit_init'(__ARG_1, $S2) goto __label_9 # break __label_11: # case __label_12: # case __label_13: # case $P3 = $P1.'emit_get'(__ARG_1) null $S3 if_null $P3, __label_15 set $S3, $P3 __label_15: __ARG_1.'emitbox'($S2, $S3) goto __label_9 # break __label_14: # case SyntaxError("Can't use void function as initializer", self) __label_8: # default SyntaxError("Invalid var initializer", self) __label_9: # switch end goto __label_7 __label_6: # else __ARG_1.'emitnull'($S2) __label_7: # endif .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'VarStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'VarBaseStatement' ] addparent $P0, $P1 addattribute $P0, 'init' .end .namespace [ 'Winxed'; 'Compiler'; 'ResizableVarStatement' ] .sub 'ResizableVarStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 .const 'Sub' ExpectOp = "ExpectOp" self.'initvarbase'(__ARG_1, __ARG_3, __ARG_4) ExpectOp(";", __ARG_2) .end # ResizableVarStatement .sub 'emit' :method .param pmc __ARG_1 .const 'Sub' sformat = "sformat" self.'annotate'(__ARG_1) getattribute $P1, self, 'reg' null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: $P1 = __ARG_1.'getDebug'() if_null $P1, __label_2 unless $P1 goto __label_2 getattribute $P3, self, 'name' $P2 = sformat("var %0[] : %1", $P3, $S1) __ARG_1.'comment'($P2) __label_2: # endif $P1 = sformat(" new %0, 'ResizablePMCArray'", $S1) __ARG_1.'say'($P1) .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ResizableVarStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'VarStatement' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'FixedVarStatement' ] .sub 'FixedVarStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 .const 'Sub' WSubId_75 = "WSubId_75" .const 'Sub' ExpectOp = "ExpectOp" self.'initvarbase'(__ARG_1, __ARG_3, __ARG_4) $P2 = WSubId_75(__ARG_2, self) setattribute self, 'exprsize', $P2 ExpectOp("]", __ARG_2) ExpectOp(";", __ARG_2) .end # FixedVarStatement .sub 'optimize' :method getattribute $P3, self, 'exprsize' $P2 = $P3.'optimize'() setattribute self, 'exprsize', $P2 .tailcall self.'optimize_init'() .end # optimize .sub 'emit' :method .param pmc __ARG_1 .const 'Sub' sformat = "sformat" getattribute $P2, self, 'exprsize' $P1 = $P2.'emit_get'(__ARG_1) null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: self.'annotate'(__ARG_1) getattribute $P1, self, 'reg' null $S2 if_null $P1, __label_2 set $S2, $P1 __label_2: $P1 = __ARG_1.'getDebug'() if_null $P1, __label_3 unless $P1 goto __label_3 getattribute $P3, self, 'name' $P2 = sformat("var %0[] : %1", $P3, $S2) __ARG_1.'comment'($P2) __label_3: # endif $P1 = sformat(" new %0, 'FixedPMCArray', %1", $S2, $S1) __ARG_1.'say'($P1) .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'FixedVarStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'VarStatement' ] addparent $P0, $P1 addattribute $P0, 'exprsize' .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'parseVar' :subid('WSubId_84') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param int __ARG_4 :optional .const 'Sub' RequireIdentifier = "RequireIdentifier" $P1 = __ARG_2.'get'() RequireIdentifier($P1) $P2 = __ARG_2.'get'() $P3 = $P2.'isop'("[") if_null $P3, __label_1 unless $P3 goto __label_1 $P2 = __ARG_2.'get'() $P3 = $P2.'isop'("]") if_null $P3, __label_3 unless $P3 goto __label_3 new $P5, [ 'Winxed'; 'Compiler'; 'ResizableVarStatement' ] $P5.'ResizableVarStatement'(__ARG_1, __ARG_2, __ARG_3, $P1) set $P4, $P5 .return($P4) goto __label_4 __label_3: # else __ARG_2.'unget'($P2) new $P4, [ 'Winxed'; 'Compiler'; 'FixedVarStatement' ] $P4.'FixedVarStatement'(__ARG_1, __ARG_2, __ARG_3, $P1) set $P3, $P4 .return($P3) __label_4: # endif goto __label_2 __label_1: # else __ARG_2.'unget'($P2) new $P4, [ 'Winxed'; 'Compiler'; 'VarStatement' ] $P4.'VarStatement'(__ARG_1, __ARG_2, __ARG_3, $P1, __ARG_4) set $P3, $P4 .return($P3) __label_2: # endif .end # parseVar .sub 'parseVolatile' :subid('WSubId_83') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' SyntaxError = "SyntaxError" .const 'Sub' WSubId_84 = "WSubId_84" $P1 = __ARG_2.'get'() $P2 = $P1.'iskeyword'("var") if $P2 goto __label_1 SyntaxError("invalid volatile type", $P1) __label_1: # endif .tailcall WSubId_84(__ARG_1, __ARG_2, __ARG_3, 1) .end # parseVolatile .namespace [ 'Winxed'; 'Compiler'; 'CompoundStatement' ] .sub 'CompoundStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' WSubId_134 = "WSubId_134" .const 'Sub' InternalError = "InternalError" self.'BlockStatement'(__ARG_1, __ARG_3) root_new $P4, ['parrot';'Hash'] setattribute self, 'labels', $P4 root_new $P4, ['parrot';'ResizablePMCArray'] setattribute self, 'statements', $P4 null $P1 __label_2: # while $P1 = __ARG_2.'get'() $P3 = $P1.'isop'("}") if $P3 goto __label_1 __ARG_2.'unget'($P1) $P2 = WSubId_134(__ARG_2, self) unless_null $P2, __label_3 InternalError("Unexpected null statement") __label_3: # endif getattribute $P3, self, 'statements' push $P3, $P2 goto __label_2 __label_1: # endwhile setattribute self, 'end', $P1 .end # CompoundStatement .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'CompoundStatement' ] getattribute $P8, self, 'start' $P1.'BlockStatement'($P8, __ARG_1) root_new $P9, ['parrot';'Hash'] setattribute $P1, 'labels', $P9 getattribute $P9, self, 'end' setattribute $P1, 'end', $P9 getattribute $P2, self, 'statements' set $P3, $P1 .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" set $P4, $P2 root_new $P5, ['parrot';'ResizablePMCArray'] $P9 = bindmethod("clone") $P6 = bindlast($P9, $P3) if_null $P4, __label_2 iter $P11, $P4 set $P11, 0 __label_1: # for iteration unless $P11 goto __label_2 shift $P7, $P11 $P12 = $P6($P7) push $P5, $P12 goto __label_1 __label_2: # endfor set $P10, $P5 set $P8, $P10 setattribute $P1, 'statements', $P8 .return($P1) .end # clone .sub 'last' :method getattribute $P1, self, 'statements' elements $I2, $P1 sub $I1, $I2, 1 __label_3: # for condition lt $I1, 0, __label_2 $P2 = $P1[$I1] if_null $P2, __label_4 $P3 = $P2.'isempty'() if $P3 goto __label_4 .return($P2) __label_4: # endif __label_1: # for iteration dec $I1 goto __label_3 __label_2: # for end null $P3 .return($P3) .end # last .sub 'getlabel' :method .param string __ARG_1 getattribute $P1, self, 'labels' $S1 = $P1[__ARG_1] isnull $I1, $S1 if $I1 goto __label_2 iseq $I1, $S1, "" __label_2: unless $I1 goto __label_1 getattribute $P3, self, 'owner' $P2 = $P3.'getlabel'(__ARG_1) set $S1, $P2 __label_1: # endif .return($S1) .end # getlabel .sub 'createlabel' :method .param pmc __ARG_1 .const 'Sub' SyntaxError = "SyntaxError" null $S1 if_null __ARG_1, __label_1 set $S1, __ARG_1 __label_1: getattribute $P1, self, 'labels' $S2 = $P1[$S1] if_null $S2, __label_2 eq $S2, "", __label_2 SyntaxError("Label already defined", __ARG_1) __label_2: # endif $P2 = self.'genlabel'() null $S3 if_null $P2, __label_3 set $S3, $P2 __label_3: $P1[$S1] = $S3 .return($S3) .end # createlabel .sub 'getend' :method getattribute $P1, self, 'end' .return($P1) .end # getend .sub 'emit' :method .param pmc __ARG_1 $P2 = __ARG_1.'getDebug'() set $I1, $P2 unless $I1 goto __label_1 __ARG_1.'comment'("{") __label_1: # endif getattribute $P2, self, 'statements' if_null $P2, __label_3 iter $P3, $P2 set $P3, 0 __label_2: # for iteration unless $P3 goto __label_3 shift $P1, $P3 $P1.'emit'(__ARG_1) self.'freetemps'() goto __label_2 __label_3: # endfor unless $I1 goto __label_4 __ARG_1.'comment'("}") __label_4: # endif .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'CompoundStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'MultiStatementBase' ] addparent $P0, $P1 get_class $P2, [ 'Winxed'; 'Compiler'; 'BlockStatement' ] addparent $P0, $P2 addattribute $P0, 'end' addattribute $P0, 'labels' .end .namespace [ 'Winxed'; 'Compiler'; 'RegisterStore' ] .sub 'RegisterStore' :method .param string __ARG_1 box $P3, __ARG_1 setattribute self, 'type', $P3 box $P3, 1 setattribute self, 'nreg', $P3 new $P1, ['ResizableStringArray'] new $P2, ['ResizableStringArray'] setattribute self, 'tempreg', $P1 setattribute self, 'freereg', $P2 .end # RegisterStore .sub 'createreg' :method getattribute $P1, self, 'nreg' set $I1, $P1 set $I2, $I1 inc $I1 set $S1, $I2 assign $P1, $I1 getattribute $P2, self, 'type' set $S2, $P2 concat $S3, "$", $S2 concat $S3, $S3, $S1 .return($S3) .end # createreg .sub 'tempreg' :method getattribute $P1, self, 'freereg' getattribute $P2, self, 'tempreg' null $S1 elements $I1, $P1 unless $I1 goto __label_1 $P3 = $P1.'pop'() set $S1, $P3 goto __label_2 __label_1: # else $P4 = self.'createreg'() set $S1, $P4 __label_2: # endif push $P2, $S1 .return($S1) .end # tempreg .sub 'freetemps' :method getattribute $P1, self, 'freereg' getattribute $P2, self, 'tempreg' elements $I1, $P2 sub $I2, $I1, 1 __label_3: # for condition lt $I2, 0, __label_2 $S1 = $P2[$I2] push $P1, $S1 __label_1: # for iteration dec $I2 goto __label_3 __label_2: # for end assign $P2, 0 .end # freetemps .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'RegisterStore' ] addattribute $P0, 'type' addattribute $P0, 'nreg' addattribute $P0, 'tempreg' addattribute $P0, 'freereg' .end .namespace [ 'Winxed'; 'Compiler'; 'ParameterModifierList' ] .sub 'ParameterModifierList' :method .param pmc __ARG_1 .param pmc __ARG_2 self.'ModifierList'(__ARG_1, __ARG_2) .end # ParameterModifierList .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'ParameterModifierList' ] $P3 = self.'clonemodifiers'(__ARG_1) setattribute $P1, 'list', $P3 .return($P1) .end # clone .sub 'emitmodifiers' :method .param pmc __ARG_1 .param pmc __ARG_2 .param string __ARG_3 .const 'Sub' SyntaxError = "SyntaxError" null $P1 null $P2 $P3 = self.'getlist'() if_null $P3, __label_2 iter $P6, $P3 set $P6, 0 __label_1: # for iteration unless $P6 goto __label_2 shift $P4, $P6 $P7 = $P4.'getname'() null $S1 if_null $P7, __label_3 set $S1, $P7 __label_3: if $S1 == "named" goto __label_6 if $S1 == "slurpy" goto __label_7 goto __label_4 __label_6: # case set $P1, $P4 goto __label_5 # break __label_7: # case set $P2, $P4 goto __label_5 # break __label_4: # default __ARG_1.'print'(" :", $S1) __label_5: # switch end goto __label_1 __label_2: # endfor isnull $I1, $P1 not $I1 unless $I1 goto __label_11 isnull $I1, $P2 not $I1 __label_11: if $I1 goto __label_10 unless_null $P1, __label_12 unless_null $P2, __label_13 goto __label_9 __label_10: # case __ARG_1.'print'(" :named :slurpy") goto __label_8 # break __label_12: # case null $S2 $P7 = $P1.'numargs'() set $I2, $P7 if $I2 == 0 goto __label_16 if $I2 == 1 goto __label_17 goto __label_14 __label_16: # case concat $S3, "'", __ARG_3 concat $S3, $S3, "'" set $S2, $S3 goto __label_15 # break __label_17: # case $P5 = $P1.'getarg'(0) $P8 = $P5.'isstringliteral'() if $P8 goto __label_18 SyntaxError("Invalid modifier", __ARG_2) __label_18: # endif $P9 = $P5.'getPirString'() set $S2, $P9 goto __label_15 # break __label_14: # default SyntaxError("Invalid modifier", __ARG_2) __label_15: # switch end __ARG_1.'print'(" :named(", $S2, ")") goto __label_8 # break __label_13: # case __ARG_1.'print'(" :slurpy") goto __label_8 # break __label_9: # default __label_8: # switch end .end # emitmodifiers .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ParameterModifierList' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'ModifierList' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'FunctionParameter' ] .sub 'FunctionParameter' :method .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_136 = "WSubId_136" .const 'Sub' RequireIdentifier = "RequireIdentifier" setattribute self, 'func', __ARG_1 $P1 = __ARG_2.'get'() null $S1 $P2 = $P1.'isop'(":") if_null $P2, __label_1 unless $P2 goto __label_1 box $P3, 1 setattribute self, 'want_multi', $P3 $P1 = __ARG_2.'get'() $P3 = $P1.'checkkeyword'() $P2 = WSubId_136($P3) set $S1, $P2 ne $S1, "", __label_3 set $S1, "P" new $P4, [ 'Winxed'; 'Compiler'; 'ClassSpecifierId' ] getattribute $P5, __ARG_1, 'owner' $P4.'ClassSpecifierId'(__ARG_2, $P5, $P1) set $P3, $P4 setattribute self, 'classtype', $P3 __label_3: # endif $P1 = __ARG_2.'get'() goto __label_2 __label_1: # else $P3 = $P1.'checkkeyword'() $P2 = WSubId_136($P3) set $S1, $P2 eq $S1, "", __label_4 $P1 = __ARG_2.'get'() goto __label_5 __label_4: # else set $S1, "P" __label_5: # endif __label_2: # endif RequireIdentifier($P1) box $P2, $S1 setattribute self, 'type', $P2 setattribute self, 'name', $P1 $P1 = __ARG_2.'get'() $P2 = $P1.'isop'("[") if_null $P2, __label_6 unless $P2 goto __label_6 new $P5, [ 'Winxed'; 'Compiler'; 'ParameterModifierList' ] getattribute $P6, __ARG_1, 'owner' $P5.'ParameterModifierList'(__ARG_2, $P6) set $P4, $P5 setattribute self, 'modifiers', $P4 $P1 = __ARG_2.'get'() __label_6: # endif $P2 = $P1.'isop'("=") if_null $P2, __label_7 unless $P2 goto __label_7 new $P5, [ 'Winxed'; 'Compiler'; 'FunctionParameterDefault' ] $P5.'FunctionParameterDefault'(__ARG_2, __ARG_1, self) set $P4, $P5 setattribute self, 'defaultexpr', $P4 goto __label_8 __label_7: # else __ARG_2.'unget'($P1) __label_8: # endif .end # FunctionParameter .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'FunctionParameter' ] setattribute $P1, 'func', __ARG_1 getattribute $P3, self, 'name' setattribute $P1, 'name', $P3 getattribute $P3, self, 'type' setattribute $P1, 'type', $P3 getattribute $P2, self, 'modifiers' if_null $P2, __label_1 getattribute $P5, self, 'modifiers' getattribute $P6, __ARG_1, 'owner' $P4 = $P5.'clone'($P6) setattribute $P1, 'modifiers', $P4 __label_1: # endif .return($P1) .end # clone .sub 'optimize' :method getattribute $P1, self, 'func' $S2 = $P1.'generateparamnum'() concat $S1, "__ARG_", $S2 getattribute $P3, self, 'name' getattribute $P4, self, 'type' $P1.'createvarnamed'($P3, $P4, $S1) getattribute $P3, self, 'modifiers' if_null $P3, __label_1 getattribute $P4, self, 'modifiers' $P4.'optimize'() __label_1: # endif getattribute $P2, self, 'defaultexpr' if_null $P2, __label_2 $P2.'optimize'() $P3 = self.'getvar'() $S2 = $P3.'getreg'() concat $S3, "__opt_flag", $S2 $P2.'setoptflag'($S3) __label_2: # endif .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .const 'Sub' WSubId_144 = "WSubId_144" getattribute $P1, self, 'func' getattribute $P5, self, 'name' null $S1 if_null $P5, __label_1 set $S1, $P5 __label_1: $P2 = self.'getvar'() $P6 = $P2.'gettype'() $P5 = WSubId_144($P6) null $S2 if_null $P5, __label_2 set $S2, $P5 __label_2: $P5 = $P2.'getreg'() __ARG_1.'print'(" .param ", $S2, " ", $P5) getattribute $P3, self, 'modifiers' if_null $P3, __label_3 getattribute $P5, $P1, 'start' $P3.'emitmodifiers'(__ARG_1, $P5, $S1) __label_3: # endif getattribute $P4, self, 'defaultexpr' if_null $P4, __label_4 $P5 = $P4.'getoptflag'() __ARG_1.'print'(" :optional\n .param int ", $P5, " :opt_flag") __label_4: # endif __ARG_1.'say'("") .end # emit .sub 'emitdefault' :method .param pmc __ARG_1 getattribute $P1, self, 'defaultexpr' if_null $P1, __label_1 $P1.'emit'(__ARG_1) __label_1: # endif .end # emitdefault .sub 'get_type' :method getattribute $P1, self, 'type' .return($P1) .end # get_type .sub 'wantMulti' :method getattribute $P1, self, 'want_multi' isnull $I1, $P1 not $I1 .return($I1) .end # wantMulti .sub 'get_pir_multi_type' :method .const 'Sub' WSubId_144 = "WSubId_144" .const 'Sub' SyntaxError = "SyntaxError" getattribute $P1, self, 'classtype' unless_null $P1, __label_1 getattribute $P3, self, 'type' .tailcall WSubId_144($P3) __label_1: # endif getattribute $P4, self, 'func' getattribute $P3, $P4, 'owner' $P2 = $P1.'checknskey'($P3) unless_null $P2, __label_2 SyntaxError("class not found", $P1) __label_2: # endif .tailcall $P2.'getparrotkey'() .end # get_pir_multi_type .sub 'getvar' :method getattribute $P1, self, 'func' getattribute $P2, self, 'name' .tailcall $P1.'getvar'($P2) .end # getvar .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'FunctionParameter' ] addattribute $P0, 'func' addattribute $P0, 'name' addattribute $P0, 'modifiers' addattribute $P0, 'type' addattribute $P0, 'want_multi' addattribute $P0, 'classtype' addattribute $P0, 'defaultexpr' .end .namespace [ 'Winxed'; 'Compiler'; 'FunctionParameterDefault' ] .sub 'FunctionParameterDefault' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' WSubId_75 = "WSubId_75" setattribute self, 'owner', __ARG_2 setattribute self, 'param', __ARG_3 $P2 = WSubId_75(__ARG_1, __ARG_2) setattribute self, 'expr', $P2 .end # FunctionParameterDefault .sub 'clone' :method .param pmc __ARG_1 .param pmc __ARG_2 new $P1, [ 'Winxed'; 'Compiler'; 'FunctionParameterDefault' ] setattribute $P1, 'owner', __ARG_1 setattribute $P1, 'param', __ARG_2 getattribute $P4, self, 'expr' $P3 = $P4.'clone'(__ARG_1) setattribute $P1, 'expr', $P3 .return($P1) .end # clone .sub 'optimize' :method getattribute $P4, self, 'expr' $P3 = $P4.'optimize'() setattribute self, 'expr', $P3 getattribute $P2, self, 'param' $P1 = $P2.'getvar'() .end # optimize .sub 'setoptflag' :method .param string __ARG_1 box $P1, __ARG_1 setattribute self, 'reg', $P1 .end # setoptflag .sub 'getoptflag' :method .const 'Sub' InternalError = "InternalError" getattribute $P1, self, 'reg' unless_null $P1, __label_1 getattribute $P2, self, 'param' InternalError("Invalid parameter default usage", $P2) __label_1: # endif set $S1, $P1 .return($S1) .end # getoptflag .sub 'emit' :method .param pmc __ARG_1 getattribute $P1, self, 'expr' $P5 = $P1.'isnull'() if $P5 goto __label_1 getattribute $P2, self, 'param' $P3 = $P2.'getvar'() getattribute $P6, self, 'owner' $P5 = $P6.'genlabel'() null $S1 if_null $P5, __label_2 set $S1, $P5 __label_2: $P5 = self.'getoptflag'() null $S2 if_null $P5, __label_3 set $S2, $P5 __label_3: __ARG_1.'emitif'($S2, $S1) $P5 = $P3.'getreg'() null $S3 if_null $P5, __label_4 set $S3, $P5 __label_4: $P5 = $P3.'gettype'() null $S4 if_null $P5, __label_5 set $S4, $P5 __label_5: $P5 = $P1.'checkresult'() set $S5, $P5 ne $S4, $S5, __label_6 $P1.'emit_init'(__ARG_1, $S3) goto __label_7 __label_6: # else $P4 = $P1.'emit_get'(__ARG_1) ne $S4, "P", __label_8 __ARG_1.'emitbox'($S3, $P4) goto __label_9 __label_8: # else __ARG_1.'emitset'($S3, $P4) __label_9: # endif __label_7: # endif __ARG_1.'emitlabel'($S1) __label_1: # endif .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'FunctionParameterDefault' ] addattribute $P0, 'owner' addattribute $P0, 'param' addattribute $P0, 'expr' addattribute $P0, 'reg' .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'parseParameter' :subid('WSubId_145') .param pmc __ARG_1 .param pmc __ARG_2 new $P2, [ 'Winxed'; 'Compiler'; 'FunctionParameter' ] $P2.'FunctionParameter'(__ARG_2, __ARG_1) set $P1, $P2 .return($P1) .end # parseParameter .namespace [ 'Winxed'; 'Compiler'; 'FunctionParameterList' ] .sub 'FunctionParameterList' :method .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_74 = "WSubId_74" .const 'Sub' WSubId_145 = "WSubId_145" $P2 = WSubId_74(__ARG_1, __ARG_2, WSubId_145, ")") setattribute self, 'paramlist', $P2 .end # FunctionParameterList .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'FunctionParameterList' ] getattribute $P2, self, 'paramlist' set $P3, __ARG_1 .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" set $P4, $P2 root_new $P5, ['parrot';'ResizablePMCArray'] $P10 = bindmethod("clone") $P6 = bindlast($P10, $P3) if_null $P4, __label_2 iter $P11, $P4 set $P11, 0 __label_1: # for iteration unless $P11 goto __label_2 shift $P7, $P11 $P12 = $P6($P7) push $P5, $P12 goto __label_1 __label_2: # endfor set $P9, $P5 set $P8, $P9 setattribute $P1, 'paramlist', $P8 .return($P1) .end # clone .sub 'optimize' :method getattribute $P1, self, 'paramlist' if_null $P1, __label_2 elements $I1, $P1 goto __label_1 __label_2: null $I1 __label_1: null $I2 __label_5: # for condition ge $I2, $I1, __label_4 $P3 = $P1[$I2] $P2 = $P3.'optimize'() $P1[$I2] = $P2 __label_3: # for iteration inc $I2 goto __label_5 __label_4: # for end .end # optimize .sub 'emit' :method .param pmc __ARG_1 set $P1, __ARG_1 getattribute $P2, self, 'paramlist' .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" set $P3, $P2 $P6 = bindmethod("emit") $P4 = bindlast($P6, $P1) if_null $P3, __label_2 iter $P7, $P3 set $P7, 0 __label_1: # for iteration unless $P7 goto __label_2 shift $P5, $P7 $P4($P5) goto __label_1 __label_2: # endfor .end # emit .sub 'emitdefault' :method .param pmc __ARG_1 .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" getattribute $P1, self, 'paramlist' $P4 = bindmethod("emitdefault") $P2 = bindlast($P4, __ARG_1) if_null $P1, __label_2 iter $P5, $P1 set $P5, 0 __label_1: # for iteration unless $P5 goto __label_2 shift $P3, $P5 $P2($P3) goto __label_1 __label_2: # endfor .end # emitdefault .sub 'wantMulti' :method getattribute $P2, self, 'paramlist' if_null $P2, __label_2 iter $P3, $P2 set $P3, 0 __label_1: # for iteration unless $P3 goto __label_2 shift $P1, $P3 $P4 = $P1.'wantMulti'() if_null $P4, __label_3 unless $P4 goto __label_3 .return(1) __label_3: # endif goto __label_1 __label_2: # endfor .return(0) .end # wantMulti .sub 'addmultisig' :method .param pmc __ARG_1 .const 'Sub' bindmethod = "bindmethod" getattribute $P1, self, 'paramlist' set $P2, __ARG_1 $P3 = bindmethod("get_pir_multi_type") if_null $P1, __label_2 iter $P5, $P1 set $P5, 0 __label_1: # for iteration unless $P5 goto __label_2 shift $P4, $P5 $P6 = $P3($P4) push $P2, $P6 goto __label_1 __label_2: # endfor .end # addmultisig .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'FunctionParameterList' ] addattribute $P0, 'paramlist' .end .namespace [ 'Winxed'; 'Compiler'; 'FunctionExtern' ] .sub 'FunctionExtern' :method .param pmc __ARG_1 .param pmc __ARG_2 self.'initbase'(__ARG_1, __ARG_2) setattribute self, 'name', __ARG_1 .end # FunctionExtern .sub 'emit_get' :method .param pmc __ARG_1 .param pmc __ARG_2 getattribute $P2, self, 'owner' $P1 = $P2.'getpath'() $P2 = __ARG_2.'tempreg'("P") null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: self.'annotate'(__ARG_1) getattribute $P2, self, 'name' $P1.'emit_get_global'(__ARG_1, __ARG_2, $S1, $P2) .return($S1) .end # emit_get .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'FunctionExtern' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'CommonBase' ] addparent $P0, $P1 addattribute $P0, 'name' .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'emit_subid' :subid('WSubId_147') .param string __ARG_1 concat $S1, ".const 'Sub' ", __ARG_1 concat $S1, $S1, " = \"" concat $S1, $S1, __ARG_1 concat $S1, $S1, "\"\n" .return($S1) .end # emit_subid .namespace [ 'Winxed'; 'Compiler'; 'FunctionModifierList' ] .sub 'FunctionModifierList' :method .param pmc __ARG_1 .param pmc __ARG_2 self.'ModifierList'(__ARG_1, __ARG_2) .end # FunctionModifierList .sub 'emit' :method .param pmc __ARG_1 .const 'Sub' SyntaxError = "SyntaxError" $P3 = self.'getlist'() if_null $P3, __label_2 iter $P4, $P3 set $P4, 0 __label_1: # for iteration unless $P4 goto __label_2 shift $P1, $P4 $P5 = $P1.'getname'() null $S1 if_null $P5, __label_3 set $S1, $P5 __label_3: ne $S1, "multi", __label_4 goto __label_1 # continue __label_4: # endif $P3 = $P1.'numargs'() set $I1, $P3 __ARG_1.'print'(" :", $S1) le $I1, 0, __label_5 __ARG_1.'print'("(") null $I2 __label_8: # for condition ge $I2, $I1, __label_7 $P2 = $P1.'getarg'($I2) $P3 = $P2.'isstringliteral'() if $P3 goto __label_9 SyntaxError("Invalid modifier", $P2) __label_9: # endif $P3 = $P2.'getPirString'() __ARG_1.'print'($P3) sub $I3, $I1, 1 ge $I2, $I3, __label_10 __ARG_1.'print'(", ") __label_10: # endif __label_6: # for iteration inc $I2 goto __label_8 __label_7: # for end __ARG_1.'print'(")") __label_5: # endif goto __label_1 __label_2: # endfor .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'FunctionModifierList' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'ModifierList' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'multi_sig_from_multi_modifier' :subid('WSubId_146') .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' SyntaxError = "SyntaxError" $P5 = __ARG_2.'numargs'() set $I1, $P5 null $P1 unless $I1 goto __label_1 root_new $P5, ['parrot';'ResizablePMCArray'] set $P1, $P5 null $I2 __label_4: # for condition ge $I2, $I1, __label_3 $P2 = __ARG_2.'getarg'($I2) $P5 = $P2.'isstringliteral'() set $I3, $P5 if $I3 goto __label_7 $P6 = $P2.'isidentifier'() set $I3, $P6 if $I3 goto __label_8 isa $I4, $P2, [ 'Winxed'; 'Compiler'; 'OpClassExpr' ] if $I4 goto __label_9 goto __label_6 __label_7: # case $P7 = $P2.'getStringValue'() push $P1, $P7 goto __label_5 # break __label_8: # case $P8 = $P2.'getName'() null $S1 if_null $P8, __label_10 set $S1, $P8 __label_10: if $S1 == "int" goto __label_13 if $S1 == "string" goto __label_14 if $S1 == "float" goto __label_15 if $S1 == "var" goto __label_16 goto __label_11 __label_13: # case __label_14: # case push $P1, $S1 goto __label_12 # break __label_15: # case push $P1, "num" goto __label_12 # break __label_16: # case push $P1, "pmc" goto __label_12 # break __label_11: # default SyntaxError("unsupported multi signature", $P2) __label_12: # switch end goto __label_5 # break __label_9: # case $P3 = $P2.'get_class_raw_key'() unless_null $P3, __label_17 SyntaxError("class not found", $P2) __label_17: # endif set $P4, $P3 null $S2 elements $I3, $P4 unless $I3 goto __label_18 join $S3, "'; '", $P4 concat $S5, "[ '", $S3 concat $S5, $S5, "' ]" set $S2, $S5 __label_18: # endif set $S4, $S2 push $P1, $S4 goto __label_5 # break __label_6: # default SyntaxError("unsupported multi signature", $P2) __label_5: # switch end __label_2: # for iteration inc $I2 goto __label_4 __label_3: # for end __label_1: # endif .return($P1) .end # multi_sig_from_multi_modifier .namespace [ 'Winxed'; 'Compiler'; 'FunctionBase' ] .sub 'FunctionBase' :method .param pmc __ARG_1 .param pmc __ARG_2 self.'BlockStatement'(__ARG_1, __ARG_2) box $P1, 0 setattribute self, 'nlabel', $P1 new $P3, [ 'Winxed'; 'Compiler'; 'RegisterStore' ] $P3.'RegisterStore'("I") set $P2, $P3 setattribute self, 'regstI', $P2 new $P3, [ 'Winxed'; 'Compiler'; 'RegisterStore' ] $P3.'RegisterStore'("N") set $P2, $P3 setattribute self, 'regstN', $P2 new $P3, [ 'Winxed'; 'Compiler'; 'RegisterStore' ] $P3.'RegisterStore'("S") set $P2, $P3 setattribute self, 'regstS', $P2 new $P3, [ 'Winxed'; 'Compiler'; 'RegisterStore' ] $P3.'RegisterStore'("P") set $P2, $P3 setattribute self, 'regstP', $P2 .end # FunctionBase .sub 'clonebase' :method .param pmc __ARG_1 .param pmc __ARG_2 getattribute $P1, __ARG_1, 'start' self.'FunctionBase'($P1, __ARG_2) .end # clonebase .sub 'getouter' :method .return(self) .end # getouter .sub 'getlexicalouter' :method .return(self) .end # getlexicalouter .sub 'allowtailcall' :method .return(1) .end # allowtailcall .sub 'makesubid' :method getattribute $P1, self, 'subid' unless_null $P1, __label_1 $P1 = self.'generatesubid'() setattribute self, 'subid', $P1 __label_1: # endif .return($P1) .end # makesubid .sub 'usesubid' :method .param string __ARG_1 getattribute $P1, self, 'usedsubids' unless_null $P1, __label_1 root_new $P1, ['parrot';'Hash'] setattribute self, 'usedsubids', $P1 __label_1: # endif $P1[__ARG_1] = 1 .end # usesubid .sub 'same_scope_as' :method .param pmc __ARG_1 issame $I1, self, __ARG_1 .return($I1) .end # same_scope_as .sub 'parse_parameters' :method .param pmc __ARG_1 .const 'Sub' SyntaxError = "SyntaxError" $P1 = __ARG_1.'get'() $P3 = $P1.'isop'(")") if $P3 goto __label_1 __ARG_1.'unget'($P1) new $P3, [ 'Winxed'; 'Compiler'; 'FunctionParameterList' ] $P3.'FunctionParameterList'(__ARG_1, self) set $P2, $P3 setattribute self, 'params', $P2 $P3 = $P2.'wantMulti'() if_null $P3, __label_2 unless $P3 goto __label_2 isa $I1, self, [ 'Winxed'; 'Compiler'; 'FunctionStatement' ] if $I1 goto __label_3 SyntaxError("Can't use multi signatures here", self) __label_3: # endif self.'setmulti'() __label_2: # endif __label_1: # endif .end # parse_parameters .sub 'addlocalfunction' :method .param pmc __ARG_1 getattribute $P1, self, 'localfun' unless_null $P1, __label_1 root_new $P3, ['parrot';'ResizablePMCArray'] assign $P3, 1 $P3[0] = __ARG_1 setattribute self, 'localfun', $P3 goto __label_2 __label_1: # else push $P1, __ARG_1 __label_2: # endif .end # addlocalfunction .sub 'usenamespace' :method .param pmc __ARG_1 getattribute $P1, self, 'usednamespaces' unless_null $P1, __label_1 root_new $P6, ['parrot';'ResizablePMCArray'] assign $P6, 1 $P6[0] = __ARG_1 setattribute self, 'usednamespaces', $P6 goto __label_2 __label_1: # else set $P2, $P1 set $P3, __ARG_1 if_null $P2, __label_5 iter $P8, $P2 set $P8, 0 __label_4: # for iteration unless $P8 goto __label_5 shift $P4, $P8 ne_addr $P4, $P3, __label_6 set $P7, $P4 goto __label_7 __label_6: # endif goto __label_4 __label_5: # endfor null $P7 __label_7: set $P5, $P7 if_null $P5, __label_3 .return() __label_3: # endif push $P1, __ARG_1 __label_2: # endif .end # usenamespace .sub 'scopesearch' :method .param pmc __ARG_1 .param int __ARG_2 getattribute $P3, self, 'usednamespaces' if_null $P3, __label_2 iter $P4, $P3 set $P4, 0 __label_1: # for iteration unless $P4 goto __label_2 shift $P1, $P4 $P2 = $P1.'scopesearch'(__ARG_1, __ARG_2) if_null $P2, __label_3 .return($P2) __label_3: # endif goto __label_1 __label_2: # endfor getattribute $P3, self, 'owner' .tailcall $P3.'scopesearch'(__ARG_1, __ARG_2) .end # scopesearch .sub 'optimize' :method .const 'Sub' WSubId_146 = "WSubId_146" .const 'Sub' bindmethod = "bindmethod" getattribute $P1, self, 'modifiers' if_null $P1, __label_1 $P2 = $P1.'pick'("multi") if_null $P2, __label_2 self.'setmulti'() $P7 = WSubId_146(self, $P2) setattribute self, 'multi_sig', $P7 __label_2: # endif __label_1: # endif getattribute $P6, self, 'params' if_null $P6, __label_3 getattribute $P7, self, 'params' $P7.'optimize'() __label_3: # endif getattribute $P3, self, 'usednamespaces' $P4 = bindmethod("fixnamespaces") if_null $P3, __label_5 iter $P8, $P3 set $P8, 0 __label_4: # for iteration unless $P8 goto __label_5 shift $P5, $P8 $P4($P5) goto __label_4 __label_5: # endfor getattribute $P9, self, 'body' $P7 = $P9.'optimize'() setattribute self, 'body', $P7 .return(self) .end # optimize .sub 'setusedlex' :method .param string __ARG_1 .param string __ARG_2 getattribute $P1, self, 'usedlexicals' unless_null $P1, __label_1 root_new $P1, ['parrot';'Hash'] setattribute self, 'usedlexicals', $P1 __label_1: # endif $P1[__ARG_2] = __ARG_1 .end # setusedlex .sub 'setlex' :method .param string __ARG_1 .param string __ARG_2 getattribute $P1, self, 'lexicals' unless_null $P1, __label_1 root_new $P1, ['parrot';'Hash'] setattribute self, 'lexicals', $P1 __label_1: # endif $P1[__ARG_2] = __ARG_1 .end # setlex .sub 'createlex' :method .param pmc __ARG_1 $P1 = __ARG_1.'getlex'() null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: unless_null $S1, __label_2 $S2 = self.'generatelexnum'() concat $S3, "'__WLEX_", $S2 concat $S3, $S3, "'" set $S1, $S3 __ARG_1.'createlex'($S1) __label_2: # endif .return($S1) .end # createlex .sub 'createreg' :method .param string __ARG_1 .const 'Sub' InternalError = "InternalError" null $P1 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 getattribute $P1, self, 'regstI' goto __label_2 # break __label_4: # case getattribute $P1, self, 'regstN' goto __label_2 # break __label_5: # case getattribute $P1, self, 'regstS' goto __label_2 # break __label_6: # case getattribute $P1, self, 'regstP' goto __label_2 # break __label_1: # default concat $S2, "Invalid type in createreg: ", __ARG_1 InternalError($S2) __label_2: # switch end $P2 = $P1.'createreg'() null $S1 if_null $P2, __label_7 set $S1, $P2 __label_7: .return($S1) .end # createreg .sub 'tempreg' :method .param string __ARG_1 .const 'Sub' InternalError = "InternalError" null $P1 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 getattribute $P1, self, 'regstI' goto __label_2 # break __label_4: # case getattribute $P1, self, 'regstN' goto __label_2 # break __label_5: # case getattribute $P1, self, 'regstS' goto __label_2 # break __label_6: # case getattribute $P1, self, 'regstP' goto __label_2 # break __label_1: # default concat $S2, "Invalid type in tempreg: ", __ARG_1 InternalError($S2) __label_2: # switch end $P2 = $P1.'tempreg'() null $S1 if_null $P2, __label_7 set $S1, $P2 __label_7: .return($S1) .end # tempreg .sub 'freetemps' :method .const 'Sub' bindmethod = "bindmethod" root_new $P1, ['parrot';'ResizablePMCArray'] assign $P1, 4 getattribute $P4, self, 'regstI' $P1[0] = $P4 getattribute $P5, self, 'regstN' $P1[1] = $P5 getattribute $P6, self, 'regstS' $P1[2] = $P6 getattribute $P7, self, 'regstP' $P1[3] = $P7 $P2 = bindmethod("freetemps") if_null $P1, __label_2 iter $P8, $P1 set $P8, 0 __label_1: # for iteration unless $P8 goto __label_2 shift $P3, $P8 $P2($P3) goto __label_1 __label_2: # endfor .end # freetemps .sub 'genlabel' :method getattribute $P1, self, 'nlabel' inc $P1 set $I1, $P1 set $S1, $I1 concat $S2, "__label_", $S1 .return($S2) .end # genlabel .sub 'getbreaklabel' :method .param pmc __ARG_1 .const 'Sub' SyntaxError = "SyntaxError" SyntaxError("break not allowed here", __ARG_1) .end # getbreaklabel .sub 'getcontinuelabel' :method .param pmc __ARG_1 .const 'Sub' SyntaxError = "SyntaxError" SyntaxError("continue not allowed here", __ARG_1) .end # getcontinuelabel .sub 'emit_extra_modifiers' :method .param pmc __ARG_1 .end # emit_extra_modifiers .sub 'emit' :method .param pmc __ARG_1 .const 'Sub' WSubId_147 = "WSubId_147" .const 'Sub' sformat = "sformat" .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" getattribute $P15, self, 'name' null $S1 if_null $P15, __label_1 set $S1, $P15 __label_1: __ARG_1.'say'() __ARG_1.'print'(".sub ") $P15 = self.'isanonymous'() if_null $P15, __label_2 unless $P15 goto __label_2 __ARG_1.'print'("'' :anon") goto __label_3 __label_2: # else __ARG_1.'print'("'", $S1, "'") __label_3: # endif getattribute $P15, self, 'subid' if_null $P15, __label_4 getattribute $P16, self, 'subid' __ARG_1.'print'(" :subid('", $P16, "')") __label_4: # endif getattribute $P1, self, 'outer' if_null $P1, __label_5 getattribute $P15, self, 'usedlexicals' if_null $P15, __label_5 isa $I2, $P1, [ 'Winxed'; 'Compiler'; 'InlinedBlock' ] unless $I2 goto __label_6 $P1 = $P1.'getlexicalouter'() __label_6: # endif getattribute $P2, $P1, 'subid' if_null $P2, __label_7 __ARG_1.'print'(" :outer('", $P2, "')") __label_7: # endif __label_5: # endif $P15 = self.'ismethod'() if_null $P15, __label_8 unless $P15 goto __label_8 __ARG_1.'print'(" :method") __label_8: # endif getattribute $P3, self, 'modifiers' if_null $P3, __label_9 $P3.'emit'(__ARG_1) goto __label_10 __label_9: # else ne $S1, "main", __label_11 __ARG_1.'print'(" :main") __label_11: # endif __label_10: # endif self.'emit_extra_modifiers'(__ARG_1) __ARG_1.'say'() getattribute $P4, self, 'params' if_null $P4, __label_12 $P4.'emit'(__ARG_1) __label_12: # endif getattribute $P5, self, 'usedsubids' root_new $P6, ['parrot';'ResizablePMCArray'] set $P7, WSubId_147 if_null $P5, __label_14 iter $P18, $P5 set $P18, 0 __label_13: # for iteration unless $P18 goto __label_14 shift $P8, $P18 $P15 = $P7($P8) push $P6, $P15 goto __label_13 __label_14: # endfor set $P17, $P6 set $P15, $P17 join $S4, "", $P15 __ARG_1.'print'($S4) if_null $P4, __label_15 $P4.'emitdefault'(__ARG_1) __label_15: # endif getattribute $P9, self, 'lexicals' getattribute $P10, self, 'usedlexicals' isnull $I2, $P9 not $I2 if $I2 goto __label_17 isnull $I2, $P10 not $I2 __label_17: unless $I2 goto __label_16 getattribute $P15, self, 'start' __ARG_1.'annotate'($P15) if_null $P9, __label_19 iter $P19, $P9 set $P19, 0 __label_18: # for iteration unless $P19 goto __label_19 shift $S2, $P19 $P16 = $P9[$S2] $P15 = sformat(".lex %0, %1", $P16, $S2) __ARG_1.'say'($P15) goto __label_18 __label_19: # endfor if_null $P10, __label_21 iter $P20, $P10 set $P20, 0 __label_20: # for iteration unless $P20 goto __label_21 shift $S3, $P20 substr $S4, $S3, 0, 1 eq $S4, "$", __label_22 concat $S5, " .local pmc ", $S3 __ARG_1.'say'($S5) __label_22: # endif $P15 = $P10[$S3] __ARG_1.'emitfind_lex'($S3, $P15) goto __label_20 __label_21: # endfor __label_16: # endif $P15 = __ARG_1.'getDebug'() set $I1, $P15 getattribute $P11, self, 'body' $P15 = $P11.'isempty'() if_null $P15, __label_23 unless $P15 goto __label_23 unless $I1 goto __label_25 __ARG_1.'comment'("Empty body") __label_25: # endif goto __label_24 __label_23: # else unless $I1 goto __label_26 __ARG_1.'comment'("Body") __label_26: # endif $P11.'emit'(__ARG_1) $P15 = $P11.'getend'() __ARG_1.'annotate'($P15) __label_24: # endif __ARG_1.'say'("\n.end # ", $S1, "\n") getattribute $P12, self, 'localfun' $P15 = bindmethod("emit") $P13 = bindlast($P15, __ARG_1) if_null $P12, __label_28 iter $P21, $P12 set $P21, 0 __label_27: # for iteration unless $P21 goto __label_28 shift $P14, $P21 $P13($P14) goto __label_27 __label_28: # endfor .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'FunctionBase' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'BlockStatement' ] addparent $P0, $P1 addattribute $P0, 'name' addattribute $P0, 'subid' addattribute $P0, 'modifiers' addattribute $P0, 'params' addattribute $P0, 'body' addattribute $P0, 'regstI' addattribute $P0, 'regstN' addattribute $P0, 'regstS' addattribute $P0, 'regstP' addattribute $P0, 'nlabel' addattribute $P0, 'localfun' addattribute $P0, 'lexicals' addattribute $P0, 'usedlexicals' addattribute $P0, 'usedsubids' addattribute $P0, 'outer' .end .namespace [ 'Winxed'; 'Compiler'; 'FunctionStatement' ] .sub 'FunctionStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'FunctionBase'(__ARG_1, __ARG_3) box $P1, 0 setattribute self, 'paramnum', $P1 box $P1, 0 setattribute self, 'lexnum', $P1 new $P2, [ 'Boolean' ] setattribute self, 'is_multi', $P2 self.'parse'(__ARG_2) .end # FunctionStatement .sub 'isanonymous' :method .return(0) .end # isanonymous .sub 'generateparamnum' :method getattribute $P1, self, 'paramnum' inc $P1 set $I1, $P1 .return($I1) .end # generateparamnum .sub 'generatelexnum' :method getattribute $P1, self, 'lexnum' inc $P1 set $I1, $P1 .return($I1) .end # generatelexnum .sub 'ismethod' :method .return(0) .end # ismethod .sub 'ismulti' :method getattribute $P1, self, 'is_multi' if_null $P1, __label_2 unless $P1 goto __label_2 set $I1, 1 goto __label_1 __label_2: null $I1 __label_1: .return($I1) .end # ismulti .sub 'setmulti' :method getattribute $P1, self, 'is_multi' assign $P1, 1 .end # setmulti .sub 'default_multi_sig' :method root_new $P1, ['parrot';'ResizablePMCArray'] $P2 = self.'ismethod'() if_null $P2, __label_1 unless $P2 goto __label_1 push $P1, "_" __label_1: # endif getattribute $P2, self, 'params' if_null $P2, __label_2 getattribute $P3, self, 'params' $P3.'addmultisig'($P1) __label_2: # endif .return($P1) .end # default_multi_sig .sub 'parse' :method .param pmc __ARG_1 .const 'Sub' bindlast1 = "bindlast1" .const 'Sub' WSubId_148 = "WSubId_148" .const 'Sub' WSubId_29 = "WSubId_29" $P1 = __ARG_1.'get'() setattribute self, 'name', $P1 $P2 = __ARG_1.'get'() $P4 = $P2.'isop'("[") if_null $P4, __label_1 unless $P4 goto __label_1 new $P7, [ 'Winxed'; 'Compiler'; 'FunctionModifierList' ] getattribute $P8, self, 'owner' $P7.'FunctionModifierList'(__ARG_1, $P8) set $P6, $P7 setattribute self, 'modifiers', $P6 $P2 = __ARG_1.'get'() __label_1: # endif bindlast1("(", $P2) self.'parse_parameters'(__ARG_1) getattribute $P5, self, 'owner' $P4 = $P5.'getpath'() $P6 = $P1.'getidentifier'() $P3 = $P4.'createchild'($P6) $P4 = $P3.'fullname'() WSubId_148(self, "__FUNCTION__", $P4) $P2 = __ARG_1.'get'() $P4 = $P2.'isop'("{") if $P4 goto __label_2 WSubId_29("{", $P2) __label_2: # endif new $P6, [ 'Winxed'; 'Compiler'; 'CompoundStatement' ] $P6.'CompoundStatement'($P2, __ARG_1, self) set $P5, $P6 setattribute self, 'body', $P5 .return(self) .end # parse .sub 'emit_extra_modifiers' :method .param pmc __ARG_1 getattribute $P2, self, 'is_multi' if_null $P2, __label_1 unless $P2 goto __label_1 getattribute $P1, self, 'multi_sig' unless_null $P1, __label_2 $P1 = self.'default_multi_sig'() __label_2: # endif join $S1, ", ", $P1 __ARG_1.'print'(" :multi(", $S1, ")") __label_1: # endif .end # emit_extra_modifiers .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'FunctionStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'FunctionBase' ] addparent $P0, $P1 addattribute $P0, 'paramnum' addattribute $P0, 'lexnum' addattribute $P0, 'is_multi' addattribute $P0, 'multi_sig' .end .namespace [ 'Winxed'; 'Compiler'; 'LocalFunctionStatement' ] .sub 'LocalFunctionStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' bindlast1 = "bindlast1" self.'FunctionBase'(__ARG_1, __ARG_3) $P1 = __ARG_3.'getouter'() isa $I2, $P1, [ 'Winxed'; 'Compiler'; 'InlineStatement' ] not $I1, $I2 unless $I1 goto __label_1 self.'activate'() __label_1: # endif self.'parse_parameters'(__ARG_2) $P2 = __ARG_2.'get'() bindlast1("{", $P2) new $P5, [ 'Winxed'; 'Compiler'; 'CompoundStatement' ] $P5.'CompoundStatement'($P2, __ARG_2, self) set $P4, $P5 setattribute self, 'body', $P4 unless $I1 goto __label_2 __ARG_3.'addlocalfunction'(self) __label_2: # endif .end # LocalFunctionStatement .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'LocalFunctionStatement' ] $P1.'clonebase'(self, __ARG_1) $P1.'activate'() getattribute $P2, self, 'params' if_null $P2, __label_1 getattribute $P5, self, 'params' $P4 = $P5.'clone'($P1) setattribute $P1, 'params', $P4 __label_1: # endif getattribute $P4, self, 'body' $P3 = $P4.'clone'($P1) setattribute $P1, 'body', $P3 __ARG_1.'addlocalfunction'($P1) .return($P1) .end # clone .sub 'activate' :method getattribute $P2, self, 'owner' $P1 = $P2.'getouter'() $P1.'makesubid'() setattribute self, 'outer', $P1 $P3 = self.'makesubid'() setattribute self, 'name', $P3 .end # activate .sub 'isanonymous' :method .return(1) .end # isanonymous .sub 'ismethod' :method .return(0) .end # ismethod .sub 'needclosure' :method .const 'Sub' bindmethod = "bindmethod" getattribute $P4, self, 'lexicals' isnull $I1, $P4 not $I1 if $I1 goto __label_2 getattribute $P5, self, 'usedlexicals' isnull $I1, $P5 not $I1 __label_2: unless $I1 goto __label_1 .return(1) __label_1: # endif getattribute $P1, self, 'localfun' $P2 = bindmethod("needclosure") if_null $P1, __label_4 iter $P7, $P1 set $P7, 0 __label_3: # for iteration unless $P7 goto __label_4 shift $P3, $P7 $P4 = $P2($P3) if_null $P4, __label_5 unless $P4 goto __label_5 set $P6, $P3 goto __label_6 __label_5: # endif goto __label_3 __label_4: # endfor null $P6 __label_6: set $P4, $P6 isnull $I1, $P4 not $I1 .return($I1) .end # needclosure .sub 'getsubid' :method getattribute $P1, self, 'subid' .return($P1) .end # getsubid .sub 'generateparamnum' :method getattribute $P1, self, 'outer' .tailcall $P1.'generateparamnum'() .end # generateparamnum .sub 'generatelexnum' :method getattribute $P1, self, 'outer' .tailcall $P1.'generatelexnum'() .end # generatelexnum .sub 'checkvarlexical' :method .param pmc __ARG_1 .param pmc __ARG_2 $P5 = __ARG_2.'isconst'() if_null $P5, __label_1 unless $P5 goto __label_1 .return(__ARG_2) __label_1: # endif $P5 = __ARG_2.'getreg'() null $S1 if_null $P5, __label_2 set $S1, $P5 __label_2: substr $S4, $S1, 0, 6 ne $S4, "WSubId", __label_3 self.'usesubid'($S1) .return(__ARG_2) __label_3: # endif $P1 = __ARG_2.'getscope'() $P2 = $P1.'getouter'() isa $I2, $P2, [ 'Winxed'; 'Compiler'; 'FunctionBase' ] if $I2 goto __label_5 isa $I2, $P2, [ 'Winxed'; 'Compiler'; 'InlinedBlock' ] __label_5: unless $I2 goto __label_4 isa $I3, $P2, [ 'Winxed'; 'Compiler'; 'InlinedBlock' ] unless $I3 goto __label_6 $P2 = $P2.'getlexicalouter'() __label_6: # endif getattribute $P3, self, 'outer' isa $I2, $P3, [ 'Winxed'; 'Compiler'; 'InlinedBlock' ] unless $I2 goto __label_7 $P3 = $P3.'getlexicalouter'() __label_7: # endif $P5 = $P2.'same_scope_as'($P3) if_null $P5, __label_8 unless $P5 goto __label_8 $P6 = $P1.'makelexical'(__ARG_2) null $S2 if_null $P6, __label_9 set $S2, $P6 __label_9: $P5 = __ARG_2.'getflags'() set $I2, $P5 bor $I1, $I2, 2 $P5 = __ARG_2.'gettype'() null $S3 if_null $P5, __label_10 set $S3, $P5 __label_10: eq $S3, "P", __label_11 bor $I1, $I1, 1 __label_11: # endif $P5 = __ARG_2.'gettype'() $P4 = self.'createvar'(__ARG_1, $P5, $I1) $P4.'setlex'($S2) $P5 = $P4.'getreg'() self.'setusedlex'($S2, $P5) .return($P4) __label_8: # endif __label_4: # endif .return(__ARG_2) .end # checkvarlexical .sub 'getvar' :method .param pmc __ARG_1 .const 'Sub' InternalError = "InternalError" $P1 = self.'getlocalvar'(__ARG_1) unless_null $P1, __label_1 $P1 = self.'getusedvar'(__ARG_1) __label_1: # endif unless_null $P1, __label_2 getattribute $P3, self, 'owner' $P1 = $P3.'getvar'(__ARG_1) unless_null $P1, __label_3 set $S3, __ARG_1 ne $S3, "self", __label_5 getattribute $P2, self, 'outer' isa $I1, $P2, [ 'Winxed'; 'Compiler'; 'InlinedBlock' ] unless $I1 goto __label_6 $P2 = $P2.'getlexicalouter'() __label_6: # endif $P3 = $P2.'ismethod'() if_null $P3, __label_7 unless $P3 goto __label_7 $P4 = $P2.'makelexicalself'() null $S1 if_null $P4, __label_8 set $S1, $P4 __label_8: $P1 = self.'createvar'(__ARG_1, "P") $P3 = $P1.'getreg'() null $S2 if_null $P3, __label_9 set $S2, $P3 __label_9: self.'setusedlex'($S1, $S2) __label_7: # endif __label_5: # endif goto __label_4 __label_3: # else $P1 = self.'checkvarlexical'(__ARG_1, $P1) __label_4: # endif __label_2: # endif if_null $P1, __label_10 isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'VarData' ] if $I1 goto __label_10 InternalError("Incorrect data for variable in LocalFunction") __label_10: # endif .return($P1) .end # getvar .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'LocalFunctionStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'FunctionBase' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'MethodStatement' ] .sub 'MethodStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'FunctionStatement'(__ARG_1, __ARG_2, __ARG_3) .end # MethodStatement .sub 'ismethod' :method .return(1) .end # ismethod .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'MethodStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'FunctionStatement' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'InlineParam' ] .sub 'InlineParam' :method .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_136 = "WSubId_136" null $I1 $P1 = __ARG_1.'get'() self.'initbase'($P1, __ARG_2) $P3 = $P1.'getidentifier'() set $S2, $P3 ne $S2, "const", __label_1 bor $I1, $I1, 1 $P1 = __ARG_1.'get'() __label_1: # endif null $S1 $P2 = __ARG_1.'get'() $P3 = $P2.'isop'(",") if $P3 goto __label_4 $P3 = $P2.'isop'(")") __label_4: if_null $P3, __label_2 unless $P3 goto __label_2 set $S1, "?" __ARG_1.'unget'($P2) goto __label_3 __label_2: # else $P4 = $P1.'getidentifier'() $P3 = WSubId_136($P4) set $S1, $P3 set $P1, $P2 __label_3: # endif box $P3, $I1 setattribute self, 'flags', $P3 box $P3, $S1 setattribute self, 'type', $P3 setattribute self, 'name', $P1 .end # InlineParam .sub 'isconst' :method getattribute $P1, self, 'flags' set $I2, $P1 band $I1, $I2, 1 .return($I1) .end # isconst .sub 'getname' :method getattribute $P1, self, 'name' .return($P1) .end # getname .sub 'gettype' :method getattribute $P1, self, 'type' .return($P1) .end # gettype .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'InlineParam' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'CommonBase' ] addparent $P0, $P1 addattribute $P0, 'flags' addattribute $P0, 'type' addattribute $P0, 'name' .end .namespace [ 'Winxed'; 'Compiler'; 'InlineStatement' ] .sub 'InlineStatement' :subid('WSubId_15') :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' ExpectOp = "ExpectOp" .const 'Sub' WSubId_74 = "WSubId_74" .const 'Sub' WSubId_16 = "WSubId_16" .const 'Sub' WSubId_136 = "WSubId_136" .const 'Sub' SyntaxError = "SyntaxError" .const 'Sub' bindlast1 = "bindlast1" .const 'Sub' WSubId_134 = "WSubId_134" .lex '__WLEX_self', self self.'BlockStatement'(__ARG_1, __ARG_3) $P1 = __ARG_2.'get'() ExpectOp("(", __ARG_2) $P2 = __ARG_2.'get'() $P3 = $P2.'isop'(")") if $P3 goto __label_1 __ARG_2.'unget'($P2) newclosure $P5, WSubId_16 $P4 = WSubId_74(__ARG_2, __ARG_3, $P5, ")") setattribute self, 'params', $P4 __label_1: # endif $P2 = __ARG_2.'get'() null $S1 $P3 = $P2.'iskeyword'("return") if_null $P3, __label_2 unless $P3 goto __label_2 $P2 = __ARG_2.'get'() $P3 = $P2.'getidentifier'() null $S2 if_null $P3, __label_4 set $S2, $P3 __label_4: $P3 = WSubId_136($S2) set $S1, $P3 ne $S1, "", __label_5 SyntaxError("Invalid return type", $P2) __label_5: # endif $P2 = __ARG_2.'get'() goto __label_3 __label_2: # else set $S1, "v" __label_3: # endif bindlast1("{", $P2) __ARG_2.'unget'($P2) $P4 = WSubId_134(__ARG_2, self) setattribute self, 'body', $P4 setattribute self, 'name', $P1 box $P3, $S1 setattribute self, 'rettype', $P3 .end # InlineStatement .sub '' :anon :subid('WSubId_16') :outer('WSubId_15') .param pmc __ARG_4 .param pmc __ARG_5 find_lex $P1, '__WLEX_self' new $P3, [ 'Winxed'; 'Compiler'; 'InlineParam' ] $P3.'InlineParam'(__ARG_4, $P1) set $P2, $P3 .return($P2) .end # WSubId_16 .sub 'getouter' :method .return(self) .end # getouter .sub 'getlexicalouter' :method null $P1 .return($P1) .end # getlexicalouter .sub 'createreg' :method .param string __ARG_1 .return("FAKEREG") .end # createreg .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'InlineStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'BlockStatement' ] addparent $P0, $P1 get_class $P2, [ 'Winxed'; 'Compiler'; 'VarContainer' ] addparent $P0, $P2 addattribute $P0, 'name' addattribute $P0, 'rettype' addattribute $P0, 'body' addattribute $P0, 'params' .end .namespace [ 'Winxed'; 'Compiler'; 'InlinedBlock' ] .sub 'InlinedBlock' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' SyntaxError = "SyntaxError" getattribute $P7, __ARG_2, 'start' self.'BlockStatement'($P7, __ARG_1) setattribute self, 'inliner', __ARG_2 setattribute self, 'inlined', __ARG_1 getattribute $P1, __ARG_1, 'params' unless_null $P1, __label_2 null $I1 goto __label_1 __label_2: elements $I1, $P1 __label_1: unless_null __ARG_3, __label_4 null $I2 goto __label_3 __label_4: $P7 = __ARG_3.'numargs'() set $I2, $P7 __label_3: eq $I1, $I2, __label_5 SyntaxError("Wrong arguments in inline expansion", __ARG_2) __label_5: # endif null $I3 __label_8: # for condition ge $I3, $I1, __label_7 $P2 = $P1[$I3] $P3 = $P2.'getname'() $P4 = __ARG_3.'getfreearg'($I3) $P7 = $P2.'gettype'() null $S1 if_null $P7, __label_9 set $S1, $P7 __label_9: ne $S1, "?", __label_10 $P7 = $P4.'checkresult'() set $S1, $P7 __label_10: # endif $P7 = $P2.'isconst'() set $I4, $P7 unless $I4 goto __label_11 $P7 = $P4.'hascompilevalue'() unless $P7 goto __label_11 $P5 = self.'createconst'($P3, $S1) $P5.'setvalue'($P4) goto __label_12 __label_11: # else self.'createvar'($P3, $S1, 0) __label_12: # endif __label_6: # for iteration inc $I3 goto __label_8 __label_7: # for end setattribute self, 'params', $P1 setattribute self, 'args', __ARG_3 getattribute $P6, __ARG_1, 'body' $P6 = $P6.'clone'(self) $P6 = $P6.'optimize'() setattribute self, 'body', $P6 .end # InlinedBlock .sub 'getouter' :method .return(self) .end # getouter .sub 'getlexicalouter' :method getattribute $P2, self, 'inliner' getattribute $P1, $P2, 'owner' .tailcall $P1.'getouter'() .end # getlexicalouter .sub 'islaststatement' :method .param pmc __ARG_1 getattribute $P1, self, 'body' __label_2: # while if_null $P1, __label_1 isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'CompoundStatement' ] unless $I1 goto __label_1 $P1 = $P1.'last'() goto __label_2 __label_1: # endwhile issame $I1, $P1, __ARG_1 .return($I1) .end # islaststatement .sub 'generateparamnum' :method $P1 = self.'getlexicalouter'() .tailcall $P1.'generateparamnum'() .end # generateparamnum .sub 'addlocalfunction' :method .param pmc __ARG_1 getattribute $P1, self, 'inliner' $P1.'addlocalfunction'(__ARG_1) .end # addlocalfunction .sub 'setlex' :method .param string __ARG_1 .param string __ARG_2 $P1 = self.'getlexicalouter'() $P1.'setlex'(__ARG_1, __ARG_2) .end # setlex .sub 'createreg' :method .param string __ARG_1 getattribute $P2, self, 'inliner' getattribute $P1, $P2, 'owner' .tailcall $P1.'createreg'(__ARG_1) .end # createreg .sub 'tempreg' :method .param string __ARG_1 getattribute $P1, self, 'inliner' .tailcall $P1.'tempreg'(__ARG_1) .end # tempreg .sub 'freetemps' :method getattribute $P2, self, 'inliner' getattribute $P1, $P2, 'owner' $P1.'freetemps'() .end # freetemps .sub 'makesubid' :method $P1 = self.'getlexicalouter'() $P1.'makesubid'() .end # makesubid .sub 'usesubid' :method .param string __ARG_1 getattribute $P1, self, 'usedsubids' unless_null $P1, __label_1 root_new $P1, ['parrot';'Hash'] setattribute self, 'usedsubids', $P1 __label_1: # endif $P1[__ARG_1] = 1 .end # usesubid .sub 'genlabel' :method getattribute $P1, self, 'inliner' .tailcall $P1.'genlabel'() .end # genlabel .sub 'getendlabel' :method getattribute $P1, self, 'endlabel' unless_null $P1, __label_1 $P1 = self.'genlabel'() setattribute self, 'endlabel', $P1 __label_1: # endif set $S1, $P1 .return($S1) .end # getendlabel .sub 'getrettype' :method getattribute $P2, self, 'inlined' getattribute $P1, $P2, 'rettype' .return($P1) .end # getrettype .sub 'checkresult' :method getattribute $P2, self, 'inlined' getattribute $P1, $P2, 'rettype' .return($P1) .end # checkresult .sub 'getretreg' :method getattribute $P1, self, 'retreg' .return($P1) .end # getretreg .sub 'emitret' :method .param pmc __ARG_1 .param pmc __ARG_2 $P2 = self.'getrettype'() null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: if_null __ARG_2, __label_2 $P1 = self.'getretreg'() unless_null $P1, __label_3 __ARG_2.'emit_void'(__ARG_1) goto __label_4 __label_3: # else $P2 = __ARG_2.'isnull'() if_null $P2, __label_5 unless $P2 goto __label_5 __ARG_1.'emitnull'($P1) goto __label_6 __label_5: # else $P3 = __ARG_2.'checkresult'() null $S2 if_null $P3, __label_7 set $S2, $P3 __label_7: ne $S2, $S1, __label_8 __ARG_2.'emit'(__ARG_1, $P1) goto __label_9 __label_8: # else $P2 = __ARG_2.'emit_get'(__ARG_1) null $S3 if_null $P2, __label_10 set $S3, $P2 __label_10: self.'annotate'(__ARG_1) ne $S1, "P", __label_11 __ARG_1.'emitbox'($P1, $S3) goto __label_12 __label_11: # else __ARG_1.'emitset'($P1, $S3) __label_12: # endif __label_9: # endif __label_6: # endif __label_4: # endif __label_2: # endif .end # emitret .sub 'emit_it' :method .param pmc __ARG_1 .const 'Sub' WSubId_147 = "WSubId_147" $P10 = __ARG_1.'getDebug'() if_null $P10, __label_1 unless $P10 goto __label_1 __ARG_1.'comment'("inlined start") __label_1: # endif getattribute $P1, self, 'params' getattribute $P2, self, 'args' unless_null $P1, __label_3 null $I1 goto __label_2 __label_3: elements $I1, $P1 __label_2: null $I2 __label_6: # for condition ge $I2, $I1, __label_5 $P3 = $P1[$I2] $P4 = $P2.'getfreearg'($I2) $P10 = $P3.'isconst'() unless $P10 goto __label_7 $P11 = $P4.'hascompilevalue'() unless $P11 goto __label_7 goto __label_4 # continue __label_7: # endif $P10 = $P3.'gettype'() null $S1 if_null $P10, __label_8 set $S1, $P10 __label_8: $P10 = $P4.'checkresult'() null $S2 if_null $P10, __label_9 set $S2, $P10 __label_9: $P12 = $P3.'getname'() $P11 = self.'getvar'($P12) $P10 = $P11.'getreg'() null $S3 if_null $P10, __label_10 set $S3, $P10 __label_10: iseq $I3, $S1, "?" if $I3 goto __label_13 iseq $I3, $S2, $S1 __label_13: unless $I3 goto __label_11 $P4.'emit_init'(__ARG_1, $S3) goto __label_12 __label_11: # else $P10 = $P4.'emit_get'(__ARG_1) null $S4 if_null $P10, __label_14 set $S4, $P10 __label_14: ne $S1, "P", __label_15 __ARG_1.'emitbox'($S3, $S4) goto __label_16 __label_15: # else __ARG_1.'emitset'($S3, $S4) __label_16: # endif __label_12: # endif __label_4: # for iteration inc $I2 goto __label_6 __label_5: # for end getattribute $P5, self, 'usedsubids' root_new $P6, ['parrot';'ResizablePMCArray'] set $P7, WSubId_147 if_null $P5, __label_18 iter $P14, $P5 set $P14, 0 __label_17: # for iteration unless $P14 goto __label_18 shift $P8, $P14 $P10 = $P7($P8) push $P6, $P10 goto __label_17 __label_18: # endfor set $P13, $P6 set $P10, $P13 join $S5, "", $P10 __ARG_1.'print'($S5) getattribute $P10, self, 'body' $P10.'emit'(__ARG_1) getattribute $P9, self, 'endlabel' if_null $P9, __label_19 __ARG_1.'emitlabel'($P9) __label_19: # endif .end # emit_it .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 $P1 = self.'getrettype'() null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: box $P1, __ARG_2 setattribute self, 'retreg', $P1 $P1 = __ARG_1.'getDebug'() set $I1, $P1 self.'emit_it'(__ARG_1) $P1 = __ARG_1.'getDebug'() if_null $P1, __label_2 unless $P1 goto __label_2 __ARG_1.'comment'("inlined end") __label_2: # endif .end # emit .sub 'emit_void' :method .param pmc __ARG_1 self.'emit_it'(__ARG_1) $P1 = __ARG_1.'getDebug'() if_null $P1, __label_1 unless $P1 goto __label_1 __ARG_1.'comment'("inlined end") __label_1: # endif .end # emit_void .sub 'emit_get' :method .param pmc __ARG_1 .const 'Sub' SyntaxError = "SyntaxError" $P2 = self.'checkresult'() null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: ne $S1, "v", __label_2 SyntaxError("Cannot get a result from a void inline", self) __label_2: # endif $P2 = self.'createreg'($S1) null $S2 if_null $P2, __label_3 set $S2, $P2 __label_3: box $P2, $S2 setattribute self, 'retreg', $P2 self.'emit_it'(__ARG_1) ne $S1, "P", __label_4 $P1 = self.'tempreg'("P") __ARG_1.'emitset'($P1, $S2) set $S2, $P1 __label_4: # endif $P2 = __ARG_1.'getDebug'() if_null $P2, __label_5 unless $P2 goto __label_5 __ARG_1.'comment'("inlined end") __label_5: # endif .return($S2) .end # emit_get .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'InlinedBlock' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'BlockStatement' ] addparent $P0, $P1 addattribute $P0, 'inliner' addattribute $P0, 'inlined' addattribute $P0, 'usedsubids' addattribute $P0, 'params' addattribute $P0, 'args' addattribute $P0, 'body' addattribute $P0, 'endlabel' addattribute $P0, 'retreg' .end .namespace [ 'Winxed'; 'Compiler'; 'InlineRef' ] .sub 'InlineRef' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'Expr'(__ARG_1, __ARG_2) setattribute self, 'inlined', __ARG_3 .end # InlineRef .sub 'checkresult' :method .return("v") .end # checkresult .sub 'misused' :method .const 'Sub' SyntaxError = "SyntaxError" getattribute $P1, self, 'start' SyntaxError("inline used by reference", $P1) .end # misused .sub 'emit_void' :method .param pmc __ARG_1 self.'misused'() .end # emit_void .sub 'emit_get' :method .param pmc __ARG_1 self.'misused'() .end # emit_get .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 self.'misused'() .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'InlineRef' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'FinalExpr' ] addparent $P0, $P1 addattribute $P0, 'inlined' .end .namespace [ 'Winxed'; 'Compiler'; 'CallInlineExpr' ] .sub 'CallInlineExpr' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 getattribute $P1, __ARG_2, 'start' self.'Expr'(__ARG_1, $P1) new $P3, [ 'Winxed'; 'Compiler'; 'InlinedBlock' ] getattribute $P4, __ARG_2, 'inlined' $P3.'InlinedBlock'($P4, __ARG_1, __ARG_3) set $P2, $P3 setattribute self, 'block', $P2 .end # CallInlineExpr .sub 'checkresult' :method getattribute $P1, self, 'block' .tailcall $P1.'checkresult'() .end # checkresult .sub 'emit_void' :method .param pmc __ARG_1 getattribute $P1, self, 'block' $P1.'emit_void'(__ARG_1) .end # emit_void .sub 'emit_get' :method .param pmc __ARG_1 getattribute $P1, self, 'block' .tailcall $P1.'emit_get'(__ARG_1) .end # emit_get .sub 'emit' :method .param pmc __ARG_1 .param string __ARG_2 getattribute $P1, self, 'block' $P1.'emit'(__ARG_1, __ARG_2) .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'CallInlineExpr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'FinalExpr' ] addparent $P0, $P1 addattribute $P0, 'block' .end .namespace [ 'Winxed'; 'Compiler'; 'SigParameter' ] .sub 'SigParameter' :method .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' bindlast0 = "bindlast0" .const 'Sub' WSubId_136 = "WSubId_136" setattribute self, 'owner', __ARG_2 $P1 = __ARG_1.'get'() $P3 = $P1.'isidentifier'() if $P3 goto __label_1 bindlast0($P1) __label_1: # endif $P2 = __ARG_1.'get'() $P3 = $P2.'isidentifier'() if_null $P3, __label_2 unless $P3 goto __label_2 $P5 = $P1.'checkkeyword'() $P4 = WSubId_136($P5) null $S1 if_null $P4, __label_3 set $S1, $P4 __label_3: box $P3, $S1 setattribute self, 'type', $P3 set $P1, $P2 $P2 = __ARG_1.'get'() __label_2: # endif setattribute self, 'name', $P1 $P3 = $P2.'isop'("[") if_null $P3, __label_4 unless $P3 goto __label_4 new $P6, [ 'Winxed'; 'Compiler'; 'ParameterModifierList' ] $P6.'ParameterModifierList'(__ARG_1, __ARG_2) set $P5, $P6 setattribute self, 'modifiers', $P5 $P2 = __ARG_1.'get'() __label_4: # endif $P3 = $P2.'isop'("=") if_null $P3, __label_5 unless $P3 goto __label_5 new $P6, [ 'Winxed'; 'Compiler'; 'FunctionParameterDefault' ] $P6.'FunctionParameterDefault'(__ARG_1, __ARG_2, self) set $P5, $P6 setattribute self, 'defaultexpr', $P5 goto __label_6 __label_5: # else __ARG_1.'unget'($P2) __label_6: # endif .end # SigParameter .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'SigParameter' ] setattribute $P1, 'owner', __ARG_1 getattribute $P2, self, 'name' setattribute $P1, 'name', $P2 getattribute $P3, self, 'type' if_null $P3, __label_1 setattribute $P1, 'type', $P3 __label_1: # endif getattribute $P4, self, 'modifiers' if_null $P4, __label_2 getattribute $P7, self, 'modifiers' $P6 = $P7.'clone'(__ARG_1) setattribute $P1, 'modifiers', $P6 __label_2: # endif getattribute $P4, self, 'defaultexpr' if_null $P4, __label_3 getattribute $P7, self, 'defaultexpr' $P6 = $P7.'clone'(__ARG_1, $P1) setattribute $P1, 'defaultexpr', $P6 __label_3: # endif .return($P1) .end # clone .sub 'getvar' :method getattribute $P1, self, 'owner' getattribute $P2, self, 'name' .tailcall $P1.'getvar'($P2) .end # getvar .sub 'optimize' :method getattribute $P1, self, 'owner' getattribute $P2, self, 'type' if_null $P2, __label_1 getattribute $P4, self, 'name' $P1.'createvar'($P4, $P2) __label_1: # endif getattribute $P4, self, 'modifiers' if_null $P4, __label_2 getattribute $P5, self, 'modifiers' $P5.'optimize'() __label_2: # endif getattribute $P3, self, 'defaultexpr' if_null $P3, __label_3 $P3.'optimize'() $P4 = $P1.'createreg'("I") $P3.'setoptflag'($P4) __label_3: # endif .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .const 'Sub' WSubId_102 = "WSubId_102" getattribute $P1, self, 'name' getattribute $P6, self, 'owner' $P2 = $P6.'getvar'($P1) unless_null $P2, __label_1 WSubId_102($P1, $P1) __label_1: # endif $P3 = $P2.'getreg'() __ARG_1.'print'($P3) getattribute $P4, self, 'modifiers' if_null $P4, __label_2 $P4.'emitmodifiers'(__ARG_1, $P1, $P1) __label_2: # endif getattribute $P5, self, 'defaultexpr' if_null $P5, __label_3 $P6 = $P5.'getoptflag'() __ARG_1.'print'(" :optional, ", $P6, " :opt_flag") __label_3: # endif .end # emit .sub 'emitdefault' :method .param pmc __ARG_1 getattribute $P1, self, 'defaultexpr' if_null $P1, __label_1 $P1.'emit'(__ARG_1) __label_1: # endif .end # emitdefault .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'SigParameter' ] addattribute $P0, 'owner' addattribute $P0, 'name' addattribute $P0, 'type' addattribute $P0, 'modifiers' addattribute $P0, 'defaultexpr' .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'parseSigParameter' :subid('WSubId_149') .param pmc __ARG_1 .param pmc __ARG_2 new $P2, [ 'Winxed'; 'Compiler'; 'SigParameter' ] $P2.'SigParameter'(__ARG_1, __ARG_2) set $P1, $P2 .return($P1) .end # parseSigParameter .namespace [ 'Winxed'; 'Compiler'; 'SigParameterList' ] .sub 'SigParameterList' :method .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_74 = "WSubId_74" .const 'Sub' WSubId_149 = "WSubId_149" $P2 = WSubId_74(__ARG_1, __ARG_2, WSubId_149, ")") setattribute self, 'params', $P2 .end # SigParameterList .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'SigParameterList' ] getattribute $P2, self, 'params' set $P3, __ARG_1 .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" set $P4, $P2 root_new $P5, ['parrot';'ResizablePMCArray'] $P10 = bindmethod("clone") $P6 = bindlast($P10, $P3) if_null $P4, __label_2 iter $P11, $P4 set $P11, 0 __label_1: # for iteration unless $P11 goto __label_2 shift $P7, $P11 $P12 = $P6($P7) push $P5, $P12 goto __label_1 __label_2: # endfor set $P9, $P5 set $P8, $P9 setattribute $P1, 'params', $P8 .return($P1) .end # clone .sub 'optimize' :method getattribute $P1, self, 'params' if_null $P1, __label_2 elements $I1, $P1 goto __label_1 __label_2: null $I1 __label_1: null $I2 __label_5: # for condition ge $I2, $I1, __label_4 $P3 = $P1[$I2] $P2 = $P3.'optimize'() $P1[$I2] = $P2 __label_3: # for iteration inc $I2 goto __label_5 __label_4: # for end .end # optimize .sub 'emit' :method .param pmc __ARG_1 __ARG_1.'print'("(") set $S1, "" getattribute $P2, self, 'params' if_null $P2, __label_2 iter $P3, $P2 set $P3, 0 __label_1: # for iteration unless $P3 goto __label_2 shift $P1, $P3 __ARG_1.'print'($S1) $P1.'emit'(__ARG_1) set $S1, ", " goto __label_1 __label_2: # endfor __ARG_1.'print'(")") .end # emit .sub 'emitdefaults' :method .param pmc __ARG_1 .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" getattribute $P1, self, 'params' $P4 = bindmethod("emitdefault") $P2 = bindlast($P4, __ARG_1) if_null $P1, __label_2 iter $P5, $P1 set $P5, 0 __label_1: # for iteration unless $P5 goto __label_2 shift $P3, $P5 $P2($P3) goto __label_1 __label_2: # endfor .end # emitdefaults .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'SigParameterList' ] addattribute $P0, 'params' .end .namespace [ 'Winxed'; 'Compiler'; 'MultiAssignStatement' ] .sub 'MultiAssignStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 self.'Statement'(__ARG_1, __ARG_2) setattribute self, 'params', __ARG_3 setattribute self, 'expr', __ARG_4 .end # MultiAssignStatement .sub 'clone' :method .param pmc __ARG_1 new $P2, [ 'Winxed'; 'Compiler'; 'MultiAssignStatement' ] getattribute $P3, self, 'start' getattribute $P5, self, 'params' $P4 = $P5.'clone'(__ARG_1) getattribute $P7, self, 'expr' $P6 = $P7.'clone'(__ARG_1) $P2.'MultiAssignStatement'($P3, __ARG_1, $P4, $P6) set $P1, $P2 .return($P1) .end # clone .sub 'optimize' :method getattribute $P3, self, 'expr' $P2 = $P3.'optimize'() setattribute self, 'expr', $P2 getattribute $P1, self, 'params' $P1.'optimize'() .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .const 'Sub' SyntaxError = "SyntaxError" getattribute $P1, self, 'expr' isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'CallExpr' ] if $I1 goto __label_1 SyntaxError("multi assignment used with non function call", $P1) __label_1: # endif $P2 = $P1.'emitcall'(__ARG_1) $P1.'prepareargs'(__ARG_1) getattribute $P3, self, 'params' __ARG_1.'print'(" ") $P3.'emit'(__ARG_1) __ARG_1.'print'(" = ", $P2) $P1.'emitargs'(__ARG_1) __ARG_1.'say'() $P3.'emitdefaults'(__ARG_1) .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'MultiAssignStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'Statement' ] addparent $P0, $P1 addattribute $P0, 'params' addattribute $P0, 'expr' .end .namespace [ 'Winxed'; 'Compiler' ] .namespace [ 'Winxed'; 'Compiler'; 'ClassSpecifier' ] .sub 'ClassSpecifier' :method .param pmc __ARG_1 .param pmc __ARG_2 self.'initbase'(__ARG_2, __ARG_1) .end # ClassSpecifier .sub 'reftype' :method .return(0) .end # reftype .sub 'annotate' :method .param pmc __ARG_1 getattribute $P1, self, 'start' __ARG_1.'annotate'($P1) .end # annotate .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ClassSpecifier' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'CommonBase' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler'; 'ClassSpecifierStr' ] .sub 'ClassSpecifierStr' :method .param pmc __ARG_1 .param pmc __ARG_2 self.'ClassSpecifier'(__ARG_1, __ARG_2) setattribute self, 'name', __ARG_2 .end # ClassSpecifierStr .sub 'reftype' :method .return(1) .end # reftype .sub 'emit' :method .param pmc __ARG_1 .param pmc __ARG_2 getattribute $P2, self, 'name' $P1 = $P2.'getPirString'() null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: __ARG_1.'print'($S1) .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ClassSpecifierStr' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'ClassSpecifier' ] addparent $P0, $P1 addattribute $P0, 'name' .end .namespace [ 'Winxed'; 'Compiler'; 'ClassSpecifierParrotKey' ] .sub 'ClassSpecifierParrotKey' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' Expected = "Expected" .const 'Sub' WSubId_80 = "WSubId_80" .const 'Sub' bindlast1 = "bindlast1" self.'ClassSpecifier'(__ARG_2, __ARG_3) root_new $P1, ['parrot';'ResizablePMCArray'] $P2 = __ARG_1.'get'() $P3 = $P2.'isstring'() if $P3 goto __label_1 Expected("literal string", $P2) __label_1: # endif $P3 = $P2.'rawstring'() push $P1, $P3 $P2 = __ARG_1.'get'() $P3 = $P2.'isop'("]") if $P3 goto __label_2 $P4 = $P2.'checkop'() set $S1, $P4 if_null $S1, __label_3 length $I1, $S1 ne $I1, 1, __label_3 ord $I1, $S1 if $I1 == 58 goto __label_5 if $I1 == 44 goto __label_6 goto __label_3 __label_5: # case box $P5, 1 setattribute self, 'hll', $P5 __label_6: # case goto __label_4 # break __label_3: # default WSubId_80("token in class key", $P2) __label_4: # switch end __label_7: # do $P2 = __ARG_1.'get'() $P3 = $P2.'isstring'() if $P3 goto __label_10 Expected("literal string", $P2) __label_10: # endif $P3 = $P2.'rawstring'() push $P1, $P3 __label_9: # continue $P2 = __ARG_1.'get'() $P3 = $P2.'isop'(",") if_null $P3, __label_8 if $P3 goto __label_7 __label_8: # enddo bindlast1("]", $P2) __label_2: # endif setattribute self, 'key', $P1 .end # ClassSpecifierParrotKey .sub 'reftype' :method .return(2) .end # reftype .sub 'hasHLL' :method getattribute $P1, self, 'hll' isnull $I1, $P1 not $I1 .return($I1) .end # hasHLL .sub 'checknskey' :method .param pmc __ARG_1 getattribute $P2, self, 'key' $P1 = __ARG_1.'scopesearch'($P2, 2) if_null $P1, __label_2 $P2 = $P1.'getpath'() goto __label_1 __label_2: null $P2 __label_1: .return($P2) .end # checknskey .sub 'emit' :method .param pmc __ARG_1 .param pmc __ARG_2 getattribute $P1, self, 'key' null $S1 elements $I1, $P1 unless $I1 goto __label_1 join $S3, "'; '", $P1 concat $S4, "[ '", $S3 concat $S4, $S4, "' ]" set $S1, $S4 __label_1: # endif set $S2, $S1 __ARG_1.'print'($S2) .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ClassSpecifierParrotKey' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'ClassSpecifier' ] addparent $P0, $P1 addattribute $P0, 'key' addattribute $P0, 'hll' .end .namespace [ 'Winxed'; 'Compiler'; 'ClassSpecifierId' ] .sub 'ClassSpecifierId' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'ClassSpecifier'(__ARG_2, __ARG_3) root_new $P1, ['parrot';'ResizablePMCArray'] assign $P1, 1 set $S1, __ARG_3 $P1[0] = $S1 null $P2 __label_2: # while $P2 = __ARG_1.'get'() $P3 = $P2.'isop'(".") if_null $P3, __label_1 unless $P3 goto __label_1 $P2 = __ARG_1.'get'() set $S1, $P2 push $P1, $S1 goto __label_2 __label_1: # endwhile __ARG_1.'unget'($P2) setattribute self, 'key', $P1 .end # ClassSpecifierId .sub 'clone' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'ClassSpecifierId' ] getattribute $P2, self, 'start' $P1.'ClassSpecifier'(__ARG_1, $P2) getattribute $P3, self, 'key' setattribute $P1, 'key', $P3 .return($P1) .end # clone .sub 'reftype' :method .return(3) .end # reftype .sub 'last' :method getattribute $P1, self, 'key' $P2 = $P1[-1] .return($P2) .end # last .sub 'checknskey' :method .param pmc __ARG_1 getattribute $P2, self, 'key' $P1 = __ARG_1.'scopesearch'($P2, 2) if_null $P1, __label_2 $P2 = $P1.'getpath'() goto __label_1 __label_2: null $P2 __label_1: .return($P2) .end # checknskey .sub 'emit' :method .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_109 = "WSubId_109" getattribute $P3, self, 'key' $P1 = __ARG_2.'scopesearch'($P3, 2) unless_null $P1, __label_1 getattribute $P3, self, 'key' join $S2, ".", $P3 getattribute $P4, self, 'start' WSubId_109(__ARG_1, $S2, $P4) getattribute $P2, self, 'key' null $S1 elements $I1, $P2 unless $I1 goto __label_3 join $S2, "'; '", $P2 concat $S4, "[ '", $S2 concat $S4, $S4, "' ]" set $S1, $S4 __label_3: # endif set $S3, $S1 __ARG_1.'print'($S3) goto __label_2 __label_1: # else $P3 = $P1.'getclasskey'() __ARG_1.'print'($P3) __label_2: # endif .end # emit .sub 'emit_new' :method .param pmc __ARG_1 .param pmc __ARG_2 .param string __ARG_3 .const 'Sub' WSubId_109 = "WSubId_109" $P1 = self.'checknskey'(__ARG_2) unless_null $P1, __label_1 getattribute $P3, self, 'key' join $S2, ".", $P3 getattribute $P4, self, 'start' WSubId_109(__ARG_1, $S2, $P4) getattribute $P2, self, 'key' null $S1 elements $I1, $P2 unless $I1 goto __label_3 join $S2, "'; '", $P2 concat $S4, "[ '", $S2 concat $S4, $S4, "' ]" set $S1, $S4 __label_3: # endif set $S3, $S1 __ARG_1.'say'("new ", __ARG_3, ", ", $S3) goto __label_2 __label_1: # else $P1.'emit_new'(__ARG_1, __ARG_2, __ARG_3) __label_2: # endif .end # emit_new .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ClassSpecifierId' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'ClassSpecifier' ] addparent $P0, $P1 addattribute $P0, 'key' .end .namespace [ 'Winxed'; 'Compiler'; 'ClassBase' ] .sub 'ClassBase' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'initbase'(__ARG_1, __ARG_3) setattribute self, 'name', __ARG_2 $P2 = __ARG_3.'getpath'() $P3 = __ARG_2.'getidentifier'() $P1 = $P2.'createchild'($P3) setattribute self, 'classns', $P1 .end # ClassBase .sub 'getpath' :method getattribute $P1, self, 'classns' .return($P1) .end # getpath .sub 'getclasskey' :method getattribute $P1, self, 'classns' .tailcall $P1.'getparrotkey'() .end # getclasskey .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ClassBase' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'CommonBase' ] addparent $P0, $P1 addattribute $P0, 'name' addattribute $P0, 'classns' .end .namespace [ 'Winxed'; 'Compiler'; 'FunctionContainer' ] .sub 'FunctionContainer' :method root_new $P2, ['parrot';'Hash'] setattribute self, 'functions', $P2 .end # FunctionContainer .sub 'addfunction' :method .param pmc __ARG_1 getattribute $P1, self, 'functions' getattribute $P3, __ARG_1, 'name' null $S1 if_null $P3, __label_1 set $S1, $P3 __label_1: $P2 = $P1[$S1] unless_null $P2, __label_2 $P1[$S1] = __ARG_1 goto __label_3 __label_2: # else isa $I1, $P2, [ 'Winxed'; 'Compiler'; 'FunctionStatement' ] unless $I1 goto __label_4 $P2.'setmulti'() __label_4: # endif isa $I1, __ARG_1, [ 'Winxed'; 'Compiler'; 'FunctionStatement' ] unless $I1 goto __label_5 __ARG_1.'setmulti'() __label_5: # endif __label_3: # endif .end # addfunction .sub 'find' :method .param string __ARG_1 getattribute $P1, self, 'functions' $P2 = $P1[__ARG_1] .return($P2) .end # find .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'FunctionContainer' ] addattribute $P0, 'functions' .end .namespace [ 'Winxed'; 'Compiler'; 'ClassStatement' ] .sub 'ClassStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param pmc __ARG_4 .const 'Sub' WSubId_74 = "WSubId_74" .const 'Sub' WSubId_103 = "WSubId_103" .const 'Sub' bindlast1 = "bindlast1" .const 'Sub' WSubId_148 = "WSubId_148" .const 'Sub' Expected = "Expected" .const 'Sub' WSubId_82 = "WSubId_82" .const 'Sub' WSubId_80 = "WSubId_80" self.'ClassBase'(__ARG_1, __ARG_2, __ARG_3) self.'VarContainer'() new $P8, [ 'Winxed'; 'Compiler'; 'FunctionContainer' ] $P8.'FunctionContainer'() set $P8, $P8 setattribute self, 'funcont', $P8 setattribute self, 'parent', __ARG_3 root_new $P1, ['parrot';'ResizablePMCArray'] setattribute self, 'items', $P1 root_new $P2, ['parrot';'ResizablePMCArray'] setattribute self, 'members', $P2 $P3 = __ARG_4.'get'() $P7 = $P3.'isop'(":") if_null $P7, __label_1 unless $P7 goto __label_1 $P9 = WSubId_74(__ARG_4, self, WSubId_103) setattribute self, 'bases', $P9 $P3 = __ARG_4.'get'() __label_1: # endif bindlast1("{", $P3) getattribute $P8, self, 'classns' $P7 = $P8.'fullname'() WSubId_148(self, "__CLASS__", $P7) $P3 = __ARG_4.'get'() __label_4: # for condition $P7 = $P3.'isop'("}") if $P7 goto __label_3 $P8 = $P3.'checkkeyword'() set $S1, $P8 if $S1 == "function" goto __label_7 if $S1 == "var" goto __label_8 if $S1 == "const" goto __label_9 goto __label_5 __label_7: # case new $P9, [ 'Winxed'; 'Compiler'; 'MethodStatement' ] $P9.'MethodStatement'($P3, __ARG_4, self) set $P4, $P9 self.'addmethod'($P4) push $P1, $P4 goto __label_6 # break __label_8: # case $P5 = __ARG_4.'get'() $P10 = $P5.'isidentifier'() if $P10 goto __label_10 Expected("member identifier", $P5) __label_10: # endif push $P2, $P5 $P3 = __ARG_4.'get'() $P11 = $P3.'isop'(";") if $P11 goto __label_11 Expected("';' in member declaration", $P3) __label_11: # endif goto __label_6 # break __label_9: # case $P6 = WSubId_82($P3, __ARG_4, self) push $P1, $P6 goto __label_6 # break __label_5: # default WSubId_80("item in class", $P3) __label_6: # switch end __label_2: # for iteration $P3 = __ARG_4.'get'() goto __label_4 __label_3: # for end .end # ClassStatement .sub 'getlabel' :method .param string __ARG_1 null $S1 .return($S1) .end # getlabel .sub 'addmethod' :method .param pmc __ARG_1 getattribute $P1, self, 'funcont' $P1.'addfunction'(__ARG_1) .end # addmethod .sub 'generatesubid' :method getattribute $P1, self, 'owner' .tailcall $P1.'generatesubid'() .end # generatesubid .sub 'checkclass' :method .param string __ARG_1 getattribute $P1, self, 'parent' .tailcall $P1.'checkclass'(__ARG_1) .end # checkclass .sub 'scopesearch' :method .param pmc __ARG_1 .param int __ARG_2 getattribute $P1, self, 'parent' .tailcall $P1.'scopesearch'(__ARG_1, __ARG_2) .end # scopesearch .sub 'use_builtin' :method .param string __ARG_1 getattribute $P1, self, 'owner' .tailcall $P1.'use_builtin'(__ARG_1) .end # use_builtin .sub 'optimize' :method getattribute $P1, self, 'items' if_null $P1, __label_2 elements $I1, $P1 goto __label_1 __label_2: null $I1 __label_1: null $I2 __label_5: # for condition ge $I2, $I1, __label_4 $P3 = $P1[$I2] $P2 = $P3.'optimize'() $P1[$I2] = $P2 __label_3: # for iteration inc $I2 goto __label_5 __label_4: # for end .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 getattribute $P8, self, 'classns' $P8.'emitnamespace'(__ARG_1) set $P1, __ARG_1 getattribute $P2, self, 'items' .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" set $P3, $P2 $P8 = bindmethod("emit") $P4 = bindlast($P8, $P1) if_null $P3, __label_2 iter $P9, $P3 set $P9, 0 __label_1: # for iteration unless $P9 goto __label_2 shift $P5, $P9 $P4($P5) goto __label_1 __label_2: # endfor __ARG_1.'say'(".sub Winxed_class_init :anon :load :init") $P8 = self.'getclasskey'() __ARG_1.'say'(" ", "newclass $P0, ", $P8) set $I1, 1 getattribute $P8, self, 'bases' if_null $P8, __label_4 iter $P10, $P8 set $P10, 0 __label_3: # for iteration unless $P10 goto __label_4 shift $P6, $P10 $P6.'annotate'(__ARG_1) set $I2, $I1 inc $I1 set $S2, $I2 concat $S1, "$P", $S2 __ARG_1.'print'(" ", "get_class ", $S1, ", ") getattribute $P8, self, 'parent' $P6.'emit'(__ARG_1, $P8) __ARG_1.'say'() __ARG_1.'say'(" ", "addparent $P0, ", $S1) goto __label_3 __label_4: # endfor getattribute $P8, self, 'members' if_null $P8, __label_6 iter $P11, $P8 set $P11, 0 __label_5: # for iteration unless $P11 goto __label_6 shift $P7, $P11 __ARG_1.'annotate'($P7) __ARG_1.'say'(" ", "addattribute $P0, '", $P7, "'") goto __label_5 __label_6: # endfor __ARG_1.'say'(".end") .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'ClassStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'ClassBase' ] addparent $P0, $P1 get_class $P2, [ 'Winxed'; 'Compiler'; 'VarContainer' ] addparent $P0, $P2 addattribute $P0, 'parent' addattribute $P0, 'bases' addattribute $P0, 'constants' addattribute $P0, 'items' addattribute $P0, 'members' addattribute $P0, 'funcont' .end .namespace [ 'Winxed'; 'Compiler'; 'DeclareClassStatement' ] .sub 'DeclareClassStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 self.'ClassBase'(__ARG_1, __ARG_2, __ARG_3) .end # DeclareClassStatement .sub 'optimize' :method .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'DeclareClassStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'ClassBase' ] addparent $P0, $P1 .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'parseClass' :subid('WSubId_152') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 $P1 = __ARG_2.'get'() $P2 = __ARG_2.'get'() root_new $P3, ['parrot';'ResizablePMCArray'] null $P4 __label_3: # for condition $P5 = $P2.'isop'(".") if_null $P5, __label_2 unless $P5 goto __label_2 $P3.'push'($P1) $P1 = __ARG_2.'get'() __label_1: # for iteration $P2 = __ARG_2.'get'() goto __label_3 __label_2: # for end $P5 = $P2.'isop'(";") if_null $P5, __label_4 unless $P5 goto __label_4 if_null $P3, __label_7 iter $P6, $P3 set $P6, 0 __label_6: # for iteration unless $P6 goto __label_7 shift $P4, $P6 set $S1, $P4 __ARG_3 = __ARG_3.'declarenamespace'($P4, $S1) goto __label_6 __label_7: # endfor new $P7, [ 'Winxed'; 'Compiler'; 'DeclareClassStatement' ] $P7.'DeclareClassStatement'(__ARG_1, $P1, __ARG_3) set $P5, $P7 __ARG_3.'declareclass'($P5) goto __label_5 __label_4: # else __ARG_2.'unget'($P2) if_null $P3, __label_9 iter $P8, $P3 set $P8, 0 __label_8: # for iteration unless $P8 goto __label_9 shift $P4, $P8 null $P5 __ARG_3 = __ARG_3.'childnamespace'(__ARG_1, $P4, $P5) goto __label_8 __label_9: # endfor new $P7, [ 'Winxed'; 'Compiler'; 'ClassStatement' ] $P7.'ClassStatement'(__ARG_1, $P1, __ARG_3, __ARG_2) set $P5, $P7 __ARG_3.'addclass'($P5) __label_5: # endif .end # parseClass .sub 'open_include' :subid('WSubId_150') .param string __ARG_1 .param pmc __ARG_2 .const 'Sub' SyntaxError = "SyntaxError" getinterp $P1 $P2 = $P1[9] $P3 = $P2[0] null $P4 if_null $P3, __label_2 iter $P5, $P3 set $P5, 0 __label_1: # for iteration unless $P5 goto __label_2 shift $S1, $P5 concat $S2, $S1, __ARG_1 new $P6, 'ExceptionHandler' set_label $P6, __label_3 push_eh $P6 root_new $P4, ["parrot";"FileHandle"] $P4."open"($S2,"r") if_null $P4, __label_5 $P6 = $P4.'is_closed'() if $P6 goto __label_5 goto __label_2 # break __label_5: # endif pop_eh goto __label_4 __label_3: .get_results($P7) finalize $P7 pop_eh __label_4: goto __label_1 __label_2: # endfor isnull $I1, $P4 box $P6, $I1 if $P6 goto __label_7 $P6 = $P4.'is_closed'() __label_7: if_null $P6, __label_6 unless $P6 goto __label_6 SyntaxError("File not found", __ARG_2) __label_6: # endif $P4.'encoding'("utf8") .return($P4) .end # open_include .sub 'include_parrot' :subid('WSubId_154') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' Expected = "Expected" .const 'Sub' ExpectOp = "ExpectOp" .const 'Sub' WSubId_150 = "WSubId_150" .const 'Sub' integerValue = "integerValue" $P1 = __ARG_2.'get'() $P6 = $P1.'isstring'() if $P6 goto __label_1 Expected("literal string", $P1) __label_1: # endif ExpectOp(";", __ARG_2) getattribute $P2, __ARG_1, 'file' getattribute $P6, __ARG_1, 'line' set $I1, $P6 $P6 = $P1.'rawstring'() null $S1 if_null $P6, __label_2 set $S1, $P6 __label_2: $P3 = WSubId_150($S1, __ARG_1) $P6 = $P3.'readline'() null $S2 if_null $P6, __label_6 set $S2, $P6 __label_6: __label_5: # for condition $P7 = $P3.'eof'() if $P7 goto __label_4 substr $S6, $S2, 0, 12 ne $S6, ".macro_const", __label_7 set $I2, 12 null $S3 __label_9: # while substr $S3, $S2, $I2, 1 iseq $I5, $S3, " " if $I5 goto __label_10 iseq $I5, $S3, "\t" __label_10: unless $I5 goto __label_8 inc $I2 goto __label_9 __label_8: # endwhile set $I3, $I2 __label_12: # while substr $S3, $S2, $I3, 1 eq $S3, " ", __label_11 eq $S3, "\t", __label_11 eq $S3, "\n", __label_11 eq $S3, "\r", __label_11 eq $S3, "", __label_11 inc $I3 goto __label_12 __label_11: # endwhile ne $I3, $I2, __label_13 goto __label_3 # continue __label_13: # endif sub $I5, $I3, $I2 substr $S4, $S2, $I2, $I5 __label_15: # while substr $S3, $S2, $I3, 1 iseq $I5, $S3, " " if $I5 goto __label_16 iseq $I5, $S3, "\t" __label_16: unless $I5 goto __label_14 inc $I3 goto __label_15 __label_14: # endwhile set $I2, $I3 __label_18: # while substr $S3, $S2, $I3, 1 eq $S3, " ", __label_17 eq $S3, "\t", __label_17 eq $S3, "\n", __label_17 eq $S3, "\r", __label_17 eq $S3, "", __label_17 inc $I3 goto __label_18 __label_17: # endwhile ne $I3, $I2, __label_19 goto __label_3 # continue __label_19: # endif sub $I5, $I3, $I2 substr $S5, $S2, $I2, $I5 null $I4 substr $S6, $S5, 0, 2 iseq $I5, $S6, "0x" if $I5 goto __label_22 substr $S7, $S5, 0, 2 iseq $I5, $S7, "0X" __label_22: unless $I5 goto __label_20 substr $S8, $S5, 2 box $P7, $S8 $P6 = $P7.'to_int'(16) set $I4, $P6 goto __label_21 __label_20: # else set $I4, $S5 __label_21: # endif new $P6, [ 'Winxed'; 'Compiler'; 'TokenIdentifier' ] $P6.'TokenIdentifier'($P2, $I1, $S4) set $P4, $P6 $P5 = __ARG_3.'createconst'($P4, "I", 4) $P6 = integerValue(__ARG_3, $P4, $I4) $P5.'setvalue'($P6) __label_7: # endif __label_3: # for iteration $P6 = $P3.'readline'() set $S2, $P6 goto __label_5 __label_4: # for end $P3.'close'() .end # include_parrot .sub 'include_winxed' :subid('WSubId_155') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' SyntaxError = "SyntaxError" .const 'Sub' Expected = "Expected" .const 'Sub' ExpectOp = "ExpectOp" .const 'Sub' WSubId_150 = "WSubId_150" isa $I1, __ARG_3, [ 'Winxed'; 'Compiler'; 'RootNamespace' ] if $I1 goto __label_1 SyntaxError("Must be used at root namespace level", __ARG_1) __label_1: # endif $P1 = __ARG_2.'get'() $P4 = $P1.'isstring'() if $P4 goto __label_2 Expected("literal string", $P1) __label_2: # endif ExpectOp(";", __ARG_2) $P4 = $P1.'rawstring'() null $S1 if_null $P4, __label_3 set $S1, $P4 __label_3: $P2 = WSubId_150($S1, __ARG_1) new $P4, [ 'Winxed'; 'Compiler'; 'Tokenizer' ] $P4.'Tokenizer'($P2, $S1, 0) set $P3, $P4 __ARG_3.'parse'($P3) $P2.'close'() .end # include_winxed .sub 'parsensUsing' :subid('WSubId_153') .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .const 'Sub' WSubId_97 = "WSubId_97" .const 'Sub' ExpectOp = "ExpectOp" .const 'Sub' parseDotted = "parseDotted" .const 'Sub' SyntaxError = "SyntaxError" .const 'Sub' parseListOrEmpty = "parseListOrEmpty" .const 'Sub' parseIdentifier = "parseIdentifier" .const 'Sub' toModuleFilename = "toModuleFilename" .const 'Sub' Expected = "Expected" $P1 = __ARG_2.'get'() $P5 = $P1.'iskeyword'("namespace") if_null $P5, __label_1 unless $P5 goto __label_1 WSubId_97(__ARG_1, __ARG_2, __ARG_3) ExpectOp(";", __ARG_2) .return() __label_1: # endif $P5 = $P1.'iskeyword'("extern") if $P5 goto __label_2 __ARG_2.'unget'($P1) $P2 = parseDotted(__ARG_2) elements $I1, $P2 ge $I1, 1, __label_3 SyntaxError("Unsupported at namespace level", $P1) __label_3: # endif ExpectOp(";", __ARG_2) __ARG_3.'use'($P2) .return() __label_2: # endif $P1 = __ARG_2.'get'() $P5 = $P1.'isstring'() set $I2, $P5 if $I2 goto __label_6 $P6 = $P1.'isidentifier'() set $I2, $P6 if $I2 goto __label_7 goto __label_5 __label_6: # case __ARG_2.'warn'("using extern 'file'; is deprecated, use $loadlib instead.", $P1) null $S1 if_null $P1, __label_8 set $S1, $P1 __label_8: __ARG_3.'addlib'($S1) ExpectOp(";", __ARG_2) goto __label_4 # break __label_7: # case __ARG_2.'unget'($P1) $P3 = parseDotted(__ARG_2) null $P7 $P4 = parseListOrEmpty(__ARG_2, $P7, parseIdentifier, ";") if_null $P4, __label_9 __ARG_3.'addextern'($P3, $P4) __label_9: # endif $P8 = toModuleFilename($P3) __ARG_3.'addload'($P8) goto __label_4 # break __label_5: # default Expected("string literal or identifier", $P1) __label_4: # switch end .end # parsensUsing .namespace [ 'Winxed'; 'Compiler'; 'External' ] .sub 'External' :method .param pmc __ARG_1 .param pmc __ARG_2 setattribute self, 'module', __ARG_1 setattribute self, 'names', __ARG_2 .end # External .sub 'emit' :subid('WSubId_17') :method .param pmc __ARG_1 .const 'Sub' WSubId_18 = "WSubId_18" .lex '__WLEX_1', __ARG_1 __ARG_1.'say'(".sub 'importextern' :anon :load :init\n .local pmc ex, curns, srcns, symbols\n ex = new ['Exporter']\n curns = get_namespace\n symbols = new ['ResizableStringArray']\n") getattribute $P4, self, 'module' join $S1, "'; '", $P4 concat $S2, "['parrot'; '", $S1 concat $S2, $S2, "']" __ARG_1.'emitget_root_namespace'("srcns", $S2) getattribute $P1, self, 'names' newclosure $P2, WSubId_18 if_null $P1, __label_2 iter $P5, $P1 set $P5, 0 __label_1: # for iteration unless $P5 goto __label_2 shift $P3, $P5 $P2($P3) goto __label_1 __label_2: # endfor __ARG_1.'say'(" ex.'destination'(curns)\n ex.'import'(srcns :named('source'), curns :named('destination'), symbols :named('globals'))\n.end\n") .end # emit .sub '' :anon :subid('WSubId_18') :outer('WSubId_17') .param string __ARG_2 find_lex $P1, '__WLEX_1' $P1.'say'(" push symbols, '", __ARG_2, "'") .end # WSubId_18 .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'External' ] addattribute $P0, 'module' addattribute $P0, 'names' .end .namespace [ 'Winxed'; 'Compiler'; 'NamespacePath' ] .sub 'NamespacePath' :method .param string __ARG_1 :optional .param int __ARG_2 :optional new $P1, ['ResizableStringArray'] unless __ARG_2 goto __label_1 box $P2, __ARG_1 setattribute self, 'hll', $P2 goto __label_2 __label_1: # else if_null __ARG_1, __label_3 push $P1, __ARG_1 __label_3: # endif __label_2: # endif setattribute self, 'path', $P1 .end # NamespacePath .sub 'createchild' :method .param string __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'NamespacePath' ] getattribute $P4, self, 'hll' setattribute $P1, 'hll', $P4 getattribute $P3, self, 'path' clone $P2, $P3 push $P2, __ARG_1 setattribute $P1, 'path', $P2 .return($P1) .end # createchild .sub 'samehllas' :method .param pmc __ARG_1 $P1 = __ARG_1.'getpath'() getattribute $P2, self, 'hll' if_null $P1, __label_2 getattribute $P3, $P1, 'hll' goto __label_1 __label_2: null $P3 __label_1: unless_null $P2, __label_3 isnull $I1, $P3 .return($I1) goto __label_4 __label_3: # else unless_null $P3, __label_6 null $I2 goto __label_5 __label_6: iseq $I2, $P2, $P3 __label_5: .return($I2) __label_4: # endif .end # samehllas .sub 'fullname' :method getattribute $P1, self, 'path' join $S1, ".", $P1 getattribute $P1, self, 'hll' if_null $P1, __label_1 getattribute $P2, self, 'hll' set $S2, $P2 concat $S3, $S2, "." concat $S3, $S3, $S1 .return($S3) goto __label_2 __label_1: # else .return($S1) __label_2: # endif .end # fullname .sub 'getparrotkey' :method getattribute $P1, self, 'path' null $S1 elements $I1, $P1 unless $I1 goto __label_1 join $S2, "'; '", $P1 concat $S3, "[ '", $S2 concat $S3, $S3, "' ]" set $S1, $S3 __label_1: # endif .return($S1) .end # getparrotkey .sub 'getparrotrootkey' :method getattribute $P1, self, 'path' getattribute $P2, self, 'hll' set $S1, "[ '" if_null $P2, __label_1 set $S3, $P2 downcase $S2, $S3 concat $S1, $S1, $S2 goto __label_2 __label_1: # else concat $S1, $S1, "parrot" __label_2: # endif concat $S1, $S1, "'" elements $I1, $P1 unless $I1 goto __label_3 join $S2, "'; '", $P1 concat $S1, $S1, "; '" concat $S1, $S1, $S2 concat $S1, $S1, "'" __label_3: # endif concat $S1, $S1, " ]" .return($S1) .end # getparrotrootkey .sub 'emitnamespace' :method .param pmc __ARG_1 getattribute $P1, self, 'path' __ARG_1.'print'(".namespace [ ") elements $I1, $P1 unless $I1 goto __label_1 join $S1, "'; '", $P1 __ARG_1.'print'("'", $S1, "' ") __label_1: # endif __ARG_1.'say'("]") .end # emitnamespace .sub 'emit_new' :method .param pmc __ARG_1 .param pmc __ARG_2 .param string __ARG_3 .param string __ARG_4 :optional .const 'Sub' sformat = "sformat" $P1 = self.'samehllas'(__ARG_2) if_null $P1, __label_1 unless $P1 goto __label_1 $P3 = self.'getparrotkey'() $P2 = sformat(" new %0, %1", __ARG_3, $P3) __ARG_1.'print'($P2) goto __label_2 __label_1: # else $P5 = self.'getparrotrootkey'() $P4 = sformat(" root_new %0, %1", __ARG_3, $P5) __ARG_1.'print'($P4) __label_2: # endif if_null __ARG_4, __label_3 eq __ARG_4, "", __label_3 __ARG_1.'print'(__ARG_4) __label_3: # endif __ARG_1.'say'() .end # emit_new .sub 'emit_get_namespace' :method .param pmc __ARG_1 .param pmc __ARG_2 .param string __ARG_3 $P1 = self.'samehllas'(__ARG_2) if_null $P1, __label_1 unless $P1 goto __label_1 $P2 = self.'getparrotkey'() __ARG_1.'emitget_hll_namespace'(__ARG_3, $P2) goto __label_2 __label_1: # else $P3 = self.'getparrotrootkey'() __ARG_1.'emitget_root_namespace'(__ARG_3, $P3) __label_2: # endif .end # emit_get_namespace .sub 'emit_get_class' :method .param pmc __ARG_1 .param pmc __ARG_2 .param string __ARG_3 .const 'Sub' sformat = "sformat" $P3 = self.'samehllas'(__ARG_2) if_null $P3, __label_1 unless $P3 goto __label_1 $P5 = self.'getparrotkey'() $P4 = sformat(" get_class %0, %1", __ARG_3, $P5) __ARG_1.'say'($P4) goto __label_2 __label_1: # else getattribute $P1, self, 'hll' getattribute $P3, self, 'path' clone $P2, $P3 $P3 = $P2.'pop'() null $S1 if_null $P3, __label_3 set $S1, $P3 __label_3: if_null $P1, __label_5 set $S3, $P1 downcase $S2, $S3 goto __label_4 __label_5: set $S2, "parrot" __label_4: elements $I1, $P2 unless $I1 goto __label_6 join $S3, "'; '", $P2 $P3 = sformat(" get_root_global %0, ['%1'; '%2'], '%3'", __ARG_3, $S2, $S3, $S1) __ARG_1.'say'($P3) goto __label_7 __label_6: # else $P4 = sformat(" get_root_global %0, ['%1'], '%2'", __ARG_3, $S2, $S1) __ARG_1.'say'($P4) __label_7: # endif $P3 = sformat(" get_class %0, %0", __ARG_3) __ARG_1.'say'($P3) __label_2: # endif .end # emit_get_class .sub 'emit_get_global' :method .param pmc __ARG_1 .param pmc __ARG_2 .param string __ARG_3 .param string __ARG_4 $P1 = self.'samehllas'(__ARG_2) if_null $P1, __label_1 unless $P1 goto __label_1 $P2 = self.'getparrotkey'() __ARG_1.'emitget_hll_global'(__ARG_3, __ARG_4, $P2) goto __label_2 __label_1: # else $P3 = self.'getparrotrootkey'() __ARG_1.'emitget_root_global'(__ARG_3, __ARG_4, $P3) __label_2: # endif .end # emit_get_global .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'NamespacePath' ] addattribute $P0, 'hll' addattribute $P0, 'path' .end .namespace [ 'Winxed'; 'Compiler'; 'NamespaceBase' ] .sub 'NamespaceBase' :method .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' WSubId_148 = "WSubId_148" self.'VarContainer'() setattribute self, 'nspath', __ARG_1 unless_null __ARG_2, __label_1 root_new $P2, ['parrot';'ResizablePMCArray'] setattribute self, 'namespaces', $P2 root_new $P2, ['parrot';'ResizablePMCArray'] setattribute self, 'usednamespaces', $P2 root_new $P2, ['parrot';'ResizablePMCArray'] setattribute self, 'classes', $P2 new $P2, [ 'Winxed'; 'Compiler'; 'FunctionContainer' ] $P2.'FunctionContainer'() set $P2, $P2 setattribute self, 'funcont', $P2 $P1 = __ARG_1.'fullname'() WSubId_148(self, "__NAMESPACE__", $P1) goto __label_2 __label_1: # else getattribute $P2, __ARG_2, 'locals' setattribute self, 'locals', $P2 getattribute $P2, __ARG_2, 'namespaces' setattribute self, 'namespaces', $P2 getattribute $P2, __ARG_2, 'usednamespaces' setattribute self, 'usednamespaces', $P2 getattribute $P2, __ARG_2, 'classes' setattribute self, 'classes', $P2 getattribute $P2, __ARG_2, 'funcont' setattribute self, 'funcont', $P2 __label_2: # endif root_new $P2, ['parrot';'ResizablePMCArray'] setattribute self, 'items', $P2 .end # NamespaceBase .sub 'getlabel' :method .param string __ARG_1 null $S1 .return($S1) .end # getlabel .sub 'addfunction' :method .param pmc __ARG_1 getattribute $P1, self, 'funcont' $P1.'addfunction'(__ARG_1) .end # addfunction .sub 'fixnamespaces' :subid('fixnamespaces') :method .const 'Sub' bindmethod = "bindmethod" .const 'Sub' method_fun = "method_fun" .const 'Sub' WSubId_20 = "WSubId_20" .lex '__WLEX_1', $P4 getattribute $P1, self, 'namespaces' $P2 = bindmethod("fixnamespaces") if_null $P1, __label_2 iter $P8, $P1 set $P8, 0 __label_1: # for iteration unless $P8 goto __label_2 shift $P3, $P8 $P2($P3) goto __label_1 __label_2: # endfor $P4 = method_fun(self, "usenamespace") getattribute $P5, self, 'usednamespaces' newclosure $P6, WSubId_20 if_null $P5, __label_4 iter $P9, $P5 set $P9, 0 __label_3: # for iteration unless $P9 goto __label_4 shift $P7, $P9 $P6($P7) goto __label_3 __label_4: # endfor .end # fixnamespaces .sub '' :anon :subid('WSubId_20') :outer('fixnamespaces') .param pmc __ARG_1 find_lex $P1, '__WLEX_1' getattribute $P2, __ARG_1, 'usednamespaces' set $P3, $P1 if_null $P2, __label_2 iter $P5, $P2 set $P5, 0 __label_1: # for iteration unless $P5 goto __label_2 shift $P4, $P5 $P3($P4) goto __label_1 __label_2: # endfor .end # WSubId_20 .sub 'getpath' :method getattribute $P1, self, 'nspath' .return($P1) .end # getpath .sub 'usenamespace' :method .param pmc __ARG_1 ne_addr __ARG_1, self, __label_1 .return() __label_1: # endif getattribute $P1, self, 'usednamespaces' set $P2, $P1 set $P3, __ARG_1 if_null $P2, __label_4 iter $P6, $P2 set $P6, 0 __label_3: # for iteration unless $P6 goto __label_4 shift $P4, $P6 ne_addr $P4, $P3, __label_5 set $P5, $P4 goto __label_6 __label_5: # endif goto __label_3 __label_4: # endfor null $P5 __label_6: set $P7, $P5 if_null $P7, __label_2 .return() __label_2: # endif push $P1, __ARG_1 .end # usenamespace .sub 'use' :method .param pmc __ARG_1 $P1 = self.'scopesearch'(__ARG_1, 0) if_null $P1, __label_1 isa $I1, $P1, [ 'Winxed'; 'Compiler'; 'FunctionStatement' ] unless $I1 goto __label_3 self.'addfunction'($P1) __label_3: # endif goto __label_2 __label_1: # else $P3 = __ARG_1.'pop'() null $S1 if_null $P3, __label_4 set $S1, $P3 __label_4: $P2 = self.'scopesearch'(__ARG_1, 1) if_null $P2, __label_5 $P1 = $P2.'getvar'($S1) if_null $P1, __label_6 self.'createvarused'($S1, $P1) __label_6: # endif __label_5: # endif __label_2: # endif .end # use .sub 'getusedns' :subid('WSubId_21') :method .param string __ARG_1 .const 'Sub' WSubId_22 = "WSubId_22" .lex '__WLEX_1', __ARG_1 getattribute $P1, self, 'usednamespaces' newclosure $P2, WSubId_22 if_null $P1, __label_2 iter $P5, $P1 set $P5, 0 __label_1: # for iteration unless $P5 goto __label_2 shift $P3, $P5 $P6 = $P2($P3) if_null $P6, __label_3 unless $P6 goto __label_3 set $P4, $P3 goto __label_4 __label_3: # endif goto __label_1 __label_2: # endfor null $P4 __label_4: set $P6, $P4 .return($P6) .end # getusedns .sub '' :anon :subid('WSubId_22') :outer('WSubId_21') .param pmc __ARG_2 find_lex $S1, '__WLEX_1' getattribute $P1, __ARG_2, 'name' find_lex $S2, '__WLEX_1' set $S3, $P1 iseq $I1, $S3, $S2 .return($I1) .end # WSubId_22 .sub 'getlocalns' :subid('WSubId_23') :method .param string __ARG_1 .const 'Sub' WSubId_24 = "WSubId_24" .lex '__WLEX_1', __ARG_1 getattribute $P2, self, 'namespaces' newclosure $P3, WSubId_24 if_null $P2, __label_2 iter $P5, $P2 set $P5, 0 __label_1: # for iteration unless $P5 goto __label_2 shift $P4, $P5 $P6 = $P3($P4) if_null $P6, __label_3 unless $P6 goto __label_3 set $P1, $P4 goto __label_4 __label_3: # endif goto __label_1 __label_2: # endfor null $P1 __label_4: if_null $P1, __label_5 .return($P1) __label_5: # endif .tailcall self.'getusedns'(__ARG_1) .end # getlocalns .sub '' :anon :subid('WSubId_24') :outer('WSubId_23') .param pmc __ARG_2 find_lex $S1, '__WLEX_1' getattribute $P1, __ARG_2, 'name' find_lex $S2, '__WLEX_1' set $S3, $P1 iseq $I1, $S3, $S2 .return($I1) .end # WSubId_24 .sub 'addextern' :method .param pmc __ARG_1 .param pmc __ARG_2 new $P3, [ 'Winxed'; 'Compiler'; 'External' ] $P3.'External'(__ARG_1, __ARG_2) set $P1, $P3 getattribute $P2, self, 'externals' unless_null $P2, __label_1 root_new $P4, ['parrot';'ResizablePMCArray'] assign $P4, 1 $P4[0] = $P1 set $P2, $P4 setattribute self, 'externals', $P2 goto __label_2 __label_1: # else push $P2, $P1 __label_2: # endif .end # addextern .sub 'checkclass_base' :subid('WSubId_25') :method .param string __ARG_1 .const 'Sub' WSubId_26 = "WSubId_26" .lex '__WLEX_1', __ARG_1 getattribute $P2, self, 'classes' newclosure $P3, WSubId_26 if_null $P2, __label_2 iter $P6, $P2 set $P6, 0 __label_1: # for iteration unless $P6 goto __label_2 shift $P4, $P6 $P7 = $P3($P4) if_null $P7, __label_3 unless $P7 goto __label_3 set $P1, $P4 goto __label_4 __label_3: # endif goto __label_1 __label_2: # endfor null $P1 __label_4: if_null $P1, __label_5 .return($P1) __label_5: # endif getattribute $P7, self, 'usednamespaces' if_null $P7, __label_7 iter $P8, $P7 set $P8, 0 __label_6: # for iteration unless $P8 goto __label_7 shift $P5, $P8 $P1 = $P5.'checkclass_base'(__ARG_1) if_null $P1, __label_8 .return($P1) __label_8: # endif goto __label_6 __label_7: # endfor null $P7 .return($P7) .end # checkclass_base .sub '' :anon :subid('WSubId_26') :outer('WSubId_25') .param pmc __ARG_2 find_lex $S1, '__WLEX_1' getattribute $P1, __ARG_2, 'name' find_lex $S2, '__WLEX_1' set $S3, $P1 iseq $I1, $S3, $S2 .return($I1) .end # WSubId_26 .sub 'findsymbolbyname' :method .param string __ARG_1 $P1 = self.'checkclass_base'(__ARG_1) if_null $P1, __label_1 .return($P1) __label_1: # endif getattribute $P2, self, 'funcont' $P1 = $P2.'find'(__ARG_1) if_null $P1, __label_2 .return($P1) __label_2: # endif $P1 = self.'getlocalvar'(__ARG_1) if_null $P1, __label_3 .return($P1) __label_3: # endif null $P3 .return($P3) .end # findsymbolbyname .sub 'scopesearchlocal' :method .param pmc __ARG_1 .param int __ARG_2 .param int __ARG_3 elements $I1, __ARG_1 null $S1 null $P1 null $P2 sub $I2, $I1, __ARG_3 if $I2 == 0 goto __label_3 if $I2 == 1 goto __label_4 goto __label_1 __label_3: # case goto __label_2 # break __label_4: # case sub $I4, $I1, 1 $S1 = __ARG_1[$I4] if __ARG_2 == 1 goto __label_7 if __ARG_2 == 2 goto __label_8 goto __label_5 __label_7: # case .tailcall self.'getlocalns'($S1) __label_8: # case .tailcall self.'checkclass_base'($S1) __label_5: # default $P1 = self.'findsymbolbyname'($S1) if_null $P1, __label_9 .return($P1) __label_9: # endif getattribute $P3, self, 'usednamespaces' if_null $P3, __label_11 iter $P4, $P3 set $P4, 0 __label_10: # for iteration unless $P4 goto __label_11 shift $P2, $P4 $P1 = $P2.'findsymbolbyname'($S1) if_null $P1, __label_12 .return($P1) __label_12: # endif goto __label_10 __label_11: # endfor __label_6: # switch end goto __label_2 # break __label_1: # default $S1 = __ARG_1[__ARG_3] $P2 = self.'getlocalns'($S1) if_null $P2, __label_13 add $I6, __ARG_3, 1 $P1 = $P2.'scopesearchlocal'(__ARG_1, __ARG_2, $I6) if_null $P1, __label_13 .return($P1) __label_13: # endif $P2 = self.'getusedns'($S1) if_null $P2, __label_14 add $I7, __ARG_3, 1 $P1 = $P2.'scopesearchlocal'(__ARG_1, __ARG_2, $I7) if_null $P1, __label_14 .return($P1) __label_14: # endif __label_2: # switch end null $P3 .return($P3) .end # scopesearchlocal .sub 'declarenamespace' :method .param pmc __ARG_1 .param string __ARG_2 .param pmc __ARG_3 :optional $P1 = self.'getlocalns'(__ARG_2) new $P3, [ 'Winxed'; 'Compiler'; 'NamespaceStatement' ] $P3.'NamespaceStatement'(self, __ARG_1, $P1, __ARG_2, __ARG_3) set $P2, $P3 getattribute $P3, self, 'namespaces' push $P3, $P2 .return($P2) .end # declarenamespace .sub 'childnamespace' :method .param pmc __ARG_1 .param string __ARG_2 .param pmc __ARG_3 $P1 = self.'declarenamespace'(__ARG_1, __ARG_2, __ARG_3) getattribute $P2, self, 'items' push $P2, $P1 .return($P1) .end # childnamespace .sub 'declareclass' :method .param pmc __ARG_1 getattribute $P1, self, 'classes' push $P1, __ARG_1 .end # declareclass .sub 'addclass' :method .param pmc __ARG_1 getattribute $P1, self, 'classes' push $P1, __ARG_1 getattribute $P1, self, 'items' push $P1, __ARG_1 .end # addclass .sub 'parsenamespace' :method .param pmc __ARG_1 .param pmc __ARG_2 .const 'Sub' bindlast1 = "bindlast1" $P1 = __ARG_2.'get'() null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: $P1 = __ARG_2.'get'() set $P2, self __label_4: # for condition $P5 = $P1.'isop'(".") if_null $P5, __label_3 unless $P5 goto __label_3 null $P6 $P2 = $P2.'childnamespace'(__ARG_1, $S1, $P6) $P5 = __ARG_2.'get'() set $S1, $P5 __label_2: # for iteration $P1 = __ARG_2.'get'() goto __label_4 __label_3: # for end null $P3 $P5 = $P1.'isop'("[") if_null $P5, __label_5 unless $P5 goto __label_5 new $P6, [ 'Winxed'; 'Compiler'; 'ModifierList' ] $P6.'ModifierList'(__ARG_2, self) set $P3, $P6 $P1 = __ARG_2.'get'() __label_5: # endif bindlast1("{", $P1) $P4 = $P2.'childnamespace'(__ARG_1, $S1, $P3) $P4.'parse'(__ARG_2) .end # parsenamespace .sub 'parseextern' :method .param pmc __ARG_1 .const 'Sub' SyntaxError = "SyntaxError" .const 'Sub' RequireIdentifier = "RequireIdentifier" .const 'Sub' ExpectOp = "ExpectOp" $P1 = __ARG_1.'get'() $P3 = $P1.'iskeyword'("function") if $P3 goto __label_1 SyntaxError("Unsupported extern", $P1) __label_1: # endif $P1 = __ARG_1.'get'() RequireIdentifier($P1) ExpectOp(";", __ARG_1) new $P3, [ 'Winxed'; 'Compiler'; 'FunctionExtern' ] $P3.'FunctionExtern'($P1, self) set $P2, $P3 self.'addfunction'($P2) .end # parseextern .sub 'parse' :method .param pmc __ARG_1 .const 'Sub' WSubId_82 = "WSubId_82" .const 'Sub' WSubId_152 = "WSubId_152" .const 'Sub' WSubId_153 = "WSubId_153" .const 'Sub' WSubId_154 = "WSubId_154" .const 'Sub' WSubId_155 = "WSubId_155" .const 'Sub' Expected = "Expected" .const 'Sub' ExpectOp = "ExpectOp" .const 'Sub' WSubId_80 = "WSubId_80" getattribute $P1, self, 'items' null $P2 $P2 = __ARG_1.'get'() __label_3: # for condition $P6 = $P2.'iseof'() if $P6 goto __label_4 $P6 = $P2.'isop'("}") __label_4: if $P6 goto __label_2 $P7 = $P2.'checkkeyword'() set $S1, $P7 if $S1 == "namespace" goto __label_7 if $S1 == "const" goto __label_8 if $S1 == "function" goto __label_9 if $S1 == "inline" goto __label_10 if $S1 == "class" goto __label_11 if $S1 == "extern" goto __label_12 if $S1 == "using" goto __label_13 if $S1 == "$include_const" goto __label_14 if $S1 == "$include" goto __label_15 if $S1 == "$load" goto __label_16 if $S1 == "$loadlib" goto __label_17 goto __label_5 __label_7: # case self.'parsenamespace'($P2, __ARG_1) goto __label_6 # break __label_8: # case $P3 = WSubId_82($P2, __ARG_1, self) push $P1, $P3 goto __label_6 # break __label_9: # case new $P8, [ 'Winxed'; 'Compiler'; 'FunctionStatement' ] $P8.'FunctionStatement'($P2, __ARG_1, self) set $P4, $P8 self.'addfunction'($P4) push $P1, $P4 goto __label_6 # break __label_10: # case new $P9, [ 'Winxed'; 'Compiler'; 'InlineStatement' ] $P9.'InlineStatement'($P2, __ARG_1, self) set $P5, $P9 self.'addfunction'($P5) goto __label_6 # break __label_11: # case WSubId_152($P2, __ARG_1, self) goto __label_6 # break __label_12: # case self.'parseextern'(__ARG_1) goto __label_6 # break __label_13: # case WSubId_153($P2, __ARG_1, self) goto __label_6 # break __label_14: # case WSubId_154($P2, __ARG_1, self) goto __label_6 # break __label_15: # case WSubId_155($P2, __ARG_1, self) goto __label_6 # break __label_16: # case $P2 = __ARG_1.'get'() $P10 = $P2.'isstring'() if $P10 goto __label_18 Expected("string literal", $P2) __label_18: # endif ExpectOp(";", __ARG_1) new $P13, [ 'Winxed'; 'Compiler'; 'StringLiteral' ] $P13.'StringLiteral'(self, $P2) set $P12, $P13 $P11 = $P12.'getPirString'() self.'addload'($P11) goto __label_6 # break __label_17: # case $P2 = __ARG_1.'get'() $P14 = $P2.'isstring'() if $P14 goto __label_19 Expected("string literal", $P2) __label_19: # endif ExpectOp(";", __ARG_1) new $P17, [ 'Winxed'; 'Compiler'; 'StringLiteral' ] $P17.'StringLiteral'(self, $P2) set $P16, $P17 $P15 = $P16.'getPirString'() self.'addlib'($P15) goto __label_6 # break __label_5: # default WSubId_80("token", $P2) __label_6: # switch end __label_1: # for iteration $P2 = __ARG_1.'get'() goto __label_3 __label_2: # for end $P6 = $P2.'iseof'() if_null $P6, __label_20 unless $P6 goto __label_20 self.'unclosed_ns'() goto __label_21 __label_20: # else self.'close_ns'($P2) __label_21: # endif .end # parse .sub 'optimize_base' :method getattribute $P1, self, 'items' if_null $P1, __label_2 elements $I1, $P1 goto __label_1 __label_2: null $I1 __label_1: null $I2 __label_5: # for condition ge $I2, $I1, __label_4 $P3 = $P1[$I2] $P2 = $P3.'optimize'() $P1[$I2] = $P2 __label_3: # for iteration inc $I2 goto __label_5 __label_4: # for end .end # optimize_base .sub 'emit_base' :method .param pmc __ARG_1 $P1 = self.'getpath'() set $I1, 1 getattribute $P2, self, 'externals' if_null $P2, __label_1 $P1.'emitnamespace'(__ARG_1) null $I1 set $P3, __ARG_1 set $P4, $P2 .const 'Sub' bindlast = "bindlast" .const 'Sub' bindmethod = "bindmethod" set $P5, $P4 $P9 = bindmethod("emit") $P6 = bindlast($P9, $P3) if_null $P5, __label_3 iter $P10, $P5 set $P10, 0 __label_2: # for iteration unless $P10 goto __label_3 shift $P7, $P10 $P6($P7) goto __label_2 __label_3: # endfor __label_1: # endif getattribute $P9, self, 'items' if_null $P9, __label_5 iter $P11, $P9 set $P11, 0 __label_4: # for iteration unless $P11 goto __label_5 shift $P8, $P11 isa $I2, $P8, [ 'Winxed'; 'Compiler'; 'NamespaceStatement' ] if $I2 goto __label_8 isa $I2, $P8, [ 'Winxed'; 'Compiler'; 'ClassStatement' ] __label_8: unless $I2 goto __label_6 set $I1, 1 goto __label_7 __label_6: # else unless $I1 goto __label_9 $P1.'emitnamespace'(__ARG_1) null $I1 __label_9: # endif __label_7: # endif $P8.'emit'(__ARG_1) goto __label_4 __label_5: # endfor .end # emit_base .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'NamespaceBase' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'VarContainer' ] addparent $P0, $P1 addattribute $P0, 'nspath' addattribute $P0, 'externals' addattribute $P0, 'namespaces' addattribute $P0, 'classes' addattribute $P0, 'funcont' addattribute $P0, 'items' addattribute $P0, 'owner' .end .namespace [ 'Winxed'; 'Compiler'; 'NamespaceStatement' ] .sub 'NamespaceStatement' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param string __ARG_4 .param pmc __ARG_5 setattribute self, 'modifier', __ARG_5 null $I1 if_null __ARG_5, __label_1 $P2 = __ARG_5.'pick'("HLL") if_null $P2, __label_2 box $P3, __ARG_4 setattribute self, 'hll', $P3 set $I1, 1 __label_2: # endif __label_1: # endif unless $I1 goto __label_4 new $P2, [ 'Winxed'; 'Compiler'; 'NamespacePath' ] $P2.'NamespacePath'(__ARG_4, 1) set $P1, $P2 goto __label_3 __label_4: $P4 = __ARG_1.'getpath'() $P3 = $P4.'createchild'(__ARG_4) set $P1, $P3 __label_3: self.'NamespaceBase'($P1, __ARG_3) setattribute self, 'parent', __ARG_1 setattribute self, 'start', __ARG_2 setattribute self, 'owner', __ARG_1 box $P2, __ARG_4 setattribute self, 'name', $P2 .end # NamespaceStatement .sub 'dowarnings' :method getattribute $P1, self, 'parent' .tailcall $P1.'dowarnings'() .end # dowarnings .sub 'generatesubid' :method getattribute $P1, self, 'owner' .tailcall $P1.'generatesubid'() .end # generatesubid .sub 'use_builtin' :method .param string __ARG_1 getattribute $P1, self, 'owner' $P1.'use_builtin'(__ARG_1) .end # use_builtin .sub 'addlib' :method .param string __ARG_1 getattribute $P1, self, 'parent' $P1.'addlib'(__ARG_1) .end # addlib .sub 'addload' :method .param string __ARG_1 getattribute $P1, self, 'parent' $P1.'addload'(__ARG_1) .end # addload .sub 'checkclass' :method .param string __ARG_1 $P1 = self.'checkclass_base'(__ARG_1) unless_null $P1, __label_1 getattribute $P2, self, 'parent' .tailcall $P2.'checkclass'(__ARG_1) __label_1: # endif .return($P1) .end # checkclass .sub 'scopesearch' :method .param pmc __ARG_1 .param int __ARG_2 .param int __ARG_3 :optional $P1 = self.'scopesearchlocal'(__ARG_1, __ARG_2, __ARG_3) unless_null $P1, __label_1 gt __ARG_3, 0, __label_1 getattribute $P2, self, 'parent' .tailcall $P2.'scopesearch'(__ARG_1, __ARG_2, __ARG_3) __label_1: # endif .return($P1) .end # scopesearch .sub 'unclosed_ns' :method .const 'Sub' SyntaxError = "SyntaxError" getattribute $P1, self, 'start' SyntaxError("unclosed namespace", $P1) .end # unclosed_ns .sub 'close_ns' :method .param pmc __ARG_1 .end # close_ns .sub 'optimize' :method getattribute $P1, self, 'modifier' if_null $P1, __label_1 $P3 = $P1.'optimize'() setattribute self, 'modifier', $P3 __label_1: # endif self.'optimize_base'() .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .const 'Sub' sformat = "sformat" getattribute $P1, self, 'hll' if_null $P1, __label_1 $P2 = sformat(".HLL '%0'", $P1) __ARG_1.'say'($P2) __label_1: # endif self.'emit_base'(__ARG_1) if_null $P1, __label_2 __ARG_1.'say'(".HLL 'parrot'") __label_2: # endif .end # emit .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'NamespaceStatement' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'NamespaceBase' ] addparent $P0, $P1 addattribute $P0, 'parent' addattribute $P0, 'start' addattribute $P0, 'name' addattribute $P0, 'modifier' addattribute $P0, 'hll' .end .namespace [ 'Winxed'; 'Compiler'; 'RootNamespace' ] .sub 'RootNamespace' :method .param pmc __ARG_1 new $P1, [ 'Winxed'; 'Compiler'; 'NamespacePath' ] $P1.'NamespacePath'() set $P1, $P1 null $P2 self.'NamespaceBase'($P1, $P2) setattribute self, 'unit', __ARG_1 root_new $P2, ['parrot';'Hash'] setattribute self, 'bultins_used', $P2 box $P1, 0 setattribute self, 'subidgen', $P1 .end # RootNamespace .sub 'use_builtin' :method .param string __ARG_1 getattribute $P1, self, 'bultins_used' $P1[__ARG_1] = 1 .end # use_builtin .sub 'generatesubid' :method getattribute $P1, self, 'subidgen' inc $P1 set $I1, $P1 set $S1, $I1 concat $S2, "WSubId_", $S1 .return($S2) .end # generatesubid .sub 'addlib' :method .param string __ARG_1 getattribute $P1, self, 'libs' unless_null $P1, __label_1 root_new $P1, ['parrot';'Hash'] setattribute self, 'libs', $P1 __label_1: # endif $P1[__ARG_1] = 1 .end # addlib .sub 'addload' :method .param string __ARG_1 getattribute $P1, self, 'loads' unless_null $P1, __label_1 root_new $P1, ['parrot';'Hash'] setattribute self, 'loads', $P1 __label_1: # endif $P1[__ARG_1] = 1 .end # addload .sub 'checkclass' :method .param string __ARG_1 .tailcall self.'checkclass_base'(__ARG_1) .end # checkclass .sub 'scopesearch' :method .param pmc __ARG_1 .param int __ARG_2 .param int __ARG_3 :optional .tailcall self.'scopesearchlocal'(__ARG_1, __ARG_2, __ARG_3) .end # scopesearch .sub 'unclosed_ns' :method .end # unclosed_ns .sub 'close_ns' :method .param pmc __ARG_1 .const 'Sub' SyntaxError = "SyntaxError" SyntaxError("Cannot close root namespace", __ARG_1) .end # close_ns .sub 'dowarnings' :method getattribute $P1, self, 'unit' .tailcall $P1.'dowarnings'() .end # dowarnings .sub 'optimize' :method self.'optimize_base'() .return(self) .end # optimize .sub 'emit' :method .param pmc __ARG_1 .const 'Sub' WSubId_9 = "WSubId_9" .const 'Sub' sformat = "sformat" getattribute $P1, self, 'bultins_used' $P12 = $P1["chomp"] if_null $P12, __label_1 self.'addload'("\"String/Utils.pbc\"") __label_1: # endif split $P12, " ", "acos asin atan cos exp ln sin tan pow sinh cosh tanh" if_null $P12, __label_3 iter $P13, $P12 set $P13, 0 __label_2: # for iteration unless $P13 goto __label_3 shift $S1, $P13 $P14 = $P1[$S1] if_null $P14, __label_4 self.'addlib'("'trans_ops'") goto __label_3 # break __label_4: # endif goto __label_2 __label_3: # endfor getattribute $P2, self, 'libs' if_null $P2, __label_5 set $P3, $P2 root_new $P4, ['parrot';'ResizablePMCArray'] $P5 = WSubId_9(".loadlib ") if_null $P3, __label_7 iter $P16, $P3 set $P16, 0 __label_6: # for iteration unless $P16 goto __label_7 shift $P6, $P16 $P12 = $P5($P6) push $P4, $P12 goto __label_6 __label_7: # endfor set $P15, $P4 set $P12, $P15 join $S2, "\n", $P12 __ARG_1.'say'($S2) __label_5: # endif getattribute $P7, self, 'loads' if_null $P7, __label_8 set $P8, $P7 root_new $P9, ['parrot';'ResizablePMCArray'] $P10 = WSubId_9(" load_bytecode ") if_null $P8, __label_10 iter $P18, $P8 set $P18, 0 __label_9: # for iteration unless $P18 goto __label_10 shift $P11, $P18 $P14 = $P10($P11) push $P9, $P14 goto __label_9 __label_10: # endfor set $P17, $P9 set $P12, $P17 join $S2, "\n", $P12 $P12 = sformat(".sub initial_load_bytecode :anon :load :init\n%0\n.end\n", $S2) __ARG_1.'say'($P12) __label_8: # endif isnull $I1, $P2 not $I1 if $I1 goto __label_12 isnull $I1, $P7 not $I1 __label_12: unless $I1 goto __label_11 __ARG_1.'comment'("end libs") __label_11: # endif self.'emit_base'(__ARG_1) .end # emit .sub 'emitinclude' :method .param pmc __ARG_1 getattribute $P1, self, 'locals' if_null $P1, __label_2 iter $P4, $P1 set $P4, 0 __label_1: # for iteration unless $P4 goto __label_2 shift $S1, $P4 $P2 = $P1[$S1] isa $I2, $P2, [ 'Winxed'; 'Compiler'; 'VarData' ] not $I1, $I2 if $I1 goto __label_5 $P5 = $P2.'gettype'() set $S2, $P5 isne $I1, $S2, "I" __label_5: if $I1 goto __label_4 $P6 = $P2.'getflags'() set $I3, $P6 band $I1, $I3, 4 __label_4: unless $I1 goto __label_3 goto __label_1 # continue __label_3: # endif $P3 = $P2.'getvalue'() $P5 = $P3.'getIntegerValue'() __ARG_1.'say'(".macro_const ", $S1, " ", $P5) goto __label_1 __label_2: # endfor .end # emitinclude .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'RootNamespace' ] get_class $P1, [ 'Winxed'; 'Compiler'; 'NamespaceBase' ] addparent $P0, $P1 addattribute $P0, 'unit' addattribute $P0, 'bultins_used' addattribute $P0, 'libs' addattribute $P0, 'loads' addattribute $P0, 'subidgen' .end .namespace [ 'Winxed'; 'Compiler'; 'Builtin' ] .sub 'Builtin' :method .param string __ARG_1 .param pmc __ARG_2 new $P3, [ 'Winxed'; 'Compiler'; 'TokenIdentifier' ] $P3.'TokenIdentifier'("__builtins__", 0, __ARG_1) set $P2, $P3 setattribute self, 'name', $P2 root_new $P2, ['parrot';'ResizablePMCArray'] assign $P2, 1 $P2[0] = __ARG_2 setattribute self, 'variants', $P2 .end # Builtin .sub 'getname' :method getattribute $P1, self, 'name' .return($P1) .end # getname .sub 'addvariant' :method .param pmc __ARG_1 getattribute $P1, self, 'variants' push $P1, __ARG_1 .end # addvariant .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'Builtin' ] addattribute $P0, 'name' addattribute $P0, 'variants' .end .namespace [ 'Winxed'; 'Compiler' ] .namespace [ 'Winxed'; 'Compiler'; 'BuiltinBuilder' ] .sub 'BuiltinBuilder' :method root_new $P2, ['parrot';'Hash'] setattribute self, 'entries', $P2 .end # BuiltinBuilder .sub 'add' :method .param pmc __ARG_1 getattribute $P1, self, 'entries' getattribute $P2, __ARG_1, 'name' null $S1 if_null $P2, __label_1 set $S1, $P2 __label_1: $P2 = $P1[$S1] if_null $P2, __label_2 $P3 = $P1[$S1] $P3.'addvariant'(__ARG_1) goto __label_3 __label_2: # else new $P5, [ 'Winxed'; 'Compiler'; 'Builtin' ] $P5.'Builtin'($S1, __ARG_1) set $P4, $P5 $P1[$S1] = $P4 __label_3: # endif .end # add .sub 'put' :method .param pmc __ARG_1 getattribute $P1, self, 'entries' if_null $P1, __label_2 iter $P2, $P1 set $P2, 0 __label_1: # for iteration unless $P2 goto __label_2 shift $S1, $P2 $P3 = $P1[$S1] __ARG_1.'addfunction'($P3) goto __label_1 __label_2: # endfor .end # put .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'BuiltinBuilder' ] addattribute $P0, 'entries' .end .namespace [ 'Winxed'; 'Compiler'; 'WinxedCompileUnit' ] .sub 'WinxedCompileUnit' :method .param string __ARG_1 .param int __ARG_2 .param int __ARG_3 .const 'Sub' WSubId_156 = "WSubId_156" .const 'Sub' WSubId_148 = "WSubId_148" .const 'Sub' WSubId_157 = "WSubId_157" box $P4, __ARG_1 setattribute self, 'sourcefile', $P4 not $I1, __ARG_2 box $P4, $I1 setattribute self, 'warnings', $P4 new $P4, [ 'Winxed'; 'Compiler'; 'RootNamespace' ] $P4.'RootNamespace'(self) set $P1, $P4 WSubId_156($P1, "false", 0) WSubId_156($P1, "true", 1) WSubId_148($P1, "__STAGE__", "4") WSubId_156($P1, "__DEBUG__", __ARG_3) WSubId_156($P1, "__WINXED_ERROR__", 567) new $P5, [ 'Winxed'; 'Compiler'; 'TokenEof' ] $P5.'TokenEof'("__builtins__") set $P4, $P5 null $P6 $P2 = $P1.'childnamespace'($P4, "Winxed_Builtins", $P6) new $P3, [ 'Winxed'; 'Compiler'; 'BuiltinBuilder' ] $P3.'BuiltinBuilder'() set $P3, $P3 WSubId_157($P3) $P3.'put'($P2) $P1.'usenamespace'($P2) setattribute self, 'rootns', $P1 .end # WinxedCompileUnit .sub 'dowarnings' :method getattribute $P1, self, 'warnings' set $I1, $P1 .return($I1) .end # dowarnings .sub 'parse' :method .param pmc __ARG_1 getattribute $P1, self, 'rootns' $P1.'parse'(__ARG_1) getattribute $P1, self, 'rootns' $P1.'fixnamespaces'() .end # parse .sub 'optimize' :method getattribute $P3, self, 'rootns' $P2 = $P3.'optimize'() setattribute self, 'rootns', $P2 .end # optimize .sub 'emit' :method .param pmc __ARG_1 .const 'Sub' getVersionString = "getVersionString" __ARG_1.'comment'("THIS IS A GENERATED FILE! DO NOT EDIT!") $S2 = getVersionString() __ARG_1.'comment'("Compiled with ", $S2) getattribute $P1, self, 'sourcefile' null $S1 if_null $P1, __label_1 set $S1, $P1 __label_1: if_null $S1, __label_2 eq $S1, "", __label_2 __ARG_1.'comment'("Source file: ", $S1) __label_2: # endif __ARG_1.'comment'("Begin generated code") __ARG_1.'say'("") getattribute $P1, self, 'rootns' $P1.'emit'(__ARG_1) __ARG_1.'comment'("End generated code") .end # emit .sub 'emitinclude' :method .param pmc __ARG_1 __ARG_1.'comment'("DO NOT EDIT THIS FILE") __ARG_1.'comment'("Generated automatically from Winxed sources") getattribute $P1, self, 'rootns' $P1.'emitinclude'(__ARG_1) __ARG_1.'comment'("End") .end # emitinclude .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'WinxedCompileUnit' ] addattribute $P0, 'rootns' addattribute $P0, 'warnings' addattribute $P0, 'sourcefile' .end .namespace [ 'Winxed'; 'Compiler'; 'WinxedHLL' ] .sub 'version' :method .const 'Sub' getVersion = "getVersion" .tailcall getVersion() .end # version .sub 'version_string' :method .const 'Sub' getVersionString = "getVersionString" .tailcall getVersionString() .end # version_string .sub '__private_compile_tail' :method .param pmc __ARG_1 .param pmc __ARG_2 .param pmc __ARG_3 .param string __ARG_4 .param int __ARG_5 .param int __ARG_6 .param int __ARG_7 set $S2, __ARG_2 ne $S2, "parse", __label_1 .return(__ARG_1) __label_1: # endif null $P1 unless_null __ARG_3, __label_2 new $P1, [ 'StringHandle' ] $P1.'open'("__eval__", "w") goto __label_3 __label_2: # else set $P1, __ARG_3 __label_3: # endif new $P5, [ 'Winxed'; 'Compiler'; 'Emit' ] $P5.'Emit'($P1, __ARG_7) set $P2, $P5 unless __ARG_5 goto __label_4 $P2.'setDebug'() __label_4: # endif unless __ARG_6 goto __label_5 $P2.'disable_annotations'() __label_5: # endif __ARG_1.'emit'($P2) $P2.'close'() if_null __ARG_3, __label_6 .return(__ARG_3) goto __label_7 __label_6: # else $P1.'close'() $P5 = $P1.'readall'() null $S1 if_null $P5, __label_8 set $S1, $P5 __label_8: null $P3 set $S2, __ARG_2 if $S2 == "pir" goto __label_11 if $S2 == "pbc" goto __label_12 if $S2 == "" goto __label_13 goto __label_9 __label_11: # case new $P3, [ 'String' ] assign $P3, $S1 goto __label_10 # break __label_12: # case __label_13: # case compreg $P4, "PIR" $P3 = $P4.'compile'($S1) goto __label_10 # break __label_9: # default set $S4, __ARG_2 concat $S5, "Invalid target: ", $S4 die $S5 __label_10: # switch end .return($P3) __label_7: # endif .end # __private_compile_tail .sub '__private_geninclude' :method .param pmc __ARG_1 .param pmc __ARG_2 null $P1 unless_null __ARG_2, __label_1 new $P1, [ 'StringHandle' ] $P1.'open'("__eval__", "w") goto __label_2 __label_1: # else set $P1, __ARG_2 __label_2: # endif new $P3, [ 'Winxed'; 'Compiler'; 'Emit' ] $P3.'Emit'($P1, 1) set $P2, $P3 __ARG_1.'emitinclude'($P2) $P2.'close'() if_null __ARG_2, __label_3 .return(__ARG_2) goto __label_4 __label_3: # else $P1.'close'() .tailcall $P1.'readall'() __label_4: # endif .end # __private_geninclude .sub 'compile' :method .param string __ARG_1 .param string __ARG_2 :optional :named('target') .param pmc __ARG_3 :optional :named('output') .param int __ARG_4 :optional :named('debug') .param int __ARG_5 :optional :named('noan') .param int __ARG_6 :optional :named('nowarn') unless_null __ARG_2, __label_1 set __ARG_2, "" __label_1: # endif new $P1, [ 'StringHandle' ] $P1.'open'("__eval__", "w") $P1.'puts'(__ARG_1) $P1.'close'() $P1.'open'("__eval__", "r") new $P4, [ 'Winxed'; 'Compiler'; 'Tokenizer' ] $P4.'Tokenizer'($P1, "__eval__", __ARG_6) set $P2, $P4 new $P4, [ 'Winxed'; 'Compiler'; 'WinxedCompileUnit' ] $P4.'WinxedCompileUnit'("", __ARG_6, __ARG_4) set $P3, $P4 $P3.'parse'($P2) $P1.'close'() $P3.'optimize'() ne __ARG_2, "include", __label_2 .tailcall self.'__private_geninclude'($P3, __ARG_3) goto __label_3 __label_2: # else .tailcall self.'__private_compile_tail'($P3, __ARG_2, __ARG_3, "__eval__", __ARG_4, __ARG_5, __ARG_6) __label_3: # endif .end # compile .sub 'compile_from_file' :method .param string __ARG_1 .param string __ARG_2 :optional :named('target') .param pmc __ARG_3 :optional :named('output') .param int __ARG_4 :optional :named('debug') .param int __ARG_5 :optional :named('noan') .param int __ARG_6 :optional :named('nowarn') unless_null __ARG_2, __label_1 set __ARG_2, "" __label_1: # endif root_new $P1, ["parrot";"FileHandle"] $P1."open"(__ARG_1,"r") $P1.'encoding'("utf8") new $P4, [ 'Winxed'; 'Compiler'; 'Tokenizer' ] $P4.'Tokenizer'($P1, __ARG_1, __ARG_6) set $P2, $P4 new $P4, [ 'Winxed'; 'Compiler'; 'WinxedCompileUnit' ] $P4.'WinxedCompileUnit'(__ARG_1, __ARG_6, __ARG_4) set $P3, $P4 $P3.'parse'($P2) $P1.'close'() $P3.'optimize'() ne __ARG_2, "include", __label_2 .tailcall self.'__private_geninclude'($P3, __ARG_3) goto __label_3 __label_2: # else .tailcall self.'__private_compile_tail'($P3, __ARG_2, __ARG_3, __ARG_1, __ARG_4, __ARG_5, __ARG_6) __label_3: # endif .end # compile_from_file .sub Winxed_class_init :anon :load :init newclass $P0, [ 'Winxed'; 'Compiler'; 'WinxedHLL' ] .end .namespace [ 'Winxed'; 'Compiler' ] .sub 'initializer' :init :load new $P1, [ 'Winxed'; 'Compiler'; 'WinxedHLL' ] compreg "winxed", $P1 .end # initializer # End generated code