[svn:parrot] r43083 - in trunk: compilers/pct/src/PCT compilers/tge examples/benchmarks examples/library examples/pir examples/sdl runtime/parrot/library runtime/parrot/library/Getopt t/library tools/dev
tene at svn.parrot.org
tene at svn.parrot.org
Wed Dec 16 04:28:50 UTC 2009
Author: tene
Date: Wed Dec 16 04:28:49 2009
New Revision: 43083
URL: https://trac.parrot.org/parrot/changeset/43083
Log:
Fix Getopt::Obj to use a keyed namespace
Modified:
trunk/compilers/pct/src/PCT/HLLCompiler.pir
trunk/compilers/tge/tgc.pir
trunk/examples/benchmarks/array_access.pir
trunk/examples/library/getopt_demo.pir
trunk/examples/pir/quine_ord.pir
trunk/examples/pir/sudoku.pir
trunk/examples/sdl/mandel.pir
trunk/runtime/parrot/library/Crow.pir
trunk/runtime/parrot/library/Getopt/Obj.pir
trunk/t/library/getopt_obj.t
trunk/tools/dev/bench_op.pir
Modified: trunk/compilers/pct/src/PCT/HLLCompiler.pir
==============================================================================
--- trunk/compilers/pct/src/PCT/HLLCompiler.pir Wed Dec 16 04:15:20 2009 (r43082)
+++ trunk/compilers/pct/src/PCT/HLLCompiler.pir Wed Dec 16 04:28:49 2009 (r43083)
@@ -771,7 +771,7 @@
.local string arg0
arg0 = shift args
.local pmc getopts
- getopts = new 'Getopt::Obj'
+ getopts = new ['Getopt';'Obj']
getopts.'notOptStop'(1)
$P0 = getattribute self, '@cmdoptions'
.local pmc it
Modified: trunk/compilers/tge/tgc.pir
==============================================================================
--- trunk/compilers/tge/tgc.pir Wed Dec 16 04:15:20 2009 (r43082)
+++ trunk/compilers/tge/tgc.pir Wed Dec 16 04:28:49 2009 (r43083)
@@ -46,7 +46,7 @@
# Process command line options
.local pmc getopts
- getopts = new "Getopt::Obj"
+ getopts = new ["Getopt";"Obj"]
getopts."notOptStop"(1)
push getopts, "output|o=s"
push getopts, "help|h"
Modified: trunk/examples/benchmarks/array_access.pir
==============================================================================
--- trunk/examples/benchmarks/array_access.pir Wed Dec 16 04:15:20 2009 (r43082)
+++ trunk/examples/benchmarks/array_access.pir Wed Dec 16 04:28:49 2009 (r43083)
@@ -26,7 +26,7 @@
# Specification of command line arguments.
.local pmc getopts
- getopts = new [ 'Getopt::Obj' ]
+ getopts = new [ 'Getopt';'Obj' ]
push getopts, "arr-size=i"
.local pmc opt
Modified: trunk/examples/library/getopt_demo.pir
==============================================================================
--- trunk/examples/library/getopt_demo.pir Wed Dec 16 04:15:20 2009 (r43082)
+++ trunk/examples/library/getopt_demo.pir Wed Dec 16 04:28:49 2009 (r43083)
@@ -37,7 +37,7 @@
# Specification of command line arguments.
.local pmc getopts
- getopts = new "Getopt::Obj"
+ getopts = new ["Getopt";"Obj"]
# getopts."notOptStop"(1)
# --version, boolean
Modified: trunk/examples/pir/quine_ord.pir
==============================================================================
--- trunk/examples/pir/quine_ord.pir Wed Dec 16 04:15:20 2009 (r43082)
+++ trunk/examples/pir/quine_ord.pir Wed Dec 16 04:28:49 2009 (r43083)
@@ -3512,7 +3512,7 @@
# Specification of command line arguments.
.local pmc getopts
- getopts = new "Getopt::Obj"
+ getopts = new ["Getopt";"Obj"]
push getopts, "print-code-as-data"
# Looking at command line
Modified: trunk/examples/pir/sudoku.pir
==============================================================================
--- trunk/examples/pir/sudoku.pir Wed Dec 16 04:15:20 2009 (r43082)
+++ trunk/examples/pir/sudoku.pir Wed Dec 16 04:28:49 2009 (r43083)
@@ -281,7 +281,7 @@
# Specification of command line arguments.
# --version, --debug, --inv=nnn, --builtin=name, --nc, --help
.local pmc getopts
- getopts = new "Getopt::Obj"
+ getopts = new ["Getopt";"Obj"]
push getopts, "version"
push getopts, "debug"
push getopts, "pairs"
Modified: trunk/examples/sdl/mandel.pir
==============================================================================
--- trunk/examples/sdl/mandel.pir Wed Dec 16 04:15:20 2009 (r43082)
+++ trunk/examples/sdl/mandel.pir Wed Dec 16 04:28:49 2009 (r43083)
@@ -59,7 +59,7 @@
.sub 'get_opts'
.param pmc argv
.local pmc opts, getopts
- getopts = new 'Getopt::Obj'
+ getopts = new ['Getopt';'Obj']
push getopts, "quit|q"
push getopts, "threads"
$S0 = shift argv
Modified: trunk/runtime/parrot/library/Crow.pir
==============================================================================
--- trunk/runtime/parrot/library/Crow.pir Wed Dec 16 04:15:20 2009 (r43082)
+++ trunk/runtime/parrot/library/Crow.pir Wed Dec 16 04:28:49 2009 (r43083)
@@ -12,7 +12,7 @@
load_bytecode 'Getopt/Obj.pbc'
.local pmc getopts
- getopts = new 'Getopt::Obj'
+ getopts = new ['Getopt';'Obj']
getopts.'notOptStop'(1)
getopts = push 'help|h'
Modified: trunk/runtime/parrot/library/Getopt/Obj.pir
==============================================================================
--- trunk/runtime/parrot/library/Getopt/Obj.pir Wed Dec 16 04:15:20 2009 (r43082)
+++ trunk/runtime/parrot/library/Getopt/Obj.pir Wed Dec 16 04:28:49 2009 (r43083)
@@ -13,7 +13,7 @@
prog_name = shift argv
load_bytecode "Getopt/Obj.pbc"
.local pmc getopts
- getopts = new "Getopt::Obj"
+ getopts = new ['Getopt';'Obj']
getopts."notOptStop"(1)
# these two are identical, with the exception of the call to name
@@ -71,11 +71,11 @@
.sub __load :anon :load
.local pmc obj, spec
- obj = newclass "Getopt::Obj"
+ obj = newclass ['Getopt';'Obj']
addattribute obj, "Specs"
addattribute obj, "notOptStop"
- spec = newclass "Getopt::Obj::Spec"
+ spec = newclass ["Getopt";"Obj";"Spec"]
addattribute spec, "name"
addattribute spec, "long"
addattribute spec, "short"
@@ -93,7 +93,7 @@
=cut
-.namespace ["Getopt::Obj"]
+.namespace ['Getopt';'Obj']
=item C<init()>
@@ -454,7 +454,7 @@
.sub "add" :method
.local pmc spec, specs
- spec = new "Getopt::Obj::Spec"
+ spec = new ["Getopt";"Obj";"Spec"]
specs = getattribute self, "Specs"
push specs, spec
.return(spec)
@@ -567,7 +567,7 @@
=cut
-.namespace ["Getopt::Obj::Spec"]
+.namespace ["Getopt";"Obj";"Spec"]
=item C<init()>
Modified: trunk/t/library/getopt_obj.t
==============================================================================
--- trunk/t/library/getopt_obj.t Wed Dec 16 04:15:20 2009 (r43082)
+++ trunk/t/library/getopt_obj.t Wed Dec 16 04:28:49 2009 (r43083)
@@ -37,7 +37,7 @@
load_bytecode "Getopt/Obj.pbc"
.local pmc getopts
- getopts = new "Getopt::Obj"
+ getopts = new ['Getopt';'Obj']
$P0 = getopts."add"()
$P0."long"("foo")
@@ -96,7 +96,7 @@
load_bytecode "Getopt/Obj.pbc"
.local pmc getopts
- getopts = new "Getopt::Obj"
+ getopts = new ['Getopt';'Obj']
$P0 = getopts."add"()
$P0."short"("f")
@@ -142,7 +142,7 @@
load_bytecode "Getopt/Obj.pbc"
.local pmc getopts
- getopts = new "Getopt::Obj"
+ getopts = new ['Getopt';'Obj']
$P0 = getopts."add"()
$P0."short"("I")
@@ -176,7 +176,7 @@
load_bytecode "Getopt/Obj.pbc"
.local pmc getopts
- getopts = new "Getopt::Obj"
+ getopts = new ['Getopt';'Obj']
$P0 = getopts."add"()
$P0."long"("include")
@@ -212,7 +212,7 @@
load_bytecode "Getopt/Obj.pbc"
.local pmc getopts
- getopts = new "Getopt::Obj"
+ getopts = new ['Getopt';'Obj']
$P0 = getopts."add"()
$P0."long"("define")
@@ -252,7 +252,7 @@
load_bytecode "Getopt/Obj.pbc"
.local pmc getopts
- getopts = new "Getopt::Obj"
+ getopts = new ['Getopt';'Obj']
$P0 = getopts."add"()
$P0."short"("a")
@@ -295,7 +295,7 @@
load_bytecode "Getopt/Obj.pbc"
.local pmc getopts
- getopts = new "Getopt::Obj"
+ getopts = new ['Getopt';'Obj']
getopts."notOptStop"(1)
$P0 = getopts."add"()
@@ -330,7 +330,7 @@
load_bytecode "Getopt/Obj.pbc"
.local pmc getopts
- getopts = new "Getopt::Obj"
+ getopts = new ['Getopt';'Obj']
$P0 = getopts."add"()
$P0."long"("foo")
@@ -373,7 +373,7 @@
load_bytecode "Getopt/Obj.pbc"
.local pmc getopts
- getopts = new "Getopt::Obj"
+ getopts = new ['Getopt';'Obj']
getopts."notOptStop"(1)
$P0 = getopts."add"()
@@ -422,7 +422,7 @@
load_bytecode "Getopt/Obj.pbc"
.local pmc getopts
- getopts = new "Getopt::Obj"
+ getopts = new ['Getopt';'Obj']
getopts."notOptStop"(1)
$P0 = getopts."add"()
@@ -476,7 +476,7 @@
load_bytecode "Getopt/Obj.pbc"
.local pmc getopts
- getopts = new "Getopt::Obj"
+ getopts = new ['Getopt';'Obj']
$P0 = getopts."add"()
$P0."long"("foo")
@@ -524,7 +524,7 @@
load_bytecode "Getopt/Obj.pbc"
.local pmc getopts
- getopts = new "Getopt::Obj"
+ getopts = new ['Getopt';'Obj']
$P0 = getopts."add"()
$P0."long"("foo")
@@ -576,7 +576,7 @@
load_bytecode "Getopt/Obj.pbc"
.local pmc getopts
- getopts = new "Getopt::Obj"
+ getopts = new ['Getopt';'Obj']
push getopts, 'foo=s'
push getopts, 'bar|b=s'
@@ -659,7 +659,7 @@
push argv, '--foo=file'
load_bytecode "Getopt/Obj.pbc"
.local pmc getopts
- getopts = new "Getopt::Obj"
+ getopts = new ['Getopt';'Obj']
$P1 = getopts."get_options"(argv)
$S0 = $P1["foo"]
print "foo is "
@@ -683,7 +683,7 @@
push argv, '--bar'
load_bytecode "Getopt/Obj.pbc"
.local pmc getopts
- getopts = new "Getopt::Obj"
+ getopts = new ['Getopt';'Obj']
push getopts, 'foo=s'
push getopts, 'bar=s'
$P1 = getopts."get_options"(argv)
Modified: trunk/tools/dev/bench_op.pir
==============================================================================
--- trunk/tools/dev/bench_op.pir Wed Dec 16 04:15:20 2009 (r43082)
+++ trunk/tools/dev/bench_op.pir Wed Dec 16 04:28:49 2009 (r43083)
@@ -81,7 +81,7 @@
# Specification of command line arguments.
.local pmc getopts
- getopts = new "Getopt::Obj"
+ getopts = new ["Getopt";"Obj"]
# getopts."notOptStop"(1)
push getopts, "version"
push getopts, "verbose=i"
More information about the parrot-commits
mailing list