Author: jquelin
Date: Wed Oct 3 09:10:32 2007
New Revision: 21774
Modified:
branches/pdd15oo/t/library/File_Spec.t
branches/pdd15oo/t/library/dumper.t
branches/pdd15oo/t/library/streams.t
branches/pdd15oo/t/library/test_builder_tester.t
branches/pdd15oo/t/library/test_more.t
Log:
more find_type removal
Modified: branches/pdd15oo/t/library/File_Spec.t
==============================================================================
--- branches/pdd15oo/t/library/File_Spec.t (original)
+++ branches/pdd15oo/t/library/File_Spec.t Wed Oct 3 09:10:32 2007
@@ -32,8 +32,7 @@
.local int classtype
.local pmc spec
- find_type classtype, 'File::Spec'
- new spec, classtype
+ spec = new 'File::Spec'
PRE
my $POST = <<'POST';
Modified: branches/pdd15oo/t/library/dumper.t
==============================================================================
--- branches/pdd15oo/t/library/dumper.t (original)
+++ branches/pdd15oo/t/library/dumper.t Wed Oct 3 09:10:32 2007
@@ -517,9 +517,8 @@
newclass temp, "TestClass"
- find_type I0, "TestClass"
new array, 'ResizablePMCArray'
- new temp, I0
+ temp = new "TestClass"
push array, temp
new temp, I0
push array, temp
Modified: branches/pdd15oo/t/library/streams.t
==============================================================================
--- branches/pdd15oo/t/library/streams.t (original)
+++ branches/pdd15oo/t/library/streams.t Wed Oct 3 09:10:32 2007
@@ -37,8 +37,7 @@
load_bytecode "library/Stream/$a.pir"
print "loaded\\n"
- find_type \$I0, "Stream::$a"
- \$P0 = new \$I0
+ \$P0 = new "Stream::$a"
\$S0 = classname \$P0
print "classname: '"
@@ -65,8 +64,7 @@
load_bytecode "library/Stream/Sub.pir"
- find_type I0, "Stream::Sub"
- new stream, I0
+ stream = new "Stream::Sub"
# set the stream's source sub #'
.const .Sub temp = "_hello"
@@ -113,14 +111,12 @@
load_bytecode "library/Stream/Sub.pir"
load_bytecode "library/Stream/Replay.pir"
- find_type $I0, "Stream::Sub"
- new $P0, $I0
+ $P0 = new "Stream::Sub"
# set the stream's source sub #'
.const .Sub temp = "_hello"
assign $P0, temp
- find_type $I0, "Stream::Replay"
- stream = new $I0
+ stream = new "Stream::Replay"
assign stream, $P0
$S0 = stream."read_bytes"( 3 )
@@ -194,21 +190,18 @@
load_bytecode "library/Stream/Sub.pir"
# create the counter stream
- find_type I0, "Stream::Sub"
- new counter, I0
+ counter = "Stream::Sub"
.const .Sub ct = "_counter"
assign counter, ct
# create the text stream
- find_type I0, "Stream::Sub"
- new text, I0
+ text = new "Stream::Sub"
# set its source
.const .Sub src = "_text"
assign text, src
# create a combiner stream
- find_type I0, "Stream::Combiner"
- new combined, I0
+ combined = new "Stream::Combiner"
# add the streams
assign combined, counter
assign combined, text
@@ -282,8 +275,7 @@
load_bytecode "library/Stream/Coroutine.pir"
# create the coroutine stream
- find_type I0, "Stream::Coroutine"
- new stream, I0
+ stream = new "Stream::Coroutine"
# set the stream's source coroutine #'
.const .Sub temp = "_coro"
@@ -357,24 +349,20 @@
load_bytecode "library/Stream/Combiner.pir"
# create a file stream
- find_type $I0, "Stream::ParrotIO"
- new file, $I0
+ file = new "Stream::ParrotIO"
file."open"( name, "<" )
# process it one line per read
- find_type $I0, "Stream::Lines"
- new lines, $I0
+ lines = new "Stream::Lines"
assign lines, file
# endless counter
- find_type $I0, "Stream::Sub"
- new counter, $I0
+ counter = new "Stream::Sub"
.const .Sub temp = "_counter"
assign counter, temp
# combine the counter and the file's lines #'
- find_type $I0, "Stream::Combiner"
- new combiner, $I0
+ combiner = new "Stream::Combiner"
assign combiner, counter
assign combiner, lines
@@ -720,15 +708,13 @@
load_bytecode "library/Stream/Filter.pir"
# create the counter stream
- find_type I0, "Stream::Sub"
- new stream, I0
+ stream = new "Stream::Sub"
# assign its source
.const .Sub temp = "_counter"
assign stream, temp
# create the filter stream
- find_type I0, "Stream::Filter"
- new filter, I0
+ filter = new "Stream::Filter"
# assign its source
assign filter, stream
# set the filter sub
@@ -805,8 +791,7 @@
load_bytecode "library/Stream/Sub.pir"
- find_type I0, "Stream::Sub"
- new stream, I0
+ stream = new "Stream::Sub"
.const .Sub temp = "_counter"
assign stream, temp
@@ -836,8 +821,7 @@
if i != 4 goto SKIP
.local pmc temp
- find_type I0, "Stream::Sub"
- new temp, I0
+ temp = new "Stream::Sub"
.const .Sub func = "_included"
assign temp, func
@@ -856,8 +840,7 @@
self."write"( "hello" )
# create another stream
- find_type I0, "Stream::Sub"
- new temp, I0
+ temp = new "Stream::Sub"
.const .Sub func = "_counter2"
assign temp, func
@@ -916,15 +899,13 @@
load_bytecode "library/Stream/Lines.pir"
# create a text stream
- find_type I0, "Stream::Sub"
- new stream, I0
+ stream = new "Stream::Sub"
# set the source
.const .Sub temp = "_text"
assign stream, temp
# create a lines stream
- find_type I0, "Stream::Lines"
- new lines, I0
+ lines = new "Stream::Lines"
# set the source
assign lines, stream
@@ -964,8 +945,7 @@
load_bytecode "library/Stream/ParrotIO.pir"
# create the ParrotIO stream
- find_type I0, "Stream::ParrotIO"
- new stream, I0
+ stream = new "Stream::ParrotIO"
# open this file
stream."open"( "t/library/perlhist.txt", "<" )
@@ -1279,8 +1259,7 @@
load_bytecode "library/Stream/Writer.pir"
load_bytecode "library/Stream/Replay.pir"
- find_type I0, "Stream::Writer"
- new stream, I0
+ stream = new "Stream::Writer"
P0 = global "_reader"
assign stream, P0
@@ -1306,8 +1285,7 @@
.local pmc stream3
.local string str
- find_type I0, "Stream::Replay"
- new stream1, I0
+ stream1 = new "Stream::Replay"
assign stream1, self
print "reader start\n"
@@ -1383,8 +1361,7 @@
load_bytecode "library/Stream/Base.pir"
load_bytecode "library/Stream/Sub.pir"
- find_type I0, "Stream::Sub"
- new stream, I0
+ stream = new "Stream::Sub"
.const .Sub temp = "_counter"
assign stream, temp
@@ -1444,8 +1421,7 @@
load_bytecode "library/Stream/Writer.pir"
- find_type I0, "Stream::Writer"
- new stream, I0
+ stream = new "Stream::Writer"
# set the stream's source sub
.const .Sub temp = "_reader"
Modified: branches/pdd15oo/t/library/test_builder_tester.t
==============================================================================
--- branches/pdd15oo/t/library/test_builder_tester.t (original)
+++ branches/pdd15oo/t/library/test_builder_tester.t Wed Oct 3 09:10:32 2007
@@ -3,14 +3,11 @@
.sub _main :main
load_bytecode 'library/Test/Builder/Tester.pir'
- .local int tb_type
- find_type tb_type, 'Test::Builder'
-
.local pmc tb_args
tb_args = new 'Hash'
.local pmc test
- test = new tb_type, tb_args
+ test = new 'Test::Builder', tb_args
.local pmc plan
.local pmc test_pass
Modified: branches/pdd15oo/t/library/test_more.t
==============================================================================
--- branches/pdd15oo/t/library/test_more.t (original)
+++ branches/pdd15oo/t/library/test_more.t Wed Oct 3 09:10:32 2007
@@ -4,14 +4,11 @@
load_bytecode 'library/Test/Builder/Tester.pir'
load_bytecode 'library/Test/More.pir'
- .local int tb_type
- find_type tb_type, 'Test::Builder'
-
.local pmc tb_args
tb_args = new 'Hash'
.local pmc test
- test = new tb_type, tb_args
+ test = new 'Test::Builder', tb_args
.local pmc exports, curr_namespace, test_namespace
curr_namespace = get_namespace