Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
grumpy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
grumpy
Commits
34d8ed8e
Commit
34d8ed8e
authored
May 10, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X pystone: Manually print traceback (grumpy only prints exception without traceback)
parent
45635ded
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
422 additions
and
379 deletions
+422
-379
pystone
pystone
+3
-0
pystone.go
pystone.go
+414
-378
pystone.py
pystone.py
+5
-1
No files found.
pystone
0 → 100755
View file @
34d8ed8e
#!/bin/sh -e
grumpc pystone.py
>
pystone.go
&&
go run pystone.go
pystone.go
View file @
34d8ed8e
...
...
@@ -2,6 +2,7 @@ package main
import
(
π___python__Γsys
"__python__/sys"
π___python__Γtime
"__python__/time"
π___python__Γtraceback
"__python__/traceback"
πg
"grumpy"
π_os
"os"
)
...
...
@@ -68,10 +69,12 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
ßnargs
:=
πg
.
InternStr
(
"nargs"
)
ßobject
:=
πg
.
InternStr
(
"object"
)
ßord
:=
πg
.
InternStr
(
"ord"
)
ßprint_exc
:=
πg
.
InternStr
(
"print_exc"
)
ßpystones
:=
πg
.
InternStr
(
"pystones"
)
ßrange
:=
πg
.
InternStr
(
"range"
)
ßsys
:=
πg
.
InternStr
(
"sys"
)
ßtime
:=
πg
.
InternStr
(
"time"
)
ßtraceback
:=
πg
.
InternStr
(
"traceback"
)
var
πTemp001
*
πg
.
Object
_
=
πTemp001
var
πTemp002
[]
*
πg
.
Object
...
...
@@ -131,6 +134,7 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
switch
πF
.
State
()
{
case
0
:
case
8
:
goto
Label8
case
11
:
goto
Label11
default
:
panic
(
"unexpected function state"
)
}
// line 3: """
...
...
@@ -160,13 +164,22 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßclock
.
ToObject
(),
πTemp003
);
πE
!=
nil
{
continue
}
// line 41: __version__ = "1.1"
πF
.
SetLineno
(
41
)
// line 40: import traceback
πF
.
SetLineno
(
40
)
if
πTemp002
,
πE
=
πg
.
ImportModule
(
πF
,
"traceback"
,
[]
*
πg
.
Code
{
π___python__Γtraceback
.
Code
});
πE
!=
nil
{
continue
}
πTemp001
=
πTemp002
[
0
]
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßtraceback
.
ToObject
(),
πTemp001
);
πE
!=
nil
{
continue
}
// line 42: __version__ = "1.1"
πF
.
SetLineno
(
42
)
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ß__version__
.
ToObject
(),
πg
.
NewStr
(
"1.1"
)
.
ToObject
());
πE
!=
nil
{
continue
}
// line 4
3
: [Ident1, Ident2, Ident3, Ident4, Ident5] = range(1, 6)
πF
.
SetLineno
(
4
3
)
// line 4
4
: [Ident1, Ident2, Ident3, Ident4, Ident5] = range(1, 6)
πF
.
SetLineno
(
4
4
)
πTemp002
=
πF
.
MakeArgs
(
2
)
πTemp002
[
0
]
=
πg
.
NewInt
(
1
)
.
ToObject
()
πTemp002
[
1
]
=
πg
.
NewInt
(
6
)
.
ToObject
()
...
...
@@ -195,8 +208,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßIdent5
.
ToObject
(),
πTemp007
);
πE
!=
nil
{
continue
}
// line 4
5
: class Record(object):
πF
.
SetLineno
(
4
5
)
// line 4
6
: class Record(object):
πF
.
SetLineno
(
4
6
)
πTemp002
=
make
([]
*
πg
.
Object
,
1
)
if
πTemp004
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßobject
);
πE
!=
nil
{
continue
...
...
@@ -224,8 +237,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
case
0
:
default
:
panic
(
"unexpected function state"
)
}
// line 4
7
: def __init__(self, PtrComp = None, Discr = 0, EnumComp = 0,
πF
.
SetLineno
(
4
7
)
// line 4
8
: def __init__(self, PtrComp = None, Discr = 0, EnumComp = 0,
πF
.
SetLineno
(
4
8
)
πTemp002
=
make
([]
πg
.
Param
,
6
)
πTemp002
[
0
]
=
πg
.
Param
{
Name
:
"self"
,
Def
:
nil
}
if
πTemp003
,
πE
=
πg
.
ResolveClass
(
πF
,
πClass
,
nil
,
ßNone
);
πE
!=
nil
{
...
...
@@ -251,8 +264,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
case
0
:
default
:
panic
(
"unexpected function state"
)
}
// line
49
: self.PtrComp = PtrComp
πF
.
SetLineno
(
49
)
// line
50
: self.PtrComp = PtrComp
πF
.
SetLineno
(
50
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µPtrComp
,
"PtrComp"
);
πE
!=
nil
{
continue
}
...
...
@@ -265,8 +278,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
SetAttr
(
πF
,
µself
,
ßPtrComp
,
πTemp001
);
πE
!=
nil
{
continue
}
// line 5
0
: self.Discr = Discr
πF
.
SetLineno
(
5
0
)
// line 5
1
: self.Discr = Discr
πF
.
SetLineno
(
5
1
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µDiscr
,
"Discr"
);
πE
!=
nil
{
continue
}
...
...
@@ -279,8 +292,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
SetAttr
(
πF
,
µself
,
ßDiscr
,
πTemp001
);
πE
!=
nil
{
continue
}
// line 5
1
: self.EnumComp = EnumComp
πF
.
SetLineno
(
5
1
)
// line 5
2
: self.EnumComp = EnumComp
πF
.
SetLineno
(
5
2
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µEnumComp
,
"EnumComp"
);
πE
!=
nil
{
continue
}
...
...
@@ -293,8 +306,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
SetAttr
(
πF
,
µself
,
ßEnumComp
,
πTemp001
);
πE
!=
nil
{
continue
}
// line 5
2
: self.IntComp = IntComp
πF
.
SetLineno
(
5
2
)
// line 5
3
: self.IntComp = IntComp
πF
.
SetLineno
(
5
3
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntComp
,
"IntComp"
);
πE
!=
nil
{
continue
}
...
...
@@ -307,8 +320,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
SetAttr
(
πF
,
µself
,
ßIntComp
,
πTemp001
);
πE
!=
nil
{
continue
}
// line 5
3
: self.StringComp = StringComp
πF
.
SetLineno
(
5
3
)
// line 5
4
: self.StringComp = StringComp
πF
.
SetLineno
(
5
4
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µStringComp
,
"StringComp"
);
πE
!=
nil
{
continue
}
...
...
@@ -328,8 +341,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πClass
.
SetItem
(
πF
,
ß__init__
.
ToObject
(),
πTemp001
);
πE
!=
nil
{
continue
}
// line 5
5
: def copy(self):
πF
.
SetLineno
(
5
5
)
// line 5
6
: def copy(self):
πF
.
SetLineno
(
5
6
)
πTemp002
=
make
([]
πg
.
Param
,
1
)
πTemp002
[
0
]
=
πg
.
Param
{
Name
:
"self"
,
Def
:
nil
}
πTemp003
=
πg
.
NewFunction
(
πg
.
NewCode
(
"copy"
,
"pystone.py"
,
πTemp002
,
0
,
func
(
πF
*
πg
.
Frame
,
πArgs
[]
*
πg
.
Object
)
(
*
πg
.
Object
,
*
πg
.
BaseException
)
{
...
...
@@ -346,8 +359,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
case
0
:
default
:
panic
(
"unexpected function state"
)
}
// line 5
6
: return Record(self.PtrComp, self.Discr, self.EnumComp,
πF
.
SetLineno
(
5
6
)
// line 5
7
: return Record(self.PtrComp, self.Discr, self.EnumComp,
πF
.
SetLineno
(
5
7
)
πTemp001
=
πF
.
MakeArgs
(
5
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µself
,
"self"
);
πE
!=
nil
{
continue
...
...
@@ -418,18 +431,18 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßRecord
.
ToObject
(),
πTemp004
);
πE
!=
nil
{
continue
}
// line
59
: TRUE = 1
πF
.
SetLineno
(
59
)
// line
60
: TRUE = 1
πF
.
SetLineno
(
60
)
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßTRUE
.
ToObject
(),
πg
.
NewInt
(
1
)
.
ToObject
());
πE
!=
nil
{
continue
}
// line 6
0
: FALSE = 0
πF
.
SetLineno
(
6
0
)
// line 6
1
: FALSE = 0
πF
.
SetLineno
(
6
1
)
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßFALSE
.
ToObject
(),
πg
.
NewInt
(
0
)
.
ToObject
());
πE
!=
nil
{
continue
}
// line 6
2
: def main(loops=LOOPS):
πF
.
SetLineno
(
6
2
)
// line 6
3
: def main(loops=LOOPS):
πF
.
SetLineno
(
6
3
)
πTemp009
=
make
([]
πg
.
Param
,
1
)
if
πTemp003
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßLOOPS
);
πE
!=
nil
{
continue
...
...
@@ -453,8 +466,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
case
0
:
default
:
panic
(
"unexpected function state"
)
}
// line 6
3
: benchtime, stones = pystones(loops)
πF
.
SetLineno
(
6
3
)
// line 6
4
: benchtime, stones = pystones(loops)
πF
.
SetLineno
(
6
4
)
πTemp001
=
πF
.
MakeArgs
(
1
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µloops
,
"loops"
);
πE
!=
nil
{
continue
...
...
@@ -472,8 +485,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
}
µbenchtime
=
πTemp002
µstones
=
πTemp004
// line 6
4
: print "Pystone(%s) time for %d passes = %g" % \
πF
.
SetLineno
(
6
4
)
// line 6
5
: print "Pystone(%s) time for %d passes = %g" % \
πF
.
SetLineno
(
6
5
)
πTemp001
=
make
([]
*
πg
.
Object
,
1
)
if
πTemp004
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ß__version__
);
πE
!=
nil
{
continue
...
...
@@ -492,8 +505,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
Print
(
πF
,
πTemp001
,
true
);
πE
!=
nil
{
continue
}
// line 6
6
: print "This machine benchmarks at %g pystones/second" % stones
πF
.
SetLineno
(
6
6
)
// line 6
7
: print "This machine benchmarks at %g pystones/second" % stones
πF
.
SetLineno
(
6
7
)
πTemp001
=
make
([]
*
πg
.
Object
,
1
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µstones
,
"stones"
);
πE
!=
nil
{
continue
...
...
@@ -512,8 +525,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßmain
.
ToObject
(),
πTemp001
);
πE
!=
nil
{
continue
}
// line
69
: def pystones(loops=LOOPS):
πF
.
SetLineno
(
69
)
// line
70
: def pystones(loops=LOOPS):
πF
.
SetLineno
(
70
)
πTemp009
=
make
([]
πg
.
Param
,
1
)
if
πTemp004
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßLOOPS
);
πE
!=
nil
{
continue
...
...
@@ -533,8 +546,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
case
0
:
default
:
panic
(
"unexpected function state"
)
}
// line 7
0
: return Proc0(loops)
πF
.
SetLineno
(
7
0
)
// line 7
1
: return Proc0(loops)
πF
.
SetLineno
(
7
1
)
πTemp001
=
πF
.
MakeArgs
(
1
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µloops
,
"loops"
);
πE
!=
nil
{
continue
...
...
@@ -555,31 +568,31 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßpystones
.
ToObject
(),
πTemp003
);
πE
!=
nil
{
continue
}
// line 7
2
: IntGlob = 0
πF
.
SetLineno
(
7
2
)
// line 7
3
: IntGlob = 0
πF
.
SetLineno
(
7
3
)
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßIntGlob
.
ToObject
(),
πg
.
NewInt
(
0
)
.
ToObject
());
πE
!=
nil
{
continue
}
// line 7
3
: BoolGlob = FALSE
πF
.
SetLineno
(
7
3
)
// line 7
4
: BoolGlob = FALSE
πF
.
SetLineno
(
7
4
)
if
πTemp004
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßFALSE
);
πE
!=
nil
{
continue
}
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßBoolGlob
.
ToObject
(),
πTemp004
);
πE
!=
nil
{
continue
}
// line 7
4
: Char1Glob = '\0'
πF
.
SetLineno
(
7
4
)
// line 7
5
: Char1Glob = '\0'
πF
.
SetLineno
(
7
5
)
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßChar1Glob
.
ToObject
(),
πg
.
NewStr
(
"
\x00
"
)
.
ToObject
());
πE
!=
nil
{
continue
}
// line 7
5
: Char2Glob = '\0'
πF
.
SetLineno
(
7
5
)
// line 7
6
: Char2Glob = '\0'
πF
.
SetLineno
(
7
6
)
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßChar2Glob
.
ToObject
(),
πg
.
NewStr
(
"
\x00
"
)
.
ToObject
());
πE
!=
nil
{
continue
}
// line 7
6
: Array1Glob = [0]*51
πF
.
SetLineno
(
7
6
)
// line 7
7
: Array1Glob = [0]*51
πF
.
SetLineno
(
7
7
)
πTemp002
=
make
([]
*
πg
.
Object
,
1
)
πTemp002
[
0
]
=
πg
.
NewInt
(
0
)
.
ToObject
()
πTemp005
=
πg
.
NewList
(
πTemp002
...
)
.
ToObject
()
...
...
@@ -589,8 +602,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßArray1Glob
.
ToObject
(),
πTemp004
);
πE
!=
nil
{
continue
}
// line 7
7
: Array2Glob = map(lambda x: x[:], [Array1Glob]*51)
πF
.
SetLineno
(
7
7
)
// line 7
8
: Array2Glob = map(lambda x: x[:], [Array1Glob]*51)
πF
.
SetLineno
(
7
8
)
πTemp002
=
πF
.
MakeArgs
(
2
)
πTemp009
=
make
([]
πg
.
Param
,
1
)
πTemp009
[
0
]
=
πg
.
Param
{
Name
:
"x"
,
Def
:
nil
}
...
...
@@ -606,8 +619,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
case
0
:
default
:
panic
(
"unexpected function state"
)
}
// line 7
7
: Array2Glob = map(lambda x: x[:], [Array1Glob]*51)
πF
.
SetLineno
(
7
7
)
// line 7
8
: Array2Glob = map(lambda x: x[:], [Array1Glob]*51)
πF
.
SetLineno
(
7
8
)
if
πTemp001
,
πE
=
πg
.
SliceType
.
Call
(
πF
,
πg
.
Args
{
πg
.
None
,
πg
.
None
,
πg
.
None
},
nil
);
πE
!=
nil
{
continue
}
...
...
@@ -643,24 +656,24 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßArray2Glob
.
ToObject
(),
πTemp005
);
πE
!=
nil
{
continue
}
// line 7
8
: PtrGlb = None
πF
.
SetLineno
(
7
8
)
// line 7
9
: PtrGlb = None
πF
.
SetLineno
(
7
9
)
if
πTemp004
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßNone
);
πE
!=
nil
{
continue
}
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßPtrGlb
.
ToObject
(),
πTemp004
);
πE
!=
nil
{
continue
}
// line
79
: PtrGlbNext = None
πF
.
SetLineno
(
79
)
// line
80
: PtrGlbNext = None
πF
.
SetLineno
(
80
)
if
πTemp004
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßNone
);
πE
!=
nil
{
continue
}
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßPtrGlbNext
.
ToObject
(),
πTemp004
);
πE
!=
nil
{
continue
}
// line 8
1
: def Proc0(loops=LOOPS):
πF
.
SetLineno
(
8
1
)
// line 8
2
: def Proc0(loops=LOOPS):
πF
.
SetLineno
(
8
2
)
πTemp009
=
make
([]
πg
.
Param
,
1
)
if
πTemp005
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßLOOPS
);
πE
!=
nil
{
continue
...
...
@@ -708,24 +721,24 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
case
0
:
default
:
panic
(
"unexpected function state"
)
}
// line 82: global IntGlob
πF
.
SetLineno
(
82
)
// line 83: global BoolGlob
// line 83: global IntGlob
πF
.
SetLineno
(
83
)
// line 84: global
Char1
Glob
// line 84: global
Bool
Glob
πF
.
SetLineno
(
84
)
// line 85: global Char
2
Glob
// line 85: global Char
1
Glob
πF
.
SetLineno
(
85
)
// line 86: global
Array1
Glob
// line 86: global
Char2
Glob
πF
.
SetLineno
(
86
)
// line 87: global Array
2
Glob
// line 87: global Array
1
Glob
πF
.
SetLineno
(
87
)
// line 88: global
PtrGl
b
// line 88: global
Array2Glo
b
πF
.
SetLineno
(
88
)
// line 89: global PtrGlb
Next
// line 89: global PtrGlb
πF
.
SetLineno
(
89
)
// line 91: starttime = clock()
πF
.
SetLineno
(
91
)
// line 90: global PtrGlbNext
πF
.
SetLineno
(
90
)
// line 92: starttime = clock()
πF
.
SetLineno
(
92
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßclock
);
πE
!=
nil
{
continue
}
...
...
@@ -733,8 +746,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
continue
}
µstarttime
=
πTemp002
// line 9
2
: for i in range(loops):
πF
.
SetLineno
(
9
2
)
// line 9
3
: for i in range(loops):
πF
.
SetLineno
(
9
3
)
πTemp003
=
πF
.
MakeArgs
(
1
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µloops
,
"loops"
);
πE
!=
nil
{
continue
...
...
@@ -765,13 +778,13 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
goto
Label2
}
µi
=
πTemp004
// line 9
3
: pass
πF
.
SetLineno
(
9
3
)
// line 9
4
: pass
πF
.
SetLineno
(
9
4
)
goto
Label1
goto
Label2
Label2
:
// line 9
4
: nulltime = clock() - starttime
πF
.
SetLineno
(
9
4
)
// line 9
5
: nulltime = clock() - starttime
πF
.
SetLineno
(
9
5
)
if
πTemp002
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßclock
);
πE
!=
nil
{
continue
}
...
...
@@ -785,8 +798,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
continue
}
µnulltime
=
πTemp001
// line 9
6
: PtrGlbNext = Record()
πF
.
SetLineno
(
9
6
)
// line 9
7
: PtrGlbNext = Record()
πF
.
SetLineno
(
9
7
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßRecord
);
πE
!=
nil
{
continue
}
...
...
@@ -796,8 +809,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßPtrGlbNext
.
ToObject
(),
πTemp002
);
πE
!=
nil
{
continue
}
// line 9
7
: PtrGlb = Record()
πF
.
SetLineno
(
9
7
)
// line 9
8
: PtrGlb = Record()
πF
.
SetLineno
(
9
8
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßRecord
);
πE
!=
nil
{
continue
}
...
...
@@ -807,8 +820,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßPtrGlb
.
ToObject
(),
πTemp002
);
πE
!=
nil
{
continue
}
// line 9
8
: PtrGlb.PtrComp = PtrGlbNext
πF
.
SetLineno
(
9
8
)
// line 9
9
: PtrGlb.PtrComp = PtrGlbNext
πF
.
SetLineno
(
9
9
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßPtrGlbNext
);
πE
!=
nil
{
continue
}
...
...
@@ -821,8 +834,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
SetAttr
(
πF
,
πTemp004
,
ßPtrComp
,
πTemp002
);
πE
!=
nil
{
continue
}
// line
99
: PtrGlb.Discr = Ident1
πF
.
SetLineno
(
99
)
// line
100
: PtrGlb.Discr = Ident1
πF
.
SetLineno
(
100
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßIdent1
);
πE
!=
nil
{
continue
}
...
...
@@ -835,8 +848,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
SetAttr
(
πF
,
πTemp004
,
ßDiscr
,
πTemp002
);
πE
!=
nil
{
continue
}
// line 10
0
: PtrGlb.EnumComp = Ident3
πF
.
SetLineno
(
10
0
)
// line 10
1
: PtrGlb.EnumComp = Ident3
πF
.
SetLineno
(
10
1
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßIdent3
);
πE
!=
nil
{
continue
}
...
...
@@ -849,8 +862,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
SetAttr
(
πF
,
πTemp004
,
ßEnumComp
,
πTemp002
);
πE
!=
nil
{
continue
}
// line 10
1
: PtrGlb.IntComp = 40
πF
.
SetLineno
(
10
1
)
// line 10
2
: PtrGlb.IntComp = 40
πF
.
SetLineno
(
10
2
)
if
πE
=
πg
.
Tie
(
πF
,
πg
.
TieTarget
{
Target
:
&
πTemp001
},
πg
.
NewInt
(
40
)
.
ToObject
());
πE
!=
nil
{
continue
}
...
...
@@ -860,8 +873,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
SetAttr
(
πF
,
πTemp002
,
ßIntComp
,
πTemp001
);
πE
!=
nil
{
continue
}
// line 10
2
: PtrGlb.StringComp = "DHRYSTONE PROGRAM, SOME STRING"
πF
.
SetLineno
(
10
2
)
// line 10
3
: PtrGlb.StringComp = "DHRYSTONE PROGRAM, SOME STRING"
πF
.
SetLineno
(
10
3
)
if
πE
=
πg
.
Tie
(
πF
,
πg
.
TieTarget
{
Target
:
&
πTemp001
},
πg
.
NewStr
(
"DHRYSTONE PROGRAM, SOME STRING"
)
.
ToObject
());
πE
!=
nil
{
continue
}
...
...
@@ -871,11 +884,11 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
SetAttr
(
πF
,
πTemp002
,
ßStringComp
,
πTemp001
);
πE
!=
nil
{
continue
}
// line 103: String1Loc = "DHRYSTONE PROGRAM, 1'ST STRING"
πF
.
SetLineno
(
103
)
µString1Loc
=
πg
.
NewStr
(
"DHRYSTONE PROGRAM, 1'ST STRING"
)
.
ToObject
()
// line 104: Array2Glob[8][7] = 10
// line 104: String1Loc = "DHRYSTONE PROGRAM, 1'ST STRING"
πF
.
SetLineno
(
104
)
µString1Loc
=
πg
.
NewStr
(
"DHRYSTONE PROGRAM, 1'ST STRING"
)
.
ToObject
()
// line 105: Array2Glob[8][7] = 10
πF
.
SetLineno
(
105
)
if
πE
=
πg
.
Tie
(
πF
,
πg
.
TieTarget
{
Target
:
&
πTemp001
},
πg
.
NewInt
(
10
)
.
ToObject
());
πE
!=
nil
{
continue
}
...
...
@@ -890,8 +903,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
SetItem
(
πF
,
πTemp004
,
πTemp002
,
πTemp001
);
πE
!=
nil
{
continue
}
// line 10
6
: starttime = clock()
πF
.
SetLineno
(
10
6
)
// line 10
7
: starttime = clock()
πF
.
SetLineno
(
10
7
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßclock
);
πE
!=
nil
{
continue
}
...
...
@@ -899,8 +912,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
continue
}
µstarttime
=
πTemp002
// line 10
8
: for i in range(loops):
πF
.
SetLineno
(
10
8
)
// line 10
9
: for i in range(loops):
πF
.
SetLineno
(
10
9
)
πTemp003
=
πF
.
MakeArgs
(
1
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µloops
,
"loops"
);
πE
!=
nil
{
continue
...
...
@@ -931,39 +944,39 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
goto
Label4
}
µi
=
πTemp004
// line 1
09
: Proc5()
πF
.
SetLineno
(
1
09
)
// line 1
10
: Proc5()
πF
.
SetLineno
(
1
10
)
if
πTemp005
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßProc5
);
πE
!=
nil
{
continue
}
if
πTemp006
,
πE
=
πTemp005
.
Call
(
πF
,
nil
,
nil
);
πE
!=
nil
{
continue
}
// line 11
0
: Proc4()
πF
.
SetLineno
(
11
0
)
// line 11
1
: Proc4()
πF
.
SetLineno
(
11
1
)
if
πTemp005
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßProc4
);
πE
!=
nil
{
continue
}
if
πTemp006
,
πE
=
πTemp005
.
Call
(
πF
,
nil
,
nil
);
πE
!=
nil
{
continue
}
// line 111: IntLoc1 = 2
πF
.
SetLineno
(
111
)
µIntLoc1
=
πg
.
NewInt
(
2
)
.
ToObject
()
// line 112: IntLoc2 = 3
// line 112: IntLoc1 = 2
πF
.
SetLineno
(
112
)
µIntLoc
2
=
πg
.
NewInt
(
3
)
.
ToObject
()
// line 113:
String2Loc = "DHRYSTONE PROGRAM, 2'ND STRING"
µIntLoc
1
=
πg
.
NewInt
(
2
)
.
ToObject
()
// line 113:
IntLoc2 = 3
πF
.
SetLineno
(
113
)
µ
String2Loc
=
πg
.
NewStr
(
"DHRYSTONE PROGRAM, 2'ND STRING"
)
.
ToObject
()
// line 114:
EnumLoc = Ident2
µ
IntLoc2
=
πg
.
NewInt
(
3
)
.
ToObject
()
// line 114:
String2Loc = "DHRYSTONE PROGRAM, 2'ND STRING"
πF
.
SetLineno
(
114
)
µString2Loc
=
πg
.
NewStr
(
"DHRYSTONE PROGRAM, 2'ND STRING"
)
.
ToObject
()
// line 115: EnumLoc = Ident2
πF
.
SetLineno
(
115
)
if
πTemp005
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßIdent2
);
πE
!=
nil
{
continue
}
µEnumLoc
=
πTemp005
// line 11
5
: BoolGlob = not Func2(String1Loc, String2Loc)
πF
.
SetLineno
(
11
5
)
// line 11
6
: BoolGlob = not Func2(String1Loc, String2Loc)
πF
.
SetLineno
(
11
6
)
πTemp003
=
πF
.
MakeArgs
(
2
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µString1Loc
,
"String1Loc"
);
πE
!=
nil
{
continue
...
...
@@ -987,8 +1000,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßBoolGlob
.
ToObject
(),
πTemp005
);
πE
!=
nil
{
continue
}
// line 11
6
: while IntLoc1 < IntLoc2:
πF
.
SetLineno
(
11
6
)
// line 11
7
: while IntLoc1 < IntLoc2:
πF
.
SetLineno
(
11
7
)
Label5
:
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntLoc1
,
"IntLoc1"
);
πE
!=
nil
{
continue
...
...
@@ -1005,8 +1018,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
!
πTemp008
{
goto
Label6
}
// line 11
7
: IntLoc3 = 5 * IntLoc1 - IntLoc2
πF
.
SetLineno
(
11
7
)
// line 11
8
: IntLoc3 = 5 * IntLoc1 - IntLoc2
πF
.
SetLineno
(
11
8
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntLoc1
,
"IntLoc1"
);
πE
!=
nil
{
continue
}
...
...
@@ -1020,8 +1033,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
continue
}
µIntLoc3
=
πTemp006
// line 11
8
: IntLoc3 = Proc7(IntLoc1, IntLoc2)
πF
.
SetLineno
(
11
8
)
// line 11
9
: IntLoc3 = Proc7(IntLoc1, IntLoc2)
πF
.
SetLineno
(
11
9
)
πTemp003
=
πF
.
MakeArgs
(
2
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntLoc1
,
"IntLoc1"
);
πE
!=
nil
{
continue
...
...
@@ -1039,8 +1052,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
}
πF
.
FreeArgs
(
πTemp003
)
µIntLoc3
=
πTemp007
// line 1
19
: IntLoc1 = IntLoc1 + 1
πF
.
SetLineno
(
1
19
)
// line 1
20
: IntLoc1 = IntLoc1 + 1
πF
.
SetLineno
(
1
20
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntLoc1
,
"IntLoc1"
);
πE
!=
nil
{
continue
}
...
...
@@ -1051,8 +1064,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
goto
Label5
goto
Label6
Label6
:
// line 12
0
: Proc8(Array1Glob, Array2Glob, IntLoc1, IntLoc3)
πF
.
SetLineno
(
12
0
)
// line 12
1
: Proc8(Array1Glob, Array2Glob, IntLoc1, IntLoc3)
πF
.
SetLineno
(
12
1
)
πTemp003
=
πF
.
MakeArgs
(
4
)
if
πTemp005
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßArray1Glob
);
πE
!=
nil
{
continue
...
...
@@ -1077,8 +1090,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
continue
}
πF
.
FreeArgs
(
πTemp003
)
// line 12
1
: PtrGlb = Proc1(PtrGlb)
πF
.
SetLineno
(
12
1
)
// line 12
2
: PtrGlb = Proc1(PtrGlb)
πF
.
SetLineno
(
12
2
)
πTemp003
=
πF
.
MakeArgs
(
1
)
if
πTemp005
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßPtrGlb
);
πE
!=
nil
{
continue
...
...
@@ -1094,11 +1107,11 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßPtrGlb
.
ToObject
(),
πTemp006
);
πE
!=
nil
{
continue
}
// line 122: CharIndex = 'A'
πF
.
SetLineno
(
122
)
µCharIndex
=
ßA
.
ToObject
()
// line 123: while CharIndex <= Char2Glob:
// line 123: CharIndex = 'A'
πF
.
SetLineno
(
123
)
µCharIndex
=
ßA
.
ToObject
()
// line 124: while CharIndex <= Char2Glob:
πF
.
SetLineno
(
124
)
Label7
:
if
πE
=
πg
.
CheckLocal
(
πF
,
µCharIndex
,
"CharIndex"
);
πE
!=
nil
{
continue
...
...
@@ -1141,11 +1154,11 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
goto
Label9
}
goto
Label10
// line 124: if EnumLoc == Func1(CharIndex, 'C'):
πF
.
SetLineno
(
124
)
Label9
:
// line 125: EnumLoc = Proc6(Ident1)
// line 125: if EnumLoc == Func1(CharIndex, 'C'):
πF
.
SetLineno
(
125
)
Label9
:
// line 126: EnumLoc = Proc6(Ident1)
πF
.
SetLineno
(
126
)
πTemp003
=
πF
.
MakeArgs
(
1
)
if
πTemp006
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßIdent1
);
πE
!=
nil
{
continue
...
...
@@ -1161,8 +1174,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
µEnumLoc
=
πTemp007
goto
Label10
Label10
:
// line 12
6
: CharIndex = chr(ord(CharIndex)+1)
πF
.
SetLineno
(
12
6
)
// line 12
7
: CharIndex = chr(ord(CharIndex)+1)
πF
.
SetLineno
(
12
7
)
πTemp003
=
πF
.
MakeArgs
(
1
)
πTemp011
=
πF
.
MakeArgs
(
1
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µCharIndex
,
"CharIndex"
);
πE
!=
nil
{
...
...
@@ -1191,8 +1204,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
goto
Label7
goto
Label8
Label8
:
// line 12
7
: IntLoc3 = IntLoc2 * IntLoc1
πF
.
SetLineno
(
12
7
)
// line 12
8
: IntLoc3 = IntLoc2 * IntLoc1
πF
.
SetLineno
(
12
8
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntLoc2
,
"IntLoc2"
);
πE
!=
nil
{
continue
}
...
...
@@ -1203,8 +1216,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
continue
}
µIntLoc3
=
πTemp005
// line 12
8
: IntLoc2 = IntLoc3 / IntLoc1
πF
.
SetLineno
(
12
8
)
// line 12
9
: IntLoc2 = IntLoc3 / IntLoc1
πF
.
SetLineno
(
12
9
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntLoc3
,
"IntLoc3"
);
πE
!=
nil
{
continue
}
...
...
@@ -1215,8 +1228,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
continue
}
µIntLoc2
=
πTemp005
// line 1
29
: IntLoc2 = 7 * (IntLoc3 - IntLoc2) - IntLoc1
πF
.
SetLineno
(
1
29
)
// line 1
30
: IntLoc2 = 7 * (IntLoc3 - IntLoc2) - IntLoc1
πF
.
SetLineno
(
1
30
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntLoc3
,
"IntLoc3"
);
πE
!=
nil
{
continue
}
...
...
@@ -1236,8 +1249,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
continue
}
µIntLoc2
=
πTemp005
// line 13
0
: IntLoc1 = Proc2(IntLoc1)
πF
.
SetLineno
(
13
0
)
// line 13
1
: IntLoc1 = Proc2(IntLoc1)
πF
.
SetLineno
(
13
1
)
πTemp003
=
πF
.
MakeArgs
(
1
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntLoc1
,
"IntLoc1"
);
πE
!=
nil
{
continue
...
...
@@ -1254,8 +1267,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
goto
Label3
goto
Label4
Label4
:
// line 13
2
: benchtime = clock() - starttime - nulltime
πF
.
SetLineno
(
13
2
)
// line 13
3
: benchtime = clock() - starttime - nulltime
πF
.
SetLineno
(
13
3
)
if
πTemp004
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßclock
);
πE
!=
nil
{
continue
}
...
...
@@ -1288,16 +1301,16 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
goto
Label11
}
goto
Label12
// line 133: if benchtime == 0.0:
πF
.
SetLineno
(
133
)
Label11
:
// line 134: loopsPerBenchtime = 0.0
// line 134: if benchtime == 0.0:
πF
.
SetLineno
(
134
)
Label11
:
// line 135: loopsPerBenchtime = 0.0
πF
.
SetLineno
(
135
)
µloopsPerBenchtime
=
πg
.
NewFloat
(
0.0
)
.
ToObject
()
goto
Label13
Label12
:
// line 13
6
: loopsPerBenchtime = (loops / benchtime)
πF
.
SetLineno
(
13
6
)
// line 13
7
: loopsPerBenchtime = (loops / benchtime)
πF
.
SetLineno
(
13
7
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µloops
,
"loops"
);
πE
!=
nil
{
continue
}
...
...
@@ -1310,8 +1323,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
µloopsPerBenchtime
=
πTemp001
goto
Label13
Label13
:
// line 13
7
: return benchtime, loopsPerBenchtime
πF
.
SetLineno
(
13
7
)
// line 13
8
: return benchtime, loopsPerBenchtime
πF
.
SetLineno
(
13
8
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µbenchtime
,
"benchtime"
);
πE
!=
nil
{
continue
}
...
...
@@ -1327,8 +1340,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßProc0
.
ToObject
(),
πTemp004
);
πE
!=
nil
{
continue
}
// line 1
39
: def Proc1(PtrParIn):
πF
.
SetLineno
(
1
39
)
// line 1
40
: def Proc1(PtrParIn):
πF
.
SetLineno
(
1
40
)
πTemp009
=
make
([]
πg
.
Param
,
1
)
πTemp009
[
0
]
=
πg
.
Param
{
Name
:
"PtrParIn"
,
Def
:
nil
}
πTemp005
=
πg
.
NewFunction
(
πg
.
NewCode
(
"Proc1"
,
"pystone.py"
,
πTemp009
,
0
,
func
(
πF
*
πg
.
Frame
,
πArgs
[]
*
πg
.
Object
)
(
*
πg
.
Object
,
*
πg
.
BaseException
)
{
...
...
@@ -1350,8 +1363,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
case
0
:
default
:
panic
(
"unexpected function state"
)
}
// line 14
0
: PtrParIn.PtrComp = NextRecord = PtrGlb.copy()
πF
.
SetLineno
(
14
0
)
// line 14
1
: PtrParIn.PtrComp = NextRecord = PtrGlb.copy()
πF
.
SetLineno
(
14
1
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßPtrGlb
);
πE
!=
nil
{
continue
}
...
...
@@ -1371,8 +1384,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
continue
}
µNextRecord
=
πTemp001
// line 14
1
: PtrParIn.IntComp = 5
πF
.
SetLineno
(
14
1
)
// line 14
2
: PtrParIn.IntComp = 5
πF
.
SetLineno
(
14
2
)
if
πE
=
πg
.
Tie
(
πF
,
πg
.
TieTarget
{
Target
:
&
πTemp001
},
πg
.
NewInt
(
5
)
.
ToObject
());
πE
!=
nil
{
continue
}
...
...
@@ -1382,8 +1395,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
SetAttr
(
πF
,
µPtrParIn
,
ßIntComp
,
πTemp001
);
πE
!=
nil
{
continue
}
// line 14
2
: NextRecord.IntComp = PtrParIn.IntComp
πF
.
SetLineno
(
14
2
)
// line 14
3
: NextRecord.IntComp = PtrParIn.IntComp
πF
.
SetLineno
(
14
3
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µPtrParIn
,
"PtrParIn"
);
πE
!=
nil
{
continue
}
...
...
@@ -1399,8 +1412,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
SetAttr
(
πF
,
µNextRecord
,
ßIntComp
,
πTemp002
);
πE
!=
nil
{
continue
}
// line 14
3
: NextRecord.PtrComp = PtrParIn.PtrComp
πF
.
SetLineno
(
14
3
)
// line 14
4
: NextRecord.PtrComp = PtrParIn.PtrComp
πF
.
SetLineno
(
14
4
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µPtrParIn
,
"PtrParIn"
);
πE
!=
nil
{
continue
}
...
...
@@ -1416,8 +1429,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
SetAttr
(
πF
,
µNextRecord
,
ßPtrComp
,
πTemp002
);
πE
!=
nil
{
continue
}
// line 14
4
: NextRecord.PtrComp = Proc3(NextRecord.PtrComp)
πF
.
SetLineno
(
14
4
)
// line 14
5
: NextRecord.PtrComp = Proc3(NextRecord.PtrComp)
πF
.
SetLineno
(
14
5
)
πTemp003
=
πF
.
MakeArgs
(
1
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µNextRecord
,
"NextRecord"
);
πE
!=
nil
{
continue
...
...
@@ -1461,11 +1474,11 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
goto
Label1
}
goto
Label2
// line 145: if NextRecord.Discr == Ident1:
πF
.
SetLineno
(
145
)
Label1
:
// line 146: NextRecord.IntComp = 6
// line 146: if NextRecord.Discr == Ident1:
πF
.
SetLineno
(
146
)
Label1
:
// line 147: NextRecord.IntComp = 6
πF
.
SetLineno
(
147
)
if
πE
=
πg
.
Tie
(
πF
,
πg
.
TieTarget
{
Target
:
&
πTemp001
},
πg
.
NewInt
(
6
)
.
ToObject
());
πE
!=
nil
{
continue
}
...
...
@@ -1475,8 +1488,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
SetAttr
(
πF
,
µNextRecord
,
ßIntComp
,
πTemp001
);
πE
!=
nil
{
continue
}
// line 14
7
: NextRecord.EnumComp = Proc6(PtrParIn.EnumComp)
πF
.
SetLineno
(
14
7
)
// line 14
8
: NextRecord.EnumComp = Proc6(PtrParIn.EnumComp)
πF
.
SetLineno
(
14
8
)
πTemp003
=
πF
.
MakeArgs
(
1
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µPtrParIn
,
"PtrParIn"
);
πE
!=
nil
{
continue
...
...
@@ -1501,8 +1514,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
SetAttr
(
πF
,
µNextRecord
,
ßEnumComp
,
πTemp001
);
πE
!=
nil
{
continue
}
// line 14
8
: NextRecord.PtrComp = PtrGlb.PtrComp
πF
.
SetLineno
(
14
8
)
// line 14
9
: NextRecord.PtrComp = PtrGlb.PtrComp
πF
.
SetLineno
(
14
9
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßPtrGlb
);
πE
!=
nil
{
continue
}
...
...
@@ -1518,8 +1531,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
SetAttr
(
πF
,
µNextRecord
,
ßPtrComp
,
πTemp001
);
πE
!=
nil
{
continue
}
// line 1
49
: NextRecord.IntComp = Proc7(NextRecord.IntComp, 10)
πF
.
SetLineno
(
1
49
)
// line 1
50
: NextRecord.IntComp = Proc7(NextRecord.IntComp, 10)
πF
.
SetLineno
(
1
50
)
πTemp003
=
πF
.
MakeArgs
(
2
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µNextRecord
,
"NextRecord"
);
πE
!=
nil
{
continue
...
...
@@ -1547,8 +1560,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
}
goto
Label3
Label2
:
// line 15
1
: PtrParIn = NextRecord.copy()
πF
.
SetLineno
(
15
1
)
// line 15
2
: PtrParIn = NextRecord.copy()
πF
.
SetLineno
(
15
2
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µNextRecord
,
"NextRecord"
);
πE
!=
nil
{
continue
}
...
...
@@ -1561,8 +1574,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
µPtrParIn
=
πTemp002
goto
Label3
Label3
:
// line 15
2
: NextRecord.PtrComp = None
πF
.
SetLineno
(
15
2
)
// line 15
3
: NextRecord.PtrComp = None
πF
.
SetLineno
(
15
3
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßNone
);
πE
!=
nil
{
continue
}
...
...
@@ -1575,8 +1588,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
SetAttr
(
πF
,
µNextRecord
,
ßPtrComp
,
πTemp002
);
πE
!=
nil
{
continue
}
// line 15
3
: return PtrParIn
πF
.
SetLineno
(
15
3
)
// line 15
4
: return PtrParIn
πF
.
SetLineno
(
15
4
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µPtrParIn
,
"PtrParIn"
);
πE
!=
nil
{
continue
}
...
...
@@ -1588,8 +1601,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßProc1
.
ToObject
(),
πTemp005
);
πE
!=
nil
{
continue
}
// line 15
5
: def Proc2(IntParIO):
πF
.
SetLineno
(
15
5
)
// line 15
6
: def Proc2(IntParIO):
πF
.
SetLineno
(
15
6
)
πTemp009
=
make
([]
πg
.
Param
,
1
)
πTemp009
[
0
]
=
πg
.
Param
{
Name
:
"IntParIO"
,
Def
:
nil
}
πTemp006
=
πg
.
NewFunction
(
πg
.
NewCode
(
"Proc2"
,
"pystone.py"
,
πTemp009
,
0
,
func
(
πF
*
πg
.
Frame
,
πArgs
[]
*
πg
.
Object
)
(
*
πg
.
Object
,
*
πg
.
BaseException
)
{
...
...
@@ -1610,8 +1623,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
case
0
:
default
:
panic
(
"unexpected function state"
)
}
// line 15
6
: IntLoc = IntParIO + 10
πF
.
SetLineno
(
15
6
)
// line 15
7
: IntLoc = IntParIO + 10
πF
.
SetLineno
(
15
7
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntParIO
,
"IntParIO"
);
πE
!=
nil
{
continue
}
...
...
@@ -1619,8 +1632,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
continue
}
µIntLoc
=
πTemp001
// line 15
7
: while 1:
πF
.
SetLineno
(
15
7
)
// line 15
8
: while 1:
πF
.
SetLineno
(
15
8
)
Label1
:
if
πTemp002
,
πE
=
πg
.
IsTrue
(
πF
,
πg
.
NewInt
(
1
)
.
ToObject
());
πE
!=
nil
{
continue
...
...
@@ -1641,11 +1654,11 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
goto
Label3
}
goto
Label4
// line 158: if Char1Glob == 'A':
πF
.
SetLineno
(
158
)
Label3
:
// line 159: IntLoc = IntLoc - 1
// line 159: if Char1Glob == 'A':
πF
.
SetLineno
(
159
)
Label3
:
// line 160: IntLoc = IntLoc - 1
πF
.
SetLineno
(
160
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntLoc
,
"IntLoc"
);
πE
!=
nil
{
continue
}
...
...
@@ -1653,8 +1666,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
continue
}
µIntLoc
=
πTemp001
// line 16
0
: IntParIO = IntLoc - IntGlob
πF
.
SetLineno
(
16
0
)
// line 16
1
: IntParIO = IntLoc - IntGlob
πF
.
SetLineno
(
16
1
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntLoc
,
"IntLoc"
);
πE
!=
nil
{
continue
}
...
...
@@ -1665,8 +1678,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
continue
}
µIntParIO
=
πTemp001
// line 16
1
: EnumLoc = Ident1
πF
.
SetLineno
(
16
1
)
// line 16
2
: EnumLoc = Ident1
πF
.
SetLineno
(
16
2
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßIdent1
);
πE
!=
nil
{
continue
}
...
...
@@ -1689,19 +1702,19 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
goto
Label5
}
goto
Label6
// line 162: if EnumLoc == Ident1:
πF
.
SetLineno
(
162
)
Label5
:
// line 163: break
// line 163: if EnumLoc == Ident1:
πF
.
SetLineno
(
163
)
Label5
:
// line 164: break
πF
.
SetLineno
(
164
)
goto
Label2
goto
Label6
Label6
:
goto
Label1
goto
Label2
Label2
:
// line 16
4
: return IntParIO
πF
.
SetLineno
(
16
4
)
// line 16
5
: return IntParIO
πF
.
SetLineno
(
16
5
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntParIO
,
"IntParIO"
);
πE
!=
nil
{
continue
}
...
...
@@ -1713,8 +1726,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßProc2
.
ToObject
(),
πTemp006
);
πE
!=
nil
{
continue
}
// line 16
6
: def Proc3(PtrParOut):
πF
.
SetLineno
(
16
6
)
// line 16
7
: def Proc3(PtrParOut):
πF
.
SetLineno
(
16
7
)
πTemp009
=
make
([]
πg
.
Param
,
1
)
πTemp009
[
0
]
=
πg
.
Param
{
Name
:
"PtrParOut"
,
Def
:
nil
}
πTemp007
=
πg
.
NewFunction
(
πg
.
NewCode
(
"Proc3"
,
"pystone.py"
,
πTemp009
,
0
,
func
(
πF
*
πg
.
Frame
,
πArgs
[]
*
πg
.
Object
)
(
*
πg
.
Object
,
*
πg
.
BaseException
)
{
...
...
@@ -1735,8 +1748,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
case
0
:
default
:
panic
(
"unexpected function state"
)
}
// line 16
7
: global IntGlob
πF
.
SetLineno
(
16
7
)
// line 16
8
: global IntGlob
πF
.
SetLineno
(
16
8
)
if
πTemp002
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßPtrGlb
);
πE
!=
nil
{
continue
}
...
...
@@ -1751,11 +1764,11 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
goto
Label1
}
goto
Label2
// line 169: if PtrGlb is not None:
πF
.
SetLineno
(
169
)
Label1
:
// line 170: PtrParOut = PtrGlb.PtrComp
// line 170: if PtrGlb is not None:
πF
.
SetLineno
(
170
)
Label1
:
// line 171: PtrParOut = PtrGlb.PtrComp
πF
.
SetLineno
(
171
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßPtrGlb
);
πE
!=
nil
{
continue
}
...
...
@@ -1765,15 +1778,15 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
µPtrParOut
=
πTemp002
goto
Label3
Label2
:
// line 17
2
: IntGlob = 100
πF
.
SetLineno
(
17
2
)
// line 17
3
: IntGlob = 100
πF
.
SetLineno
(
17
3
)
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßIntGlob
.
ToObject
(),
πg
.
NewInt
(
100
)
.
ToObject
());
πE
!=
nil
{
continue
}
goto
Label3
Label3
:
// line 17
3
: PtrGlb.IntComp = Proc7(10, IntGlob)
πF
.
SetLineno
(
17
3
)
// line 17
4
: PtrGlb.IntComp = Proc7(10, IntGlob)
πF
.
SetLineno
(
17
4
)
πTemp005
=
πF
.
MakeArgs
(
2
)
πTemp005
[
0
]
=
πg
.
NewInt
(
10
)
.
ToObject
()
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßIntGlob
);
πE
!=
nil
{
...
...
@@ -1796,8 +1809,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
SetAttr
(
πF
,
πTemp003
,
ßIntComp
,
πTemp001
);
πE
!=
nil
{
continue
}
// line 17
4
: return PtrParOut
πF
.
SetLineno
(
17
4
)
// line 17
5
: return PtrParOut
πF
.
SetLineno
(
17
5
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µPtrParOut
,
"PtrParOut"
);
πE
!=
nil
{
continue
}
...
...
@@ -1809,8 +1822,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßProc3
.
ToObject
(),
πTemp007
);
πE
!=
nil
{
continue
}
// line 17
6
: def Proc4():
πF
.
SetLineno
(
17
6
)
// line 17
7
: def Proc4():
πF
.
SetLineno
(
17
7
)
πTemp009
=
make
([]
πg
.
Param
,
0
)
πTemp011
=
πg
.
NewFunction
(
πg
.
NewCode
(
"Proc4"
,
"pystone.py"
,
πTemp009
,
0
,
func
(
πF
*
πg
.
Frame
,
πArgs
[]
*
πg
.
Object
)
(
*
πg
.
Object
,
*
πg
.
BaseException
)
{
var
µBoolLoc
*
πg
.
Object
=
πg
.
UnboundLocal
;
_
=
µBoolLoc
...
...
@@ -1826,10 +1839,10 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
case
0
:
default
:
panic
(
"unexpected function state"
)
}
// line 17
7
: global Char2Glob
πF
.
SetLineno
(
17
7
)
// line 1
79
: BoolLoc = Char1Glob == 'A'
πF
.
SetLineno
(
1
79
)
// line 17
8
: global Char2Glob
πF
.
SetLineno
(
17
8
)
// line 1
80
: BoolLoc = Char1Glob == 'A'
πF
.
SetLineno
(
1
80
)
if
πTemp002
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßChar1Glob
);
πE
!=
nil
{
continue
}
...
...
@@ -1837,8 +1850,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
continue
}
µBoolLoc
=
πTemp001
// line 18
0
: BoolLoc = BoolLoc or BoolGlob
πF
.
SetLineno
(
18
0
)
// line 18
1
: BoolLoc = BoolLoc or BoolGlob
πF
.
SetLineno
(
18
1
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µBoolLoc
,
"BoolLoc"
);
πE
!=
nil
{
continue
}
...
...
@@ -1855,8 +1868,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
πTemp001
=
πTemp002
Label1
:
µBoolLoc
=
πTemp001
// line 18
1
: Char2Glob = 'B'
πF
.
SetLineno
(
18
1
)
// line 18
2
: Char2Glob = 'B'
πF
.
SetLineno
(
18
2
)
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßChar2Glob
.
ToObject
(),
ßB
.
ToObject
());
πE
!=
nil
{
continue
}
...
...
@@ -1867,8 +1880,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßProc4
.
ToObject
(),
πTemp011
);
πE
!=
nil
{
continue
}
// line 18
3
: def Proc5():
πF
.
SetLineno
(
18
3
)
// line 18
4
: def Proc5():
πF
.
SetLineno
(
18
4
)
πTemp009
=
make
([]
πg
.
Param
,
0
)
πTemp012
=
πg
.
NewFunction
(
πg
.
NewCode
(
"Proc5"
,
"pystone.py"
,
πTemp009
,
0
,
func
(
πF
*
πg
.
Frame
,
πArgs
[]
*
πg
.
Object
)
(
*
πg
.
Object
,
*
πg
.
BaseException
)
{
var
πTemp001
*
πg
.
Object
...
...
@@ -1879,17 +1892,17 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
case
0
:
default
:
panic
(
"unexpected function state"
)
}
// line 184: global Char1Glob
πF
.
SetLineno
(
184
)
// line 185: global BoolGlob
// line 185: global Char1Glob
πF
.
SetLineno
(
185
)
// line 187: Char1Glob = 'A'
πF
.
SetLineno
(
187
)
// line 186: global BoolGlob
πF
.
SetLineno
(
186
)
// line 188: Char1Glob = 'A'
πF
.
SetLineno
(
188
)
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßChar1Glob
.
ToObject
(),
ßA
.
ToObject
());
πE
!=
nil
{
continue
}
// line 18
8
: BoolGlob = FALSE
πF
.
SetLineno
(
18
8
)
// line 18
9
: BoolGlob = FALSE
πF
.
SetLineno
(
18
9
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßFALSE
);
πE
!=
nil
{
continue
}
...
...
@@ -1903,8 +1916,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßProc5
.
ToObject
(),
πTemp012
);
πE
!=
nil
{
continue
}
// line 19
0
: def Proc6(EnumParIn):
πF
.
SetLineno
(
19
0
)
// line 19
1
: def Proc6(EnumParIn):
πF
.
SetLineno
(
19
1
)
πTemp009
=
make
([]
πg
.
Param
,
1
)
πTemp009
[
0
]
=
πg
.
Param
{
Name
:
"EnumParIn"
,
Def
:
nil
}
πTemp013
=
πg
.
NewFunction
(
πg
.
NewCode
(
"Proc6"
,
"pystone.py"
,
πTemp009
,
0
,
func
(
πF
*
πg
.
Frame
,
πArgs
[]
*
πg
.
Object
)
(
*
πg
.
Object
,
*
πg
.
BaseException
)
{
...
...
@@ -1926,8 +1939,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
case
0
:
default
:
panic
(
"unexpected function state"
)
}
// line 19
1
: EnumParOut = EnumParIn
πF
.
SetLineno
(
19
1
)
// line 19
2
: EnumParOut = EnumParIn
πF
.
SetLineno
(
19
2
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µEnumParIn
,
"EnumParIn"
);
πE
!=
nil
{
continue
}
...
...
@@ -1955,11 +1968,11 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
goto
Label1
}
goto
Label2
// line 192: if not Func3(EnumParIn):
πF
.
SetLineno
(
192
)
Label1
:
// line 193: EnumParOut = Ident4
// line 193: if not Func3(EnumParIn):
πF
.
SetLineno
(
193
)
Label1
:
// line 194: EnumParOut = Ident4
πF
.
SetLineno
(
194
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßIdent4
);
πE
!=
nil
{
continue
}
...
...
@@ -2042,18 +2055,18 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
goto
Label7
}
goto
Label8
// line 194: if EnumParIn == Ident1:
πF
.
SetLineno
(
194
)
Label3
:
// line 195: EnumParOut = Ident1
// line 195: if EnumParIn == Ident1:
πF
.
SetLineno
(
195
)
Label3
:
// line 196: EnumParOut = Ident1
πF
.
SetLineno
(
196
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßIdent1
);
πE
!=
nil
{
continue
}
µEnumParOut
=
πTemp001
goto
Label8
// line 19
6
: elif EnumParIn == Ident2:
πF
.
SetLineno
(
19
6
)
// line 19
7
: elif EnumParIn == Ident2:
πF
.
SetLineno
(
19
7
)
Label4
:
if
πTemp003
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßIntGlob
);
πE
!=
nil
{
continue
...
...
@@ -2068,19 +2081,19 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
goto
Label9
}
goto
Label10
// line 197: if IntGlob > 100:
πF
.
SetLineno
(
197
)
Label9
:
// line 198: EnumParOut = Ident1
// line 198: if IntGlob > 100:
πF
.
SetLineno
(
198
)
Label9
:
// line 199: EnumParOut = Ident1
πF
.
SetLineno
(
199
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßIdent1
);
πE
!=
nil
{
continue
}
µEnumParOut
=
πTemp001
goto
Label11
Label10
:
// line 20
0
: EnumParOut = Ident4
πF
.
SetLineno
(
20
0
)
// line 20
1
: EnumParOut = Ident4
πF
.
SetLineno
(
20
1
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßIdent4
);
πE
!=
nil
{
continue
}
...
...
@@ -2088,35 +2101,35 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
goto
Label11
Label11
:
goto
Label8
// line 201: elif EnumParIn == Ident3:
πF
.
SetLineno
(
201
)
Label5
:
// line 202: EnumParOut = Ident2
// line 202: elif EnumParIn == Ident3:
πF
.
SetLineno
(
202
)
Label5
:
// line 203: EnumParOut = Ident2
πF
.
SetLineno
(
203
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßIdent2
);
πE
!=
nil
{
continue
}
µEnumParOut
=
πTemp001
goto
Label8
// line 203: elif EnumParIn == Ident4:
πF
.
SetLineno
(
203
)
Label6
:
// line 204: pass
// line 204: elif EnumParIn == Ident4:
πF
.
SetLineno
(
204
)
goto
Label8
// line 205:
elif EnumParIn == Ident5:
Label6
:
// line 205:
pass
πF
.
SetLineno
(
205
)
Label7
:
// line 206:
EnumParOut = Ident3
goto
Label8
// line 206:
elif EnumParIn == Ident5:
πF
.
SetLineno
(
206
)
Label7
:
// line 207: EnumParOut = Ident3
πF
.
SetLineno
(
207
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßIdent3
);
πE
!=
nil
{
continue
}
µEnumParOut
=
πTemp001
goto
Label8
Label8
:
// line 20
7
: return EnumParOut
πF
.
SetLineno
(
20
7
)
// line 20
8
: return EnumParOut
πF
.
SetLineno
(
20
8
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µEnumParOut
,
"EnumParOut"
);
πE
!=
nil
{
continue
}
...
...
@@ -2128,8 +2141,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßProc6
.
ToObject
(),
πTemp013
);
πE
!=
nil
{
continue
}
// line 2
09
: def Proc7(IntParI1, IntParI2):
πF
.
SetLineno
(
2
09
)
// line 2
10
: def Proc7(IntParI1, IntParI2):
πF
.
SetLineno
(
2
10
)
πTemp009
=
make
([]
πg
.
Param
,
2
)
πTemp009
[
0
]
=
πg
.
Param
{
Name
:
"IntParI1"
,
Def
:
nil
}
πTemp009
[
1
]
=
πg
.
Param
{
Name
:
"IntParI2"
,
Def
:
nil
}
...
...
@@ -2146,8 +2159,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
case
0
:
default
:
panic
(
"unexpected function state"
)
}
// line 21
0
: IntLoc = IntParI1 + 2
πF
.
SetLineno
(
21
0
)
// line 21
1
: IntLoc = IntParI1 + 2
πF
.
SetLineno
(
21
1
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntParI1
,
"IntParI1"
);
πE
!=
nil
{
continue
}
...
...
@@ -2155,8 +2168,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
continue
}
µIntLoc
=
πTemp001
// line 21
1
: IntParOut = IntParI2 + IntLoc
πF
.
SetLineno
(
21
1
)
// line 21
2
: IntParOut = IntParI2 + IntLoc
πF
.
SetLineno
(
21
2
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntParI2
,
"IntParI2"
);
πE
!=
nil
{
continue
}
...
...
@@ -2167,8 +2180,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
continue
}
µIntParOut
=
πTemp001
// line 21
2
: return IntParOut
πF
.
SetLineno
(
21
2
)
// line 21
3
: return IntParOut
πF
.
SetLineno
(
21
3
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntParOut
,
"IntParOut"
);
πE
!=
nil
{
continue
}
...
...
@@ -2180,8 +2193,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßProc7
.
ToObject
(),
πTemp014
);
πE
!=
nil
{
continue
}
// line 21
4
: def Proc8(Array1Par, Array2Par, IntParI1, IntParI2):
πF
.
SetLineno
(
21
4
)
// line 21
5
: def Proc8(Array1Par, Array2Par, IntParI1, IntParI2):
πF
.
SetLineno
(
21
5
)
πTemp009
=
make
([]
πg
.
Param
,
4
)
πTemp009
[
0
]
=
πg
.
Param
{
Name
:
"Array1Par"
,
Def
:
nil
}
πTemp009
[
1
]
=
πg
.
Param
{
Name
:
"Array2Par"
,
Def
:
nil
}
...
...
@@ -2214,10 +2227,10 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
case
0
:
default
:
panic
(
"unexpected function state"
)
}
// line 21
5
: global IntGlob
πF
.
SetLineno
(
21
5
)
// line 21
7
: IntLoc = IntParI1 + 5
πF
.
SetLineno
(
21
7
)
// line 21
6
: global IntGlob
πF
.
SetLineno
(
21
6
)
// line 21
8
: IntLoc = IntParI1 + 5
πF
.
SetLineno
(
21
8
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntParI1
,
"IntParI1"
);
πE
!=
nil
{
continue
}
...
...
@@ -2225,8 +2238,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
continue
}
µIntLoc
=
πTemp001
// line 21
8
: Array1Par[IntLoc] = IntParI2
πF
.
SetLineno
(
21
8
)
// line 21
9
: Array1Par[IntLoc] = IntParI2
πF
.
SetLineno
(
21
9
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntParI2
,
"IntParI2"
);
πE
!=
nil
{
continue
}
...
...
@@ -2243,8 +2256,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
SetItem
(
πF
,
µArray1Par
,
πTemp002
,
πTemp001
);
πE
!=
nil
{
continue
}
// line 2
19
: Array1Par[IntLoc+1] = Array1Par[IntLoc]
πF
.
SetLineno
(
2
19
)
// line 2
20
: Array1Par[IntLoc+1] = Array1Par[IntLoc]
πF
.
SetLineno
(
2
20
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntLoc
,
"IntLoc"
);
πE
!=
nil
{
continue
}
...
...
@@ -2271,8 +2284,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
SetItem
(
πF
,
µArray1Par
,
πTemp003
,
πTemp001
);
πE
!=
nil
{
continue
}
// line 22
0
: Array1Par[IntLoc+30] = IntLoc
πF
.
SetLineno
(
22
0
)
// line 22
1
: Array1Par[IntLoc+30] = IntLoc
πF
.
SetLineno
(
22
1
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntLoc
,
"IntLoc"
);
πE
!=
nil
{
continue
}
...
...
@@ -2292,8 +2305,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
SetItem
(
πF
,
µArray1Par
,
πTemp002
,
πTemp001
);
πE
!=
nil
{
continue
}
// line 22
1
: for IntIndex in range(IntLoc, IntLoc+2):
πF
.
SetLineno
(
22
1
)
// line 22
2
: for IntIndex in range(IntLoc, IntLoc+2):
πF
.
SetLineno
(
22
2
)
πTemp005
=
πF
.
MakeArgs
(
2
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntLoc
,
"IntLoc"
);
πE
!=
nil
{
continue
...
...
@@ -2331,8 +2344,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
goto
Label2
}
µIntIndex
=
πTemp003
// line 22
2
: Array2Par[IntLoc][IntIndex] = IntLoc
πF
.
SetLineno
(
22
2
)
// line 22
3
: Array2Par[IntLoc][IntIndex] = IntLoc
πF
.
SetLineno
(
22
3
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntLoc
,
"IntLoc"
);
πE
!=
nil
{
continue
}
...
...
@@ -2359,8 +2372,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
goto
Label1
goto
Label2
Label2
:
// line 22
3
: Array2Par[IntLoc][IntLoc-1] = Array2Par[IntLoc][IntLoc-1] + 1
πF
.
SetLineno
(
22
3
)
// line 22
4
: Array2Par[IntLoc][IntLoc-1] = Array2Par[IntLoc][IntLoc-1] + 1
πF
.
SetLineno
(
22
4
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntLoc
,
"IntLoc"
);
πE
!=
nil
{
continue
}
...
...
@@ -2407,8 +2420,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
SetItem
(
πF
,
πTemp004
,
πTemp003
,
πTemp002
);
πE
!=
nil
{
continue
}
// line 22
4
: Array2Par[IntLoc+20][IntLoc] = Array1Par[IntLoc]
πF
.
SetLineno
(
22
4
)
// line 22
5
: Array2Par[IntLoc+20][IntLoc] = Array1Par[IntLoc]
πF
.
SetLineno
(
22
5
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntLoc
,
"IntLoc"
);
πE
!=
nil
{
continue
}
...
...
@@ -2442,8 +2455,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
SetItem
(
πF
,
πTemp004
,
πTemp003
,
πTemp001
);
πE
!=
nil
{
continue
}
// line 22
5
: IntGlob = 5
πF
.
SetLineno
(
22
5
)
// line 22
6
: IntGlob = 5
πF
.
SetLineno
(
22
6
)
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßIntGlob
.
ToObject
(),
πg
.
NewInt
(
5
)
.
ToObject
());
πE
!=
nil
{
continue
}
...
...
@@ -2454,8 +2467,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßProc8
.
ToObject
(),
πTemp015
);
πE
!=
nil
{
continue
}
// line 22
7
: def Func1(CharPar1, CharPar2):
πF
.
SetLineno
(
22
7
)
// line 22
8
: def Func1(CharPar1, CharPar2):
πF
.
SetLineno
(
22
8
)
πTemp009
=
make
([]
πg
.
Param
,
2
)
πTemp009
[
0
]
=
πg
.
Param
{
Name
:
"CharPar1"
,
Def
:
nil
}
πTemp009
[
1
]
=
πg
.
Param
{
Name
:
"CharPar2"
,
Def
:
nil
}
...
...
@@ -2474,14 +2487,14 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
case
0
:
default
:
panic
(
"unexpected function state"
)
}
// line 22
8
: CharLoc1 = CharPar1
πF
.
SetLineno
(
22
8
)
// line 22
9
: CharLoc1 = CharPar1
πF
.
SetLineno
(
22
9
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µCharPar1
,
"CharPar1"
);
πE
!=
nil
{
continue
}
µCharLoc1
=
µCharPar1
// line 2
29
: CharLoc2 = CharLoc1
πF
.
SetLineno
(
2
29
)
// line 2
30
: CharLoc2 = CharLoc1
πF
.
SetLineno
(
2
30
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µCharLoc1
,
"CharLoc1"
);
πE
!=
nil
{
continue
}
...
...
@@ -2502,19 +2515,19 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
goto
Label1
}
goto
Label2
// line 230: if CharLoc2 != CharPar2:
πF
.
SetLineno
(
230
)
Label1
:
// line 231: return Ident1
// line 231: if CharLoc2 != CharPar2:
πF
.
SetLineno
(
231
)
Label1
:
// line 232: return Ident1
πF
.
SetLineno
(
232
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßIdent1
);
πE
!=
nil
{
continue
}
return
πTemp001
,
nil
goto
Label3
Label2
:
// line 23
3
: return Ident2
πF
.
SetLineno
(
23
3
)
// line 23
4
: return Ident2
πF
.
SetLineno
(
23
4
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßIdent2
);
πE
!=
nil
{
continue
}
...
...
@@ -2528,8 +2541,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßFunc1
.
ToObject
(),
πTemp016
);
πE
!=
nil
{
continue
}
// line 23
5
: def Func2(StrParI1, StrParI2):
πF
.
SetLineno
(
23
5
)
// line 23
6
: def Func2(StrParI1, StrParI2):
πF
.
SetLineno
(
23
6
)
πTemp009
=
make
([]
πg
.
Param
,
2
)
πTemp009
[
0
]
=
πg
.
Param
{
Name
:
"StrParI1"
,
Def
:
nil
}
πTemp009
[
1
]
=
πg
.
Param
{
Name
:
"StrParI2"
,
Def
:
nil
}
...
...
@@ -2558,11 +2571,11 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
case
0
:
default
:
panic
(
"unexpected function state"
)
}
// line 236: IntLoc = 1
πF
.
SetLineno
(
236
)
µIntLoc
=
πg
.
NewInt
(
1
)
.
ToObject
()
// line 237: while IntLoc <= 1:
// line 237: IntLoc = 1
πF
.
SetLineno
(
237
)
µIntLoc
=
πg
.
NewInt
(
1
)
.
ToObject
()
// line 238: while IntLoc <= 1:
πF
.
SetLineno
(
238
)
Label1
:
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntLoc
,
"IntLoc"
);
πE
!=
nil
{
continue
...
...
@@ -2622,14 +2635,14 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
goto
Label3
}
goto
Label4
// line 238: if Func1(StrParI1[IntLoc], StrParI2[IntLoc+1]) == Ident1:
πF
.
SetLineno
(
238
)
Label3
:
// line 239: CharLoc = 'A'
// line 239: if Func1(StrParI1[IntLoc], StrParI2[IntLoc+1]) == Ident1:
πF
.
SetLineno
(
239
)
µCharLoc
=
ßA
.
ToObject
()
// line 240:
IntLoc = IntLoc + 1
Label3
:
// line 240:
CharLoc = 'A'
πF
.
SetLineno
(
240
)
µCharLoc
=
ßA
.
ToObject
()
// line 241: IntLoc = IntLoc + 1
πF
.
SetLineno
(
241
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntLoc
,
"IntLoc"
);
πE
!=
nil
{
continue
}
...
...
@@ -2670,11 +2683,11 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
goto
Label6
}
goto
Label7
// line 241: if CharLoc >= 'W' and CharLoc <= 'Z':
πF
.
SetLineno
(
241
)
Label6
:
// line 242: IntLoc = 7
// line 242: if CharLoc >= 'W' and CharLoc <= 'Z':
πF
.
SetLineno
(
242
)
Label6
:
// line 243: IntLoc = 7
πF
.
SetLineno
(
243
)
µIntLoc
=
πg
.
NewInt
(
7
)
.
ToObject
()
goto
Label7
Label7
:
...
...
@@ -2706,21 +2719,21 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
goto
Label9
}
goto
Label10
// line 243: if CharLoc == 'X':
πF
.
SetLineno
(
243
)
Label8
:
// line 244: return TRUE
// line 244: if CharLoc == 'X':
πF
.
SetLineno
(
244
)
Label8
:
// line 245: return TRUE
πF
.
SetLineno
(
245
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßTRUE
);
πE
!=
nil
{
continue
}
return
πTemp001
,
nil
goto
Label11
// line 246: if StrParI1 > StrParI2:
πF
.
SetLineno
(
246
)
Label9
:
// line 247: IntLoc = IntLoc + 7
// line 247: if StrParI1 > StrParI2:
πF
.
SetLineno
(
247
)
Label9
:
// line 248: IntLoc = IntLoc + 7
πF
.
SetLineno
(
248
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µIntLoc
,
"IntLoc"
);
πE
!=
nil
{
continue
}
...
...
@@ -2728,16 +2741,16 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
continue
}
µIntLoc
=
πTemp001
// line 24
8
: return TRUE
πF
.
SetLineno
(
24
8
)
// line 24
9
: return TRUE
πF
.
SetLineno
(
24
9
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßTRUE
);
πE
!=
nil
{
continue
}
return
πTemp001
,
nil
goto
Label11
Label10
:
// line 25
0
: return FALSE
πF
.
SetLineno
(
25
0
)
// line 25
1
: return FALSE
πF
.
SetLineno
(
25
1
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßFALSE
);
πE
!=
nil
{
continue
}
...
...
@@ -2751,8 +2764,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßFunc2
.
ToObject
(),
πTemp017
);
πE
!=
nil
{
continue
}
// line 25
2
: def Func3(EnumParIn):
πF
.
SetLineno
(
25
2
)
// line 25
3
: def Func3(EnumParIn):
πF
.
SetLineno
(
25
3
)
πTemp009
=
make
([]
πg
.
Param
,
1
)
πTemp009
[
0
]
=
πg
.
Param
{
Name
:
"EnumParIn"
,
Def
:
nil
}
πTemp018
=
πg
.
NewFunction
(
πg
.
NewCode
(
"Func3"
,
"pystone.py"
,
πTemp009
,
0
,
func
(
πF
*
πg
.
Frame
,
πArgs
[]
*
πg
.
Object
)
(
*
πg
.
Object
,
*
πg
.
BaseException
)
{
...
...
@@ -2770,8 +2783,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
case
0
:
default
:
panic
(
"unexpected function state"
)
}
// line 25
3
: EnumLoc = EnumParIn
πF
.
SetLineno
(
25
3
)
// line 25
4
: EnumLoc = EnumParIn
πF
.
SetLineno
(
25
4
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µEnumParIn
,
"EnumParIn"
);
πE
!=
nil
{
continue
}
...
...
@@ -2792,19 +2805,19 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
goto
Label1
}
goto
Label2
// line 25
4
: if EnumLoc == Ident3: return TRUE
πF
.
SetLineno
(
25
4
)
// line 25
5
: if EnumLoc == Ident3: return TRUE
πF
.
SetLineno
(
25
5
)
Label1
:
// line 25
4
: if EnumLoc == Ident3: return TRUE
πF
.
SetLineno
(
25
4
)
// line 25
5
: if EnumLoc == Ident3: return TRUE
πF
.
SetLineno
(
25
5
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßTRUE
);
πE
!=
nil
{
continue
}
return
πTemp001
,
nil
goto
Label2
Label2
:
// line 25
5
: return FALSE
πF
.
SetLineno
(
25
5
)
// line 25
6
: return FALSE
πF
.
SetLineno
(
25
6
)
if
πTemp001
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßFALSE
);
πE
!=
nil
{
continue
}
...
...
@@ -2829,11 +2842,11 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
goto
Label1
}
goto
Label2
// line 257: if __name__ == '__main__':
πF
.
SetLineno
(
257
)
Label1
:
// line 258: import sys
// line 258: if __name__ == '__main__':
πF
.
SetLineno
(
258
)
Label1
:
// line 259: import sys
πF
.
SetLineno
(
259
)
if
πTemp002
,
πE
=
πg
.
ImportModule
(
πF
,
"sys"
,
[]
*
πg
.
Code
{
π___python__Γsys
.
Code
});
πE
!=
nil
{
continue
}
...
...
@@ -2841,8 +2854,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßsys
.
ToObject
(),
πTemp019
);
πE
!=
nil
{
continue
}
// line 2
59
: def error(msg):
πF
.
SetLineno
(
2
59
)
// line 2
60
: def error(msg):
πF
.
SetLineno
(
2
60
)
πTemp009
=
make
([]
πg
.
Param
,
1
)
πTemp009
[
0
]
=
πg
.
Param
{
Name
:
"msg"
,
Def
:
nil
}
πTemp019
=
πg
.
NewFunction
(
πg
.
NewCode
(
"error"
,
"pystone.py"
,
πTemp009
,
0
,
func
(
πF
*
πg
.
Frame
,
πArgs
[]
*
πg
.
Object
)
(
*
πg
.
Object
,
*
πg
.
BaseException
)
{
...
...
@@ -2865,8 +2878,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
case
0
:
default
:
panic
(
"unexpected function state"
)
}
// line 26
0
: print >>sys.stderr, msg,
πF
.
SetLineno
(
26
0
)
// line 26
1
: print >>sys.stderr, msg,
πF
.
SetLineno
(
26
1
)
πTemp001
=
make
([]
*
πg
.
Object
,
1
)
if
πE
=
πg
.
CheckLocal
(
πF
,
µmsg
,
"msg"
);
πE
!=
nil
{
continue
...
...
@@ -2875,8 +2888,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
Print
(
πF
,
πTemp001
,
false
);
πE
!=
nil
{
continue
}
// line 26
1
: print >>sys.stderr, "usage: %s [number_of_loops]" % sys.argv[0]
πF
.
SetLineno
(
26
1
)
// line 26
2
: print >>sys.stderr, "usage: %s [number_of_loops]" % sys.argv[0]
πF
.
SetLineno
(
26
2
)
πTemp001
=
make
([]
*
πg
.
Object
,
1
)
πTemp003
=
πg
.
NewInt
(
0
)
.
ToObject
()
if
πTemp005
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßsys
);
πE
!=
nil
{
...
...
@@ -2895,8 +2908,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πg
.
Print
(
πF
,
πTemp001
,
true
);
πE
!=
nil
{
continue
}
// line 26
2
: sys.exit(100)
πF
.
SetLineno
(
26
2
)
// line 26
3
: sys.exit(100)
πF
.
SetLineno
(
26
3
)
πTemp001
=
πF
.
MakeArgs
(
1
)
πTemp001
[
0
]
=
πg
.
NewInt
(
100
)
.
ToObject
()
if
πTemp002
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßsys
);
πE
!=
nil
{
...
...
@@ -2916,8 +2929,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
if
πE
=
πF
.
Globals
()
.
SetItem
(
πF
,
ßerror
.
ToObject
(),
πTemp019
);
πE
!=
nil
{
continue
}
// line 26
3
: nargs = len(sys.argv) - 1
πF
.
SetLineno
(
26
3
)
// line 26
4
: nargs = len(sys.argv) - 1
πF
.
SetLineno
(
26
4
)
πTemp002
=
πF
.
MakeArgs
(
1
)
if
πTemp022
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßsys
);
πE
!=
nil
{
continue
...
...
@@ -2964,11 +2977,11 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
goto
Label4
}
goto
Label5
// line 264: if nargs > 1:
πF
.
SetLineno
(
264
)
Label3
:
// line 265: error("%d arguments are too many;" % nargs)
// line 265: if nargs > 1:
πF
.
SetLineno
(
265
)
Label3
:
// line 266: error("%d arguments are too many;" % nargs)
πF
.
SetLineno
(
266
)
πTemp002
=
πF
.
MakeArgs
(
1
)
if
πTemp022
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßnargs
);
πE
!=
nil
{
continue
...
...
@@ -2985,14 +2998,14 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
}
πF
.
FreeArgs
(
πTemp002
)
goto
Label6
// line 266: elif nargs == 1:
πF
.
SetLineno
(
266
)
Label4
:
// line 267: try: loops = int(sys.argv[1])
// line 267: elif nargs == 1:
πF
.
SetLineno
(
267
)
Label4
:
// line 268: try: loops = int(sys.argv[1])
πF
.
SetLineno
(
268
)
πF
.
PushCheckpoint
(
8
)
// line 26
7
: try: loops = int(sys.argv[1])
πF
.
SetLineno
(
26
7
)
// line 26
8
: try: loops = int(sys.argv[1])
πF
.
SetLineno
(
26
8
)
πTemp002
=
πF
.
MakeArgs
(
1
)
πTemp020
=
πg
.
NewInt
(
1
)
.
ToObject
()
if
πTemp023
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßsys
);
πE
!=
nil
{
...
...
@@ -3030,11 +3043,11 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
}
πE
=
πF
.
Raise
(
πTemp025
.
ToObject
(),
nil
,
πTemp026
.
ToObject
())
continue
// line 268: except ValueError:
πF
.
SetLineno
(
268
)
Label9
:
// line 269: error("Invalid argument %r;" % sys.argv[1])
// line 269: except ValueError:
πF
.
SetLineno
(
269
)
Label9
:
// line 270: error("Invalid argument %r;" % sys.argv[1])
πF
.
SetLineno
(
270
)
πTemp002
=
πF
.
MakeArgs
(
1
)
πTemp022
=
πg
.
NewInt
(
1
)
.
ToObject
()
if
πTemp024
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßsys
);
πE
!=
nil
{
...
...
@@ -3063,8 +3076,8 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
Label7
:
goto
Label6
Label5
:
// line 27
1
: loops = LOOPS
πF
.
SetLineno
(
27
1
)
// line 27
2
: loops = LOOPS
πF
.
SetLineno
(
27
2
)
if
πTemp020
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßLOOPS
);
πE
!=
nil
{
continue
}
...
...
@@ -3073,8 +3086,11 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
}
goto
Label6
Label6
:
// line 272: main(loops)
πF
.
SetLineno
(
272
)
// line 273: try:
πF
.
SetLineno
(
273
)
πF
.
PushCheckpoint
(
11
)
// line 274: main(loops)
πF
.
SetLineno
(
274
)
πTemp002
=
πF
.
MakeArgs
(
1
)
if
πTemp020
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßloops
);
πE
!=
nil
{
continue
...
...
@@ -3087,6 +3103,26 @@ func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseExceptio
continue
}
πF
.
FreeArgs
(
πTemp002
)
πF
.
PopCheckpoint
()
goto
Label10
// line 275: except:
πF
.
SetLineno
(
275
)
Label11
:
// line 276: traceback.print_exc()
πF
.
SetLineno
(
276
)
if
πTemp020
,
πE
=
πg
.
ResolveGlobal
(
πF
,
ßtraceback
);
πE
!=
nil
{
continue
}
if
πTemp022
,
πE
=
πg
.
GetAttr
(
πF
,
πTemp020
,
ßprint_exc
,
nil
);
πE
!=
nil
{
continue
}
if
πTemp020
,
πE
=
πTemp022
.
Call
(
πF
,
nil
,
nil
);
πE
!=
nil
{
continue
}
πE
=
nil
πF
.
RestoreExc
(
nil
,
nil
)
goto
Label10
Label10
:
goto
Label2
Label2
:
return
nil
,
nil
...
...
pystone.py
View file @
34d8ed8e
...
...
@@ -37,6 +37,7 @@ LOOPS = 50000
#from time import clock
import
time
clock
=
time
.
clock
import
traceback
__version__
=
"1.1"
...
...
@@ -269,4 +270,7 @@ if __name__ == '__main__':
error
(
"Invalid argument %r;"
%
sys
.
argv
[
1
])
else
:
loops
=
LOOPS
main
(
loops
)
try
:
main
(
loops
)
except
:
traceback
.
print_exc
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment