develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35402 - trunk/t/pmc

From:
cotto
Date:
January 11, 2009 01:45
Subject:
[svn:parrot] r35402 - trunk/t/pmc
Message ID:
20090111094536.0FD2CCB9F9@x12.develooper.com
Author: cotto
Date: Sun Jan 11 01:45:34 2009
New Revision: 35402

Modified:
   trunk/t/pmc/slice.t
   trunk/t/pmc/stmlog.t
   trunk/t/pmc/stmref.t
   trunk/t/pmc/stmvar.t
   trunk/t/pmc/string.t
   trunk/t/pmc/stringhandle.t
   trunk/t/pmc/sub.t
   trunk/t/pmc/task.t
   trunk/t/pmc/threads.t
   trunk/t/pmc/timer.t
   trunk/t/pmc/tqueue.t
   trunk/t/pmc/undef.t
   trunk/t/pmc/unmanagedstruct.t
   trunk/t/pmc/vtablecache.t

Log:
[t] convert the last of the PMC tests to use keys


Modified: trunk/t/pmc/slice.t
==============================================================================
--- trunk/t/pmc/slice.t	(original)
+++ trunk/t/pmc/slice.t	Sun Jan 11 01:45:34 2009
@@ -25,7 +25,7 @@
 
 pir_output_is( <<'CODE', <<'OUT', 'new' );
 .sub 'test' :main
-    new $P0, 'Slice'
+    new $P0, ['Slice']
     print "ok 1\n"
 .end
 CODE
@@ -39,9 +39,9 @@
 
 .sub main :main
     .local pmc b, bj
-    b = new 'FixedPMCArray'
+    b = new ['FixedPMCArray']
     b = 4
-    bj = new 'FixedFloatArray'
+    bj = new ['FixedFloatArray']
     bj = 5
     b[3] = bj
     $N0 = b[3 .. vx]

Modified: trunk/t/pmc/stmlog.t
==============================================================================
--- trunk/t/pmc/stmlog.t	(original)
+++ trunk/t/pmc/stmlog.t	Sun Jan 11 01:45:34 2009
@@ -17,12 +17,12 @@
 =cut
 
 .sub main :main
-    .include 'include/test_more.pir'
+    .include 'test_more.pir'
 
     plan(1)
 
-    new $P0, 'STMLog'
-    ok(1, 'Instantiated .STMLog')
+    new $P0, ['STMLog']
+    ok(1, 'Instantiated an STMLog PMC')
 .end
 
 # Local Variables:

Modified: trunk/t/pmc/stmref.t
==============================================================================
--- trunk/t/pmc/stmref.t	(original)
+++ trunk/t/pmc/stmref.t	Sun Jan 11 01:45:34 2009
@@ -17,12 +17,12 @@
 =cut
 
 .sub main :main
-    .include 'include/test_more.pir'
+    .include 'test_more.pir'
 
     plan(1)
 
-    new $P0, 'STMRef'
-    ok(1, 'Instantiated .STMRef')
+    new $P0, ['STMRef']
+    ok(1, 'Instantiated an STMRef PMC')
 .end
 
 # Local Variables:

Modified: trunk/t/pmc/stmvar.t
==============================================================================
--- trunk/t/pmc/stmvar.t	(original)
+++ trunk/t/pmc/stmvar.t	Sun Jan 11 01:45:34 2009
@@ -17,12 +17,12 @@
 =cut
 
 .sub main :main
-    .include 'include/test_more.pir'
+    .include 'test_more.pir'
 
     plan(1)
 
-    new $P0, 'STMVar'
-    ok(1, 'Instantiated .STMVar')
+    new $P0, ['STMVar']
+    ok(1, 'Instantiated an STMVar PMC')
 .end
 
 # Local Variables:

Modified: trunk/t/pmc/string.t
==============================================================================
--- trunk/t/pmc/string.t	(original)
+++ trunk/t/pmc/string.t	Sun Jan 11 01:45:34 2009
@@ -18,7 +18,7 @@
 
 
 .sub main :main
-    .include 'include/test_more.pir'
+    .include 'test_more.pir'
 
     plan(164)
 
@@ -76,7 +76,7 @@
 .end
 
 .sub set_or_get_strings
-        new $P0, 'String'
+        new $P0, ['String']
 
         set $P0, "foo"
         set $S0, $P0
@@ -104,27 +104,27 @@
 .end
 
 .sub setting_integers
-        new $P0, 'String'
+        new $P0, ['String']
         set $P0, "1"
         set $I0, $P0
         is( $I0, 1, 'string "1" -> int' )
 
-        new $P0, 'String'
+        new $P0, ['String']
         set $P0, "2.0"
         set $I0, $P0
         is( $I0, 2, 'string "2.0" -> int' )
 
-        new $P0, 'String'
+        new $P0, ['String']
         set $P0, ""
         set $I0, $P0
         is( $I0, 0, 'string "" -> int' )
 
-        new $P0, 'String'
+        new $P0, ['String']
         set $P0, "\0"
         set $I0, $P0
         is( $I0, 0, 'string "\0" -> int' )
 
-        new $P0, 'String'
+        new $P0, ['String']
         set $P0, "foo"
         set $I0, $P0
         is( $I0, 0, 'string "foo" -> int' )
@@ -147,41 +147,41 @@
 
 .sub setting_numbers
         .include 'include/fp_equality.pasm'
-        new $P0, 'String'
+        new $P0, ['String']
         set $P0, "1"
         set $N0, $P0
         .fp_eq_ok($N0, 1.0, 'String 1 -> $N0 == 1.0')
 
-        new $P0, 'String'
+        new $P0, ['String']
         set $P0, "2.0"
         set $N0, $P0
         .fp_eq_ok($N0, 2.0, 'String "2.0" -> $N0 == 2.0')
 
-        new $P0, 'String'
+        new $P0, ['String']
         set $P0, ""
         set $N0, $P0
         .fp_eq_ok($N0, 0.0, 'String "" -> $N0 == 0.0')
 
-        new $P0, 'String'
+        new $P0, ['String']
         set $P0, "\0"
         set $N0, $P0
         .fp_eq_ok($N0, 0.0, 'String "\0" -> $N0 == 0.0')
 
-        new $P0, 'String'
+        new $P0, ['String']
         set $P0, "foo"
         set $N0, $P0
         .fp_eq_ok($N0, 0.0, 'String "foo" -> $N0 == 0.0')
 
-        new $P0, 'String'
+        new $P0, ['String']
         set $P0, "1.3e5"
         set $N0, $P0
         .fp_eq_ok($N0, 130000.0, 'String "1.3e5" -> $N0 == 130000.0')
 .end
 
 .sub ensure_that_concat_ppp_copies_strings
-    new $P0, 'String'
-    new $P1, 'String'
-    new $P2, 'String'
+    new $P0, ['String']
+    new $P1, ['String']
+    new $P2, ['String']
 
     set $P0, "foo"
     concat  $P1, $P0, $P0
@@ -199,8 +199,8 @@
 .end
 
 .sub ensure_that_concat_pps_copies_strings
-    new $P0, 'String'
-    new $P1, 'String'
+    new $P0, ['String']
+    new $P1, ['String']
 
     set $S0, "Grunties"
     set $P1, "fnargh"
@@ -212,7 +212,7 @@
 .end
 
 .sub setting_string_references
-    new $P0, 'String'
+    new $P0, ['String']
     set $S0, "C2H5OH + 10H20"
     set $P0, $S0
     chopn $S0, 8
@@ -222,7 +222,7 @@
 .end
 
 .sub assigning_string_copies
-    new $P0, 'String'
+    new $P0, ['String']
     set $S0, "C2H5OH + 10H20"
     assign $P0, $S0
     chopn $S0, 8
@@ -232,63 +232,63 @@
 .end
 
 .sub test_repeat
-    new $P0, 'String'
+    new $P0, ['String']
     set $P0, "x"
-    new $P1, 'Integer'
+    new $P1, ['Integer']
     set $P1, 12
-    new $P2, 'String'
+    new $P2, ['String']
     repeat $P2, $P0, $P1
     is( $P2, 'xxxxxxxxxxxx', 'Integer arg to repeat' )
 
     set $P0, "y"
-    new $P1, 'Float'
+    new $P1, ['Float']
     set $P1, 6.5
     repeat $P2, $P0, $P1
     is( $P2, 'yyyyyy', 'Float arg to repeat' ) 
 
     set $P0, "z"
-    new $P1, 'String'
+    new $P1, ['String']
     set $P1, "3"
     repeat $P2, $P0, $P1
     is( $P2, 'zzz', 'String "3" arg to repeat' )
 
     set $P0, "a"
-    new $P1, 'Undef'
+    new $P1, ['Undef']
     repeat $P2, $P0, $P1
     is( $P2, '', 'undef PMC arg to repeat' )
 .end
 
 .sub test_repeat_without_creating_dest_pmc
-    new $P0, 'String'
+    new $P0, ['String']
     set $P0, "x"
-    new $P1, 'Integer'
+    new $P1, ['Integer']
     set $P1, 12
     repeat $P2, $P0, $P1
     is( $P2, 'xxxxxxxxxxxx', 'Integer argument to repeat' )
 
     set $P0, "y"
-    new $P1, 'Float'
+    new $P1, ['Float']
     set $P1, 6.5
     repeat $P3, $P0, $P1
     is( $P3, 'yyyyyy', 'Float arg to repeat' ) 
 
     set $P0, "z"
-    new $P1, 'String'
+    new $P1, ['String']
     set $P1, "3"
     repeat $P4, $P0, $P1
     is( $P4, 'zzz', 'String "3" arg to repeat' )
 
     set $P0, "a"
-    new $P1, 'Undef'
+    new $P1, ['Undef']
     repeat $P5, $P0, $P1
     is( $P5, '', 'Undef PMC arg to repeat' )
 .end
 
 .sub test_repeat_int
-    new $P0, 'String'
+    new $P0, ['String']
     set $P0, "x"
     set $I1, 12
-    new $P2, 'String'
+    new $P2, ['String']
     repeat $P2, $P0, $I1
     is( $P2, 'xxxxxxxxxxxx', 'repeat with int arg' )
 
@@ -299,7 +299,7 @@
 .end
 
 .sub test_repeat_int_without_declaring_dest
-    new $P0, 'String'
+    new $P0, ['String']
     set $P0, "x"
     set $I1, 12
     repeat $P2, $P0, $I1
@@ -312,7 +312,7 @@
 
 
 .sub test_if_string
-    new $P0, 'String'
+    new $P0, ['String']
     set $S0, "True"
     set $P0, $S0
 
@@ -321,7 +321,7 @@
         set $I0, 0
 TRUE:   ok( $I0, 'String "String" is true' )
 
-        new $P1, 'String'
+        new $P1, ['String']
         set $S1, ""
         set $P1, $S1
         set $I0, 1
@@ -329,7 +329,7 @@
         set $I0, 0
 TRUE2:  nok( $I0, 'String "" is false' )
 
-        new $P2, 'String'
+        new $P2, ['String']
         set $S2, "0"
         set $P2, $S2
         set $I0, 1
@@ -337,7 +337,7 @@
         set $I0, 0
 TRUE3:  nok( $I0, 'String "0" is false' )
 
-        new $P3, 'String'
+        new $P3, ['String']
         set $S3, "0123"
         set $P3, $S3
         set $I0, 1
@@ -345,7 +345,7 @@
         set $I0, 0
 TRUE4:  ok( $I0, 'String "0123" is true' )
 
-        new $P4, 'String'
+        new $P4, ['String']
         set $I0, 1
         if $P4, TRUE5
         set $I0, 0
@@ -353,22 +353,22 @@
 .end
 
 .sub test_concat
-    new $P0, 'String'
-    new $P1, 'Undef'
+    new $P0, ['String']
+    new $P1, ['Undef']
     set $P0, "foo"
     concat  $P1, $P0, $P0
     is( $P0, "foo", 'original String is untouched' )
     is( $P1, "foofoo", '...and concat worked' )
 
-    new $P0, 'String'
-    new $P1, 'Undef'
+    new $P0, ['String']
+    new $P1, ['Undef']
     set $P0, "bar"
     concat  $P0, $P0, $P1
     is( $P0, "bar", '"bar" + Undef = "bar"' )
     is( $P1, "", '... Undef is ""' )
 
-    new $P0, 'String'
-    new $P1, 'Undef'
+    new $P0, ['String']
+    new $P1, ['Undef']
     set $P1, "str"
     concat  $P1, $P0, $P1
     is( $P0, "", 'original Undef is ""' )
@@ -376,13 +376,13 @@
 .end
 
 .sub test_concat_without_defining_dest
-    new $P0, 'String'
+    new $P0, ['String']
     set $P0, "foo"
     concat    $P1, $P0, $P0
     is( $P0, "foo", 'original String is unchanged' )
     is( $P1, "foofoo", '... concat String x2' )
 
-    new $P0, 'String'
+    new $P0, ['String']
     set $P0, "foo"
     concat $P2, $P0, "bar"
     is( $P0, "foo", 'original String is unchanged' )
@@ -390,8 +390,8 @@
 .end
 
 .sub test_cmp
-    new $P1, 'String'
-    new $P2, 'String'
+    new $P1, ['String']
+    new $P2, ['String']
 
     set $P1, "abc"
     set $P2, "abc"
@@ -410,8 +410,8 @@
 .end
 
 .sub cmp_with_integer
-    new $P1, 'Integer'
-    new $P2, 'String'
+    new $P1, ['Integer']
+    new $P2, ['String']
     set $P2, "10"
 
     # Int. vs Str.
@@ -442,7 +442,7 @@
 .end
 
 .sub test_substr
-    new $P0, 'String'
+    new $P0, ['String']
 
     set $P0, "This is a test\n"
     substr $S0, $P0, 0, 5
@@ -457,9 +457,9 @@
 .end
 
 .sub bands_null_string
-    new $P1, 'String'
-    new $P2, 'String'
-    new $P3, 'String'
+    new $P1, ['String']
+    new $P2, ['String']
+    new $P3, ['String']
 
     null $S1
     set $P1, $S1
@@ -496,8 +496,8 @@
 .end
 
 .sub test_bands_2
-    new $P1, 'String'
-    new $P2, 'String'
+    new $P1, ['String']
+    new $P2, ['String']
     set $P1, "abc"
     set $P2, "EE"
     bands $P1, $P2
@@ -506,9 +506,9 @@
 .end
 
 .sub test_bands_3
-    new $P1, 'String'
-    new $P2, 'String'
-    new $P0, 'String'
+    new $P1, ['String']
+    new $P2, ['String']
+    new $P0, ['String']
     set $P1, "abc"
     set $P2, "EE"
     bands $P0, $P1, $P2
@@ -518,9 +518,9 @@
 .end
 
 .sub bors_null_string
-    new $P1, 'String'
-    new $P2, 'String'
-    new $P3, 'String'
+    new $P1, ['String']
+    new $P2, ['String']
+    new $P3, ['String']
 
     null $S1
     null $S2
@@ -577,8 +577,8 @@
 .end
 
 .sub test_bors_2
-    new $P1, 'String'
-    new $P2, 'String'
+    new $P1, ['String']
+    new $P2, ['String']
     set $P1, "abc"
     set $P2, "EE"
 
@@ -588,9 +588,9 @@
 .end
 
 .sub test_bors_3
-    new $P1, 'String'
-    new $P2, 'String'
-    new $P0, 'String'
+    new $P1, ['String']
+    new $P2, ['String']
+    new $P0, ['String']
     set $P1, "abc"
     set $P2, "EE"
 
@@ -601,9 +601,9 @@
 .end
 
 .sub bxors_null_string
-    new $P1, 'String'
-    new $P2, 'String'
-    new $P3, 'String'
+    new $P1, ['String']
+    new $P2, ['String']
+    new $P3, ['String']
     null $S1
     null $S2
     set $P1, $S1
@@ -657,9 +657,9 @@
 .end
 
 .sub bxors_2
-    new $P1, 'String'
-    new $P2, 'String'
-    new $P3, 'String'
+    new $P1, ['String']
+    new $P2, ['String']
+    new $P3, ['String']
 
     set $P1, "a2c"
     set $P2, "Dw"
@@ -675,9 +675,9 @@
 .end
 
 .sub bxors_3
-    new $P1, 'String'
-    new $P2, 'String'
-    new $P0, 'String'
+    new $P1, ['String']
+    new $P2, ['String']
+    new $P0, ['String']
 
     set $P1, "a2c"
     set $P2, "Dw"
@@ -695,9 +695,9 @@
 .end
 
 .sub bnots_null_string
-    new $P1, 'String'
-    new $P2, 'String'
-    new $P3, 'String'
+    new $P1, ['String']
+    new $P2, ['String']
+    new $P3, ['String']
 
     null $S1
     null $S2
@@ -719,8 +719,8 @@
 .end
 
 .sub test_eq_str
-        new $P1, 'String'
-        new $P2, 'String'
+        new $P1, ['String']
+        new $P2, ['String']
         set $P1, "ABC"
         set $P2, "ABC"
 
@@ -735,7 +735,7 @@
         set $I0, 0
 OK2:    nok( $I0, 'eq_str "abc"(String), 1(Int) -> false' )
 
-        new $P3, 'Integer'
+        new $P3, ['Integer']
         set $P3, 0
         set $I0, 1
         eq_str $P2, $P3, OK3
@@ -749,8 +749,8 @@
 .end
 
 .sub test_ne_str
-        new $P1, 'String'
-        new $P2, 'String'
+        new $P1, ['String']
+        new $P2, ['String']
         set $P1, "ABC"
         set $P2, "abc"
         set $I0, 1
@@ -764,7 +764,7 @@
         set $I0, 0
 OK2:    nok( $I0, 'ne_str "ABC", "ABC" -> false' )
 
-        new $P3, 'Integer'
+        new $P3, ['Integer']
         set $P3, 0
         set $I0, 1
         ne_str $P2, $P3, OK3
@@ -778,7 +778,7 @@
 .end
 
 .sub set_const_and_chop
-   new $P0, 'String'
+   new $P0, ['String']
    set $P0, "str"
    set $S0, $P0
    chopn $S0, 2
@@ -788,7 +788,7 @@
 
 .sub check_whether_interface_is_done
     .local pmc pmc1
-    pmc1 = new 'String'
+    pmc1 = new ['String']
     .local int bool1
 
     does bool1, pmc1, "scalar"
@@ -802,7 +802,7 @@
 .end
 
 .sub test_clone
-    new $P0, 'String'
+    new $P0, ['String']
     set $P0, "Tacitus\n"
     clone $P1, $P0
     set $P0, ""
@@ -810,21 +810,21 @@
 .end
 
 .sub test_set_px_i
-  new $P0, 'String'
+  new $P0, ['String']
   set $P0, "abcdef\n"
   set $P0[2], 65
   is( $P0, "abAdef\n", 'set p[x] = int' )
 .end
 
 .sub test_set_px_s
-  new $P0, 'String'
+  new $P0, ['String']
   set $P0, "abcdef\n"
   set $P0[2], "AB"
   is( $P0, "abABef\n", 'set p[x] = string' )
 .end
 
 .sub test_string_replace
-    $P0 = new 'String'
+    $P0 = new ['String']
     $P0 = "hello world"
 
     is( $P0, "hello world", 'original' )
@@ -837,7 +837,7 @@
 .end
 
 .sub set_i0__p0__string_to_int
-    new $P0, 'String'
+    new $P0, ['String']
     set $P0, "12.3E5\n"
     set $I0, $P0
     is( $I0, 12, '"12.3E4\n" -> $I0 = 12' )
@@ -854,7 +854,7 @@
     el = elements tr_00
     is( el, 256, 'elements' )
 
-    $P0 = new 'String'
+    $P0 = new ['String']
     $P0.'trans'(s, tr_00)
 
     is( s, 'TAACGSTAACGS', 'trans' )
@@ -863,7 +863,7 @@
 # create tr table at compile-time
 .sub tr_00_init :immediate
     .local pmc tr_array
-    tr_array = new 'FixedIntegerArray'   # Todo char array
+    tr_array = new ['FixedIntegerArray']   # Todo char array
     tr_array = 256                      # Python compat ;)
     .local string from, to
     from = 'wsatugcyrkmbdhvnATUGCYRKMBDHVN'
@@ -882,13 +882,13 @@
 
 .sub reverse_p0__reverse_string
     $S0 = 'torrap'
-    $P0 = new 'String'
+    $P0 = new ['String']
     $P0.'reverse'($S0)
     is( $S0, "parrot", 'reverse string' )
 .end
 
 .sub is_integer__check_integer
-  $P0 = new 'String'
+  $P0 = new ['String']
 
   $I0 = $P0.'is_integer'('543')
   ok( $I0, 'String."is_integer("543")' )
@@ -915,7 +915,7 @@
 .end
 
 .sub get_string_returns_cow_string
-  $P0 = new 'String'
+  $P0 = new ['String']
   $P0 = "Foo44"
 
   $S0 = $P0
@@ -926,7 +926,7 @@
 
 .sub to_int_1
     .local pmc s
-    s = new 'String'
+    s = new ['String']
     s = "123"
     $I0 = s.'to_int'(10)
     is( $I0, "123", 'String.to_int(10)' )
@@ -940,14 +940,14 @@
 
 .sub elements_gives_length_of_string
     .local pmc s
-    s = new 'String'
+    s = new ['String']
     s = "123456789"
     $I0 = elements s
     is( $I0, "9", 'elements gives length of string' )
 .end
 
 .sub test_string_reverse_index
-  $P0 = new 'String'
+  $P0 = new ['String']
   $I0 = $P0.'reverse_index'('hello', 0)
   is( $I0, -1, "main empty -1" )
 
@@ -978,7 +978,7 @@
 .endm
 
 .sub out_of_bounds_substr_positive_offset
-    new $P0, 'String'
+    new $P0, ['String']
     set $P0, "Woburn"
 
     set $I0, 0
@@ -989,7 +989,7 @@
 .end
 
 .sub out_of_bounds_substr_negative_offset
-    new $P0, 'String'
+    new $P0, ['String']
     set $P0, "Woburn"
     push_eh handler
         substr $S0, $P0, -123, 22
@@ -999,7 +999,7 @@
 
 .sub excpetion_to_int_2
     .local pmc s
-    s = new 'String'
+    s = new ['String']
     s = "123"
     push_eh handler
         $I0 = s.'to_int'(3)
@@ -1009,7 +1009,7 @@
 
 .sub exception_to_int_3
     .local pmc s
-    s = new 'String'
+    s = new ['String']
     s = "123"
     push_eh handler
         $I0 = s.'to_int'(37)

Modified: trunk/t/pmc/stringhandle.t
==============================================================================
--- trunk/t/pmc/stringhandle.t	(original)
+++ trunk/t/pmc/stringhandle.t	Sun Jan 11 01:45:34 2009
@@ -26,24 +26,24 @@
 # L<PDD22/I\/O PMC API/=item new>
 pir_output_is( <<'CODE', <<'OUT', 'new' );
 .sub 'test' :main
-    new $P0, 'StringHandle'
-    say "ok 1 - $P0 = new 'StringHandle'"
+    new $P0, ['StringHandle']
+    say "ok 1 - $P0 = new ['StringHandle']"
 .end
 CODE
-ok 1 - $P0 = new 'StringHandle'
+ok 1 - $P0 = new ['StringHandle']
 OUT
 
 # L<PDD22/I\/O PMC API/=item open.*=item close>
 pir_output_is( <<"CODE", <<'OUT', 'open and close - synchronous' );
 .sub 'test' :main
-    \$P1 = new 'StringHandle'
+    \$P1 = new ['StringHandle']
     \$P1.'open'('README')
     say 'ok 1 - \$P1.open(\$S1)'
 
     \$P1.'close'()
     say 'ok 2 - \$P1.close()'
 
-    \$P3 = new 'StringHandle'
+    \$P3 = new ['StringHandle']
     \$P3.'open'('temp_file', 'rw')
     say 'ok 3 - \$P3.open(\$S1, \$S2) # rw mode'
     \$P3.'close'()
@@ -53,7 +53,7 @@
     \$P3.'close'()
 
   test_7:
-    \$P7 = new 'StringHandle'
+    \$P7 = new ['StringHandle']
     \$P7.'open'('temp_file', 'w')
     say 'ok 7 - \$P7.open(\$S1, \$S2) # new file, write mode succeeds'
 
@@ -77,7 +77,7 @@
     pir_output_is( <<'CODE', <<'OUT', 'open and close - asynchronous' );
 .sub 'test' :main
     $P1 = # RT #46831 create a callback here
-    $P0 = new 'StringHandle'
+    $P0 = new ['StringHandle']
 
     $P0.'open'('README')
     say 'ok 1 - $P0.open($S1)'
@@ -107,7 +107,7 @@
 pir_output_is(
     <<'CODE', <<'OUT', 'read - synchronous' );
 .sub 'test' :main
-    $P0 = new 'StringHandle'
+    $P0 = new ['StringHandle']
     $P0.'open'('README', 'w')
 
     $P0.'print'("This is Parrot, version")
@@ -136,7 +136,7 @@
 pir_output_is(
     <<'CODE', <<'OUT', 'read opcode' );
 .sub 'test' :main
-    $P0 = new 'StringHandle'
+    $P0 = new ['StringHandle']
     $P0.'open'('README', 'w')
 
     print $P0, "This is Parrot, version"
@@ -165,7 +165,7 @@
 pir_output_is( <<"CODE", <<'OUT', 'print - synchronous' );
 .sub 'test' :main
 
-    \$P0 = new 'StringHandle'
+    \$P0 = new ['StringHandle']
     \$P0.'open'('temp_file', 'w')
 
     \$P0.'print'(123)
@@ -174,7 +174,7 @@
     say 'ok 2 - \$P0.print(\$N1)'
     \$P0.'print'("squawk\\n")
     say 'ok 3 - \$P0.print(\$S1)'
-    \$P1 = new 'Integer'
+    \$P1 = new ['Integer']
     \$P1 = 42
     \$P0.'print'(\$P1)
     say 'ok 4 - \$P0.print(\$P1)'
@@ -215,7 +215,7 @@
     .local pmc chomp
                chomp = get_global ['String';'Utils'], 'chomp'
 
-    \$P0 = new 'StringHandle'
+    \$P0 = new ['StringHandle']
     \$P0.'open'('temp_file', 'w')
     \$P0.'print'("foobarbaz\\n42")
     \$P0.'close'()
@@ -251,7 +251,7 @@
     .local string test_line
     .local pmc stringhandle
     .local int counter
-    stringhandle = new 'StringHandle'
+    stringhandle = new ['StringHandle']
 
     stringhandle.'open'('temp_file', 'w')
 
@@ -311,7 +311,7 @@
 # L<PDD22/I\/O PMC API/=item record_separator>
 pir_output_is( <<'CODE', <<'OUT', 'record_separator', todo => 'not yet implemented' );
 .sub 'test' :main
-    $P0 = new 'StringHandle'
+    $P0 = new ['StringHandle']
 
     $S0 = $P0.'record_separator'()
     if $S0 == "\n" goto ok_1
@@ -347,7 +347,7 @@
 # L<PDD22/I\/O PMC API/=item buffer_type>
 pir_output_is( <<'CODE', <<'OUT', 'buffer_type' );
 .sub 'test' :main
-    $P0 = new 'StringHandle'
+    $P0 = new ['StringHandle']
 
     $P0.'buffer_type'('unbuffered')
     $S0 = $P0.'buffer_type'()
@@ -388,7 +388,7 @@
 
 pir_output_is( <<"CODE", <<'OUT', 'buffer_size' );
 .sub 'test' :main
-    \$P0 = new 'StringHandle'
+    \$P0 = new ['StringHandle']
 
     \$P0.'buffer_type'('full-buffered')
     \$P0.'buffer_size'(42)
@@ -429,7 +429,7 @@
 # L<PDD22/I\/O PMC API/=item encoding>
 pir_output_is( <<'CODE', <<'OUT', 'encoding' );
 .sub 'test' :main
-    $P0 = new 'StringHandle'
+    $P0 = new ['StringHandle']
 
     $P0.'encoding'('utf8')
     $S0 = $P0.'encoding'()
@@ -445,7 +445,7 @@
 
 pir_output_is( <<"CODE", <<'OUT', 'encoding - read/write' );
 .sub 'test' :main
-    \$P0 = new 'StringHandle'
+    \$P0 = new ['StringHandle']
     \$P0.'encoding'('utf8')
 
     \$P0.'open'('temp_file', 'w')
@@ -484,7 +484,7 @@
 # L<PDD22/I\/O PMC API/=item mode>
 pir_output_is( <<'CODE', <<'OUT', 'mode' );
 .sub 'test' :main
-    $P0 = new 'StringHandle'
+    $P0 = new ['StringHandle']
 
     $P0.'open'('README')
     $S0 = $P0.'mode'()
@@ -509,7 +509,7 @@
 line 3
 EOS
     .local pmc pio, pio2
-    pio = new 'StringHandle'
+    pio = new ['StringHandle']
     pio.'open'("temp_file", "w")
     pio.'print'(\$S0)
     pio.'close'()
@@ -532,7 +532,7 @@
 line 3
 EOS
     .local pmc pio, pio2
-    pio = new 'StringHandle'
+    pio = new ['StringHandle']
     pio.'open'("temp_file", "w")
     pio.'print'(\$S0)
     pio.'close'()
@@ -551,7 +551,7 @@
 pir_output_is( <<"CODE", <<"OUTPUT", "readall() - utf8 on closed stringhandle" );
 .sub 'main'
     .local pmc ifh
-    ifh = new 'StringHandle'
+    ifh = new ['StringHandle']
     ifh.'encoding'('utf8')
    
     \$S0 = ifh.'readall'('temp_file')
@@ -568,7 +568,7 @@
 pir_output_is( <<"CODE", <<"OUTPUT", "readall() - utf8 on opened stringhandle" );
 .sub 'main'
     .local pmc ifh
-    ifh = new 'StringHandle'
+    ifh = new ['StringHandle']
     ifh.'encoding'('utf8')
     ifh.'open'('temp_file')
 

Modified: trunk/t/pmc/sub.t
==============================================================================
--- trunk/t/pmc/sub.t	(original)
+++ trunk/t/pmc/sub.t	Sun Jan 11 01:45:34 2009
@@ -61,10 +61,10 @@
 OUTPUT
 
 pasm_output_is( <<'CODE', <<'OUTPUT', "Continuation" );
-    new P5, 'Integer'
+    new P5, ['Integer']
     set P5, 3
     set_global "foo", P5
-    new P1, 'Continuation'
+    new P1, ['Continuation']
     set_addr P1, endcont
 endcont:
     get_global P4, "foo"
@@ -93,7 +93,7 @@
 OUTPUT
 
 pasm_output_is( <<'CODE', <<'OUTPUT', "definedness of Continuation" );
-    new P1, 'Continuation'
+    new P1, ['Continuation']
     defined I1, P1
     print I1
     print "\n"
@@ -351,7 +351,7 @@
       end
 
 .pcc_sub :outer(main) f2:
-      new P1, 'Undef'
+      new P1, ['Undef']
       end
 CODE
 ok 1
@@ -378,7 +378,7 @@
       end
 
 .pcc_sub f2:
-      new P1, 'Undef'
+      new P1, ['Undef']
       end
 CODE
 ok 1
@@ -741,7 +741,7 @@
     _f1()
 .end
 .sub _f1
-    $P0 = new 'Undef'
+    $P0 = new ['Undef']
     print $P0
 .end
 CODE
@@ -750,7 +750,7 @@
 .sub _main :main
 .include "warnings.pasm"
     _f1()
-    $P0 = new 'Undef'
+    $P0 = new ['Undef']
     print $P0
     print "ok\n"
 .end
@@ -768,7 +768,7 @@
 .sub _main :main
 .include "warnings.pasm"
     _f1()
-    $P0 = new 'Undef'
+    $P0 = new ['Undef']
     say "back"
     print $P0
     print "ok\n"
@@ -776,7 +776,7 @@
 .sub _f1
     warningson .PARROT_WARNINGS_UNDEF_FLAG
     _f2()
-    $P0 = new 'Undef'
+    $P0 = new ['Undef']
     print $P0
 .end
 .sub _f2
@@ -1013,7 +1013,7 @@
 .sub make_pi :immediate :anon
     $N0 = atan 1.0, 1.0
     $N0 *= 4
-    $P0 = new 'Float'
+    $P0 = new ['Float']
     $P0 = $N0
     .return ($P0)
 .end
@@ -1032,8 +1032,8 @@
     .local pmc cl, o
     cl = newclass "Foo"
     addattribute cl, 'x'
-    o = new 'Foo'
-    $P0 = new 'String'
+    o = new ['Foo']
+    $P0 = new ['String']
     $P0 = "ok 1\n"
     setattribute o, 'x', $P0
     .return (o)
@@ -1106,7 +1106,7 @@
     _f1()
 .end
 .sub _f1
-    \$P0 = new 'Undef'
+    \$P0 = new ['Undef']
     print \$P0
 .end
 CODE
@@ -1117,7 +1117,7 @@
 .sub 'test' :main
 .include "warnings.pasm"
     _f1()
-    \$P0 = new 'Undef'
+    \$P0 = new ['Undef']
     print \$P0
     say "ok"
 .end
@@ -1133,7 +1133,7 @@
 .sub 'test' :main
 .include "warnings.pasm"
     _f1()
-    \$P0 = new 'Undef'
+    \$P0 = new ['Undef']
     say "back"
     print \$P0
     say "ok"
@@ -1141,7 +1141,7 @@
 .sub _f1
     warningson .PARROT_WARNINGS_UNDEF_FLAG
     _f2()
-    \$P0 = new 'Undef'
+    \$P0 = new ['Undef']
     print \$P0
 .end
 .sub _f2
@@ -1303,7 +1303,7 @@
 .sub main :main
     $P0 = get_global 'ok'
 
-    $P1 = new 'Undef'
+    $P1 = new ['Undef']
     assign $P1, $P0
 
     $P1()
@@ -1320,7 +1320,7 @@
 .sub main :main
     $P0 = get_global 'ok'
 
-    $P1 = new 'Undef'
+    $P1 = new ['Undef']
     assign $P1, $P0
 
     $P1()
@@ -1447,7 +1447,7 @@
 
 .sub example_outer
     .lex "Foo", $P0
-    $P0 = new 'String'
+    $P0 = new ['String']
     $P0 = 'I can has outer?'
 .end
 
@@ -1511,13 +1511,13 @@
 .end
 
 .sub 'foo'
-    new $P0, "String"
+    new $P0, ['String']
     assign $P0, "abc"
     say $P0
 .end
 
 .sub 'bar'  :subid("abc")
-    new $P0, "String"
+    new $P0, ['String']
     assign $P0, "abc"
     say $P0
 .end

Modified: trunk/t/pmc/task.t
==============================================================================
--- trunk/t/pmc/task.t	(original)
+++ trunk/t/pmc/task.t	Sun Jan 11 01:45:34 2009
@@ -24,12 +24,12 @@
 
 pir_output_is( <<'CODE', <<'OUT', "create a task and set attributes" );
   .sub main :main
-    $P0 = new "Task"
+    $P0 = new ['Task']
     $P1 = getattribute $P0, 'status'
     print $P1
     print "\n"
 
-    $P2 = new "String"
+    $P2 = new ['String']
     $P2 = "inprocess"
     setattribute $P0, 'status', $P2
 
@@ -37,7 +37,7 @@
     print $P3
     print "\n"
 
-    $P2 = new "String"
+    $P2 = new ['String']
     $P2 = "event"
     setattribute $P0, 'type', $P2
 
@@ -45,7 +45,7 @@
     print $P3
     print "\n"
 
-    $P2 = new "Integer"
+    $P2 = new ['Integer']
     $P2 = 10
     setattribute $P0, 'priority', $P2
 
@@ -53,7 +53,7 @@
     print $P3
     print "\n"
 
-    $P2 = new "Integer"
+    $P2 = new ['Integer']
     $P2 = 7405
     setattribute $P0, 'id', $P2
 
@@ -61,7 +61,7 @@
     print $P3
     print "\n"
 
-    $P2 = new "Float"
+    $P2 = new ['Float']
     $P2 = 1.1
     setattribute $P0, 'birthtime', $P2
 
@@ -82,29 +82,29 @@
 pir_output_is( <<'CODE', <<'OUT', 'create a task and set attributes in init' );
   .sub main :main
     .local pmc data
-    data = new 'Hash'
+    data = new ['Hash']
 
-    $P2 = new 'String'
+    $P2 = new ['String']
     $P2 = 'inprocess'
     data['status'] = $P2
 
-    $P2 = new 'String'
+    $P2 = new ['String']
     $P2 = 'event'
     data['type'] = $P2
 
-    $P2 = new 'Integer'
+    $P2 = new ['Integer']
     $P2 = 10
     data['priority'] = $P2
 
-    $P2 = new 'Integer'
+    $P2 = new ['Integer']
     $P2 = 7405
     data['id'] = $P2
 
-    $P2 = new 'Float'
+    $P2 = new ['Float']
     $P2 = 1.1
     data['birthtime'] = $P2
 
-    $P0 = new 'Task', data
+    $P0 = new ['Task'], data
 
     $P3 = getattribute $P0, 'status'
     say $P3
@@ -132,25 +132,25 @@
 
 pir_output_is( <<'CODE', <<'OUT', "freeze and thaw a task" );
   .sub main :main
-    $P0 = new "Task"
+    $P0 = new ['Task']
 
-    $P2 = new "String"
+    $P2 = new ['String']
     $P2 = "inprocess"
     setattribute $P0, 'status', $P2
 
-    $P2 = new "String"
+    $P2 = new ['String']
     $P2 = "event"
     setattribute $P0, 'type', $P2
 
-    $P2 = new "Integer"
+    $P2 = new ['Integer']
     $P2 = 10
     setattribute $P0, 'priority', $P2
 
-    $P2 = new "Integer"
+    $P2 = new ['Integer']
     $P2 = 7405
     setattribute $P0, 'id', $P2
 
-    $P2 = new "Float"
+    $P2 = new ['Float']
     $P2 = 1.1
     setattribute $P0, 'birthtime', $P2
 

Modified: trunk/t/pmc/threads.t
==============================================================================
--- trunk/t/pmc/threads.t	(original)
+++ trunk/t/pmc/threads.t	Sun Jan 11 01:45:34 2009
@@ -61,7 +61,7 @@
     print "not"
 ok1:
     print "ok 1\n"
-    new P4, 'ParrotThread'
+    new P4, ['ParrotThread']
     ne P4, P2, ok2
     print "not"
 ok2:
@@ -83,7 +83,7 @@
     .local pmc thread
     $I5 = 10
     threadfunc = get_global "foo"
-    thread = new 'ParrotThread'
+    thread = new ['ParrotThread']
     thread.'run_clone'(threadfunc)
 
     sleep 1
@@ -126,7 +126,7 @@
     .local pmc thread
     $I5 = 10
     threadfunc = get_global "foo"
-    thread = new 'ParrotThread'
+    thread = new ['ParrotThread']
     thread.'run_clone'(threadfunc)
 
     sleep 1
@@ -167,12 +167,12 @@
     .local pmc thread
     .local pmc threadsub
     $S5 = " interp\n"
-    $P6 = new 'String'
+    $P6 = new ['String']
     $P6 = 'from '
 
     print "ok 1\n"
     threadsub = get_global "foo"
-    thread = new 'ParrotThread'
+    thread = new ['ParrotThread']
     thread.'run_clone'(threadsub, $P6)
     sleep 1 # to let the thread run
     print $P6
@@ -215,7 +215,7 @@
     .local pmc thread
     bounds 1    # assert slow core -S and -g are fine too
     threadsub = get_global "foo"
-    thread = new 'ParrotThread'
+    thread = new ['ParrotThread']
     $I0 = thread
     print 'start '
     print $I0
@@ -250,12 +250,12 @@
     .local pmc kid
     .local pmc Adder
     Adder = get_global '_add'
-    kid = new 'ParrotThread'
+    kid = new ['ParrotThread']
     .local pmc from
-    from = new 'Integer'
+    from = new ['Integer']
     from = 0
     .local pmc to
-    to = new 'Integer'
+    to = new ['Integer']
     to = MAX
     kid.'run_clone'(Adder, Adder, from, to)
 
@@ -265,7 +265,7 @@
     print "\n"
     # sum = n * (n + 1)/2
     .local pmc Mul
-    Mul = new 'Integer'
+    Mul = new ['Integer']
     assign Mul, to
     inc Mul
     Mul = to * Mul
@@ -280,7 +280,7 @@
    .param pmc from
    .param pmc to
    .local pmc sum
-   sum = new 'Integer'
+   sum = new ['Integer']
 loop:
     add sum, from
     inc from
@@ -303,8 +303,8 @@
     .local pmc queue
     .local pmc thread
     foo = get_global '_foo'
-    queue = new 'TQueue' # flag for when the thread is done
-    thread = new 'ParrotThread'
+    queue = new ['TQueue'] # flag for when the thread is done
+    thread = new ['ParrotThread']
     thread.'run_clone'(foo, queue)
 
     thread.'detach'()
@@ -318,7 +318,7 @@
     .param pmc queue
     print "thread\n"
     sleep 0.1
-    $P1 = new 'Integer'
+    $P1 = new ['Integer']
     push queue, $P1
 .end
 CODE
@@ -331,12 +331,12 @@
     .local pmc foo
     foo = get_global "_foo"
     .local pmc to_share
-    to_share = new 'Integer'
+    to_share = new ['Integer']
     .local pmc shared_ref
-    shared_ref = new 'SharedRef', to_share
+    shared_ref = new ['SharedRef'], to_share
     shared_ref = 20
     .local pmc thread
-    thread = new 'ParrotThread'
+    thread = new ['ParrotThread']
     thread.'run_clone'(foo, shared_ref)
 
     sleep 0.1 # to let the thread run
@@ -365,20 +365,20 @@
 pir_output_is( <<'CODE', <<'OUT', "multi-threaded" );
 .sub main :main
     .local pmc queue
-    queue = new 'TQueue'
+    queue = new ['TQueue']
     .local pmc tmpInt
-    tmpInt = new 'Integer'
+    tmpInt = new ['Integer']
     tmpInt = 1
     push queue, tmpInt
-    tmpInt = new 'Integer'
+    tmpInt = new ['Integer']
     tmpInt = 2
     push queue, tmpInt
-    tmpInt = new 'Integer'
+    tmpInt = new ['Integer']
     tmpInt = 3
     push queue, tmpInt
 
     .local pmc thread
-    thread = new 'ParrotThread'
+    thread = new ['ParrotThread']
     .local pmc foo
     foo = get_global '_foo'
     thread.'run_clone'(foo, queue)
@@ -422,7 +422,7 @@
 
 .sub main :main
     check()
-    $P0 = new 'ParrotThread'
+    $P0 = new ['ParrotThread']
     .local pmc thread_main
     thread_main = get_global 'thread_main'
     $P0.'run_clone'(thread_main)
@@ -481,12 +481,12 @@
 
     test2 = get_hll_global ['Test2'], 'test2'
 
-    test4 = new 'Integer'
+    test4 = new ['Integer']
     test4 = 42
     set_global 'test4', test4
 
     .local pmc thread
-    thread = new 'ParrotThread'
+    thread = new ['ParrotThread']
     .local pmc thread_func
     thread_func = get_global 'thread_func'
     $I0 = .PARROT_CLONE_CODE
@@ -544,10 +544,10 @@
 .namespace [ 'main' ]
 
 .sub test_setup
-    $P0 = new 'Integer'
+    $P0 = new ['Integer']
     $P0 = 1
     set_hll_global [ 'Bar' ], 'alpha', $P0
-    $P0 = new 'Integer'
+    $P0 = new ['Integer']
     $P0 = 2
     set_hll_global [ 'Foo' ], 'beta', $P0
 .end
@@ -557,7 +557,7 @@
     'test_setup'()
 
     .local pmc thread
-    thread = new 'ParrotThread'
+    thread = new ['ParrotThread']
     .local pmc _thread_func
     _thread_func = get_hll_global [ 'Foo' ], 'thread_test_func'
     $I0 = .PARROT_CLONE_CODE
@@ -619,7 +619,7 @@
 .end
 
 .sub thread_test_func
-    $P0 = new 'Bar'
+    $P0 = new ['Bar']
     print $P0
     print "\n"
     $P0.'barmeth'()
@@ -643,7 +643,7 @@
     init()
 
     .local pmc thread
-    thread = new 'ParrotThread'
+    thread = new ['ParrotThread']
     .local pmc _thread_func
     _thread_func = get_global ['main'], 'thread_test_func'
     $I0 = .PARROT_CLONE_CODE
@@ -705,7 +705,7 @@
 .end
 
 .sub thread_test_func
-    $P0 = new 'Bar'
+    $P0 = new ['Bar']
     print $P0
     print "\n"
     $P0.'barmeth'()
@@ -729,7 +729,7 @@
     init()
 
     .local pmc thread
-    thread = new 'ParrotThread'
+    thread = new ['ParrotThread']
     .local pmc _thread_func
     _thread_func = get_global 'thread_test_func'
     $I0 = .PARROT_CLONE_CODE
@@ -760,7 +760,7 @@
 pir_output_is( <<'CODE', <<'OUTPUT', "CLONE_CODE | CLONE_GLOBALS| CLONE_HLL" );
 .HLL 'Test'
 .sub setup
-    $P0 = new 'Integer'
+    $P0 = new ['Integer']
     $P0 = 42
     set_global 'x', $P0
 .end
@@ -797,7 +797,7 @@
 
     .local pmc thread
     .local int flags
-    thread = new 'ParrotThread'
+    thread = new ['ParrotThread']
     flags = .PARROT_CLONE_CODE
     bor flags, flags, .PARROT_CLONE_GLOBALS
     bor flags, flags, .PARROT_CLONE_HLL
@@ -860,7 +860,7 @@
 .end
 
 .sub setup
-    $P0 = new 'Integer'
+    $P0 = new ['Integer']
     $P0 = 1
     set_global 'foo', $P0
 .end
@@ -872,7 +872,7 @@
 .end
 
 .sub mutate
-    $P0 = new 'Integer'
+    $P0 = new ['Integer']
     $P0 = 2
     set_global 'foo', $P0
 .end
@@ -941,14 +941,14 @@
 
 
 .sub main :main
-    $P0 = new 'Integer'
+    $P0 = new ['Integer']
     $P0 = 1
     set_global 'test_num', $P0
 
     .const 'Sub' _check = 'full_check'
     _check()
 
-    $P0 = new 'ParrotThread'
+    $P0 = new ['ParrotThread']
     $P0.'run_clone'(_check)
     $P0.'join'()
 .end
@@ -966,7 +966,7 @@
 .sub test
     .param pmc passed_value
     .local pmc the_value
-    the_value = new 'PerlInt'
+    the_value = new ['PerlInt']
     the_value = 42
     store_global 'Foo', 'x', the_value
     $I0 = typeof passed_value
@@ -995,14 +995,14 @@
 .sub main :main
     .local pmc thread
     .local int flags
-    thread = new 'ParrotThread'
+    thread = new ['ParrotThread']
     flags = .PARROT_CLONE_CODE
     bor flags, flags, .PARROT_CLONE_GLOBALS
     bor flags, flags, .PARROT_CLONE_HLL
     bor flags, flags, .PARROT_CLONE_LIBRARIES
 
     .local pmc passed
-    passed = new 'PerlInt'
+    passed = new ['PerlInt']
     passed = 15
 
     .local pmc thread_func
@@ -1030,24 +1030,24 @@
     .local pmc tmp_string
     .local pmc shared_ref
 
-    queue = new 'TQueue'
-    tmp_string = new 'String'
+    queue = new ['TQueue']
+    tmp_string = new ['String']
     tmp_string = "ok 1\n"
-    shared_ref = new 'SharedRef', tmp_string
+    shared_ref = new ['SharedRef'], tmp_string
     push queue, shared_ref
-    tmp_string = new 'String'
+    tmp_string = new ['String']
     tmp_string = "ok 2\n"
-    shared_ref = new 'SharedRef', tmp_string
+    shared_ref = new ['SharedRef'], tmp_string
     push queue, shared_ref
-    tmp_string = new 'String'
+    tmp_string = new ['String']
     tmp_string = "ok 3\n"
-    shared_ref = new 'SharedRef', tmp_string
+    shared_ref = new ['SharedRef'], tmp_string
     push queue, shared_ref
 
     .local pmc thread
     .local pmc foo
 
-    thread = new 'ParrotThread'
+    thread = new ['ParrotThread']
     foo = get_global '_foo'
     thread.'run_clone'(foo, queue)
     thread.'join'()
@@ -1080,15 +1080,15 @@
 SKIP: {
     skip( "no shared Strings yet", 2 );
     pasm_output_is( <<'CODE', <<'OUT', "thread safe queue strings 1" );
-    new P10, 'TQueue'
+    new P10, ['TQueue']
     print "ok 1\n"
     set I0, P10
     print I0
     print "\n"
-    new P7, 'String'
+    new P7, ['String']
     set P7, "ok 2\n"
     push P10, P7
-    new P7, 'String'
+    new P7, ['String']
     set P7, "ok 3\n"
     push P10, P7
     set I0, P10
@@ -1109,20 +1109,20 @@
 OUT
 
     pasm_output_is( <<'CODE', <<'OUT', "multi-threaded strings" );
-    new P10, 'TQueue'
-    new P7, 'String'
+    new P10, ['TQueue']
+    new P7, ['String']
     set P7, "ok 1\n"
     push P10, P7
-    new P7, 'String'
+    new P7, ['String']
     set P7, "ok 2\n"
     push P10, P7
-    new P7, 'String'
+    new P7, ['String']
     set P7, "ok 3\n"
     push P10, P7
     set P6, P10
 
     get_global P5, "_foo"
-    new P2, 'ParrotThread'
+    new P2, ['ParrotThread']
     callmethod "thread3"
     set I5, P2
     getinterp P2

Modified: trunk/t/pmc/timer.t
==============================================================================
--- trunk/t/pmc/timer.t	(original)
+++ trunk/t/pmc/timer.t	Sun Jan 11 01:45:34 2009
@@ -39,7 +39,7 @@
 
 pasm_output_is( <<'CODE', <<'OUT', "Timer setup" );
 .include "timer.pasm"
-    new P0, 'Timer'
+    new P0, ['Timer']
     set P0[.PARROT_TIMER_SEC], 7
     set I0, P0[.PARROT_TIMER_SEC]
     eq I0, 7, ok1
@@ -66,14 +66,14 @@
 
 pasm_output_is( <<'CODE', <<'OUT', "Timer setup - initializer" );
 .include "timer.pasm"
-    new P1, 'SArray'
+    new P1, ['SArray']
     set P1, 4
     set P1[0], .PARROT_TIMER_SEC
     set P1[1], 8
     set P1[2], .PARROT_TIMER_USEC
     set P1[3], 400000
 
-    new P0, 'Timer', P1
+    new P0, ['Timer'], P1
     set I0, P0[.PARROT_TIMER_SEC]
     eq I0, 8, ok1
     print "not "
@@ -105,7 +105,7 @@
 
     pasm_output_like( <<'CODE', <<'OUT', "Timer setup - initializer/start" );
 .include "timer.pasm"
-    new P1, 'SArray'
+    new P1, ['SArray']
     set P1, 6
     set P1[0], .PARROT_TIMER_NSEC
     set P1[1], 0.5
@@ -115,7 +115,7 @@
     set P1[4], .PARROT_TIMER_RUNNING
     set P1[5], 1
 
-    new P0, 'Timer', P1
+    new P0, ['Timer'], P1
     print "ok 1\n"
     sleep 1
     print "ok 3\n"
@@ -129,7 +129,7 @@
 
     pasm_output_is( <<'CODE', <<'OUT', "Timer setup - initializer/start/stop" );
 .include "timer.pasm"
-    new P1, 'SArray'
+    new P1, ['SArray']
     set P1, 6
     set P1[0], .PARROT_TIMER_NSEC
     set P1[1], 0.5
@@ -139,7 +139,7 @@
     set P1[4], .PARROT_TIMER_RUNNING
     set P1[5], 1
 
-    new P0, 'Timer', P1
+    new P0, ['Timer'], P1
     print "ok 1\n"
     # stop the timer
     set P0[.PARROT_TIMER_RUNNING], 0
@@ -158,7 +158,7 @@
        ( todo => 'RT #49718, add scheduler features to JIT' ) : ();
     pasm_output_is( <<'CODE', <<'OUT', "Timer setup - initializer/start/repeat" , @todo );
 .include "timer.pasm"
-    new P1, 'SArray'
+    new P1, ['SArray']
     set P1, 8
     set P1[0], .PARROT_TIMER_NSEC
     set P1[1], 0.2
@@ -170,7 +170,7 @@
     set P1[6], .PARROT_TIMER_RUNNING
     set P1[7], 1
 
-    new P0, 'Timer', P1
+    new P0, ['Timer'], P1
     print "ok 1\n"
     sleep 1
     sleep 1
@@ -194,7 +194,7 @@
 
 .sub _main
     .local pmc pmc1
-    pmc1 = new 'Timer'
+    pmc1 = new ['Timer']
     .local int bool1
     does bool1, pmc1, "scalar"
     print bool1

Modified: trunk/t/pmc/tqueue.t
==============================================================================
--- trunk/t/pmc/tqueue.t	(original)
+++ trunk/t/pmc/tqueue.t	Sun Jan 11 01:45:34 2009
@@ -26,17 +26,17 @@
     .local int i, is_ok
     .local pmc tq, pInt
 
-    new tq, 'TQueue'
+    new tq, ['TQueue']
     ok(1, "didn't crash")
 
     i = tq
     is_ok = i == 0
     ok(is_ok, "int assignment gets # of elements in empty queue")
 
-    pInt = new 'Integer'
+    pInt = new ['Integer']
     pInt = 2
     push tq, pInt
-    pInt = new 'Integer'
+    pInt = new ['Integer']
     pInt = 3
     push tq, pInt
     i = tq

Modified: trunk/t/pmc/undef.t
==============================================================================
--- trunk/t/pmc/undef.t	(original)
+++ trunk/t/pmc/undef.t	Sun Jan 11 01:45:34 2009
@@ -17,7 +17,7 @@
 =cut
 
 .sub main :main
-    .include 'include/test_more.pir'
+    .include 'test_more.pir'
 
     plan(19)
 
@@ -36,8 +36,8 @@
 .end
 
 .sub morph_to_string
-        new $P0, 'String'
-        new $P1, 'Undef'
+        new $P0, ['String']
+        new $P1, ['Undef']
         set $P0, "foo"
         concat  $P1, $P0, $P0
         is( $P1, 'foofoo', 'morphed to string' )
@@ -45,7 +45,7 @@
 
 .sub undef_pmc_is_false
     .local pmc pmc1
-    pmc1 = new 'Undef'
+    pmc1 = new ['Undef']
     if pmc1 goto PMC1_IS
       ok( 1, 'PMC Undef created by new is false' )
       .return()
@@ -55,7 +55,7 @@
 
 .sub undef_pmc_is_not_defined
     .local pmc pmc1
-    pmc1 = new 'Undef'
+    pmc1 = new ['Undef']
     .local int is_defined
     is_defined = defined pmc1
     if is_defined goto PMC1_IS_DEFINED
@@ -67,14 +67,14 @@
 
 .sub undef_pmc_morph_to_string
     .local pmc pmc1
-    pmc1 = new 'Undef'
+    pmc1 = new ['Undef']
     $S1 = pmc1
     is( $S1, '', 'PMC Undef is empty string' )
 .end
 
 .sub undef_pmc_morph_to_integer
     .local pmc pmc1
-    pmc1 = new 'Undef'
+    pmc1 = new ['Undef']
     .local int int1
     int1 = pmc1
     is( int1, 0, 'PMC Undef as integer is zero' )
@@ -87,7 +87,7 @@
 
 .sub undef_pmc_morph_to_float
     .local pmc pmc1
-    pmc1 = new 'Undef'
+    pmc1 = new ['Undef']
     .local int int1
     int1 = pmc1
     .local num float1
@@ -98,7 +98,7 @@
 
 .sub string_pmc_morph_to_undef
     .local pmc pmc1
-    pmc1 = new 'String'
+    pmc1 = new ['String']
     morph pmc1, 'Undef'
     $S1 = typeof pmc1
     is( $S1, 'Undef', 'PMC String morph to undef' )
@@ -106,7 +106,7 @@
 
 .sub undef_pmc_set_to_integer_native
     .local pmc pmc1
-    pmc1 = new 'Undef'
+    pmc1 = new ['Undef']
     pmc1 = -88888888
     is( pmc1, -88888888, 'PMC Undef set to int gives int' )
 
@@ -117,7 +117,7 @@
 
 .sub undef_pmc_isa_after_assignment
     .local pmc pmc1
-    pmc1 = new 'Undef'
+    pmc1 = new ['Undef']
     .local int pmc1_is_a
 
     pmc1_is_a = isa pmc1, "Undef"
@@ -138,7 +138,7 @@
 
 .sub check_whether_interface_is_done
     .local pmc pmc1
-    pmc1 = new 'Undef'
+    pmc1 = new ['Undef']
     .local int bool1
 
     does bool1, pmc1, "scalar"
@@ -149,15 +149,15 @@
 .end
 
 .sub verify_clone_works
-    $P1 = new 'Undef'
+    $P1 = new ['Undef']
     $P2 = clone $P1
     $S0 = typeof $P2
     is( $S0, 'Undef', 'PMC Undef clone is an Undef' )
 .end
 
 .sub undef_equals_undef
-    $P1 = new 'Undef'
-    $P2 = new 'Undef'
+    $P1 = new ['Undef']
+    $P2 = new ['Undef']
     if $P1 == $P2 goto ok
         ok( 0, 'Undef == Undef (RT #33603)' )
         .return()

Modified: trunk/t/pmc/unmanagedstruct.t
==============================================================================
--- trunk/t/pmc/unmanagedstruct.t	(original)
+++ trunk/t/pmc/unmanagedstruct.t	Sun Jan 11 01:45:34 2009
@@ -17,12 +17,12 @@
 =cut
 
 .sub main :main
-    .include 'include/test_more.pir'
+    .include 'test_more.pir'
 
     plan(1)
 
-    new $P0, 'UnManagedStruct'
-    ok(1, 'Instantiated .UnManagedStruct')
+    new $P0, ['UnManagedStruct']
+    ok(1, 'Instantiated an UnManagedStruct PMC')
 .end
 
 # Local Variables:

Modified: trunk/t/pmc/vtablecache.t
==============================================================================
--- trunk/t/pmc/vtablecache.t	(original)
+++ trunk/t/pmc/vtablecache.t	Sun Jan 11 01:45:34 2009
@@ -17,12 +17,12 @@
 =cut
 
 .sub main :main
-   .include 'include/test_more.pir'
+   .include 'test_more.pir'
 
     plan(1)
 
-    new $P0, 'VtableCache'
-    ok(1, 'Instantiated .VtableCache')
+    new $P0, ['VtableCache']
+    ok(1, 'Instantiated a VtableCache PMC')
 .end
 
 # Local Variables:



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About