Author: chromatic
Date: Thu Nov 6 23:59:44 2008
New Revision: 32418
Modified:
trunk/src/ops/experimental.ops
trunk/t/pmc/fixedintegerarray.t
Log:
[ops] Removed experimental new_i_s opcode, which was deprecated anyway, as it
used type IDs (and getting it to work with string names is more trouble than
it's worth for a deprecated, experimental op anyway). Only the FIA tests
relied on it.
Modified: trunk/src/ops/experimental.ops
==============================================================================
--- trunk/src/ops/experimental.ops (original)
+++ trunk/src/ops/experimental.ops Thu Nov 6 23:59:44 2008
@@ -301,28 +301,6 @@
$1 = res;
}
-=item B<new>(out PMC, in INT, in STR)
-
-Create a new PMC of the type $2 according to the PMCs string representation
-in $3.
-
-BUT SINCE INSTANTIATE WILL PROBABLY DIE, DON'T USE THIS;
-OR IF YOU NEED THIS (OR INSTANTIATE), TELL CHIP
-
-=cut
-
-op new(out PMC, in INT, in STR) :deprecated {
- PMC *_class;
- if ($2 <= 0 || $2 >= interp->n_vtable_max) {
- opcode_t *handler = Parrot_ex_throw_from_op_args(interp, expr NEXT(),
- EXCEPTION_NO_CLASS,
- "Illegal PMC enum (%d) in new", (int)$2);
- goto ADDRESS(handler);
- }
- _class = interp->vtables[$2]->pmc_class;
- $1 = VTABLE_new_from_string(interp, _class, $3, 0);
-}
-
########################################
=item B<add_io_event>(invar PMC, invar PMC, invar PMC, inconst INT)
Modified: trunk/t/pmc/fixedintegerarray.t
==============================================================================
--- trunk/t/pmc/fixedintegerarray.t (original)
+++ trunk/t/pmc/fixedintegerarray.t Thu Nov 6 23:59:44 2008
@@ -1,12 +1,12 @@
#! perl
-# Copyright (C) 2001-2007, The Perl Foundation.
+# Copyright (C) 2001-2008, The Perl Foundation.
# $Id$
use strict;
use warnings;
use lib qw( . lib ../lib ../../lib );
use Test::More;
-use Parrot::Test tests => 15;
+use Parrot::Test tests => 11;
=head1 NAME
@@ -269,92 +269,6 @@
0
OUTPUT
-pasm_output_is( <<'CODE', <<'OUTPUT', "new_p_i_s" );
- new P0, .FixedIntegerArray, "(1, 17,42,0,77,0b111, 0Xff)"
- set I0, P0
- print I0
- print "\n"
- set I1, 0
-loop:
- set I2, P0[I1]
- print I2
- print "\n"
- inc I1
- lt I1, I0, loop
- print "ok\n"
- end
-CODE
-7
-1
-17
-42
-0
-77
-7
-255
-ok
-OUTPUT
-
-pir_output_is( <<'CODE', <<'OUTPUT', "get_repr, with array created with type
id" );
-.sub main
- new $P0, .FixedIntegerArray, "(1, 17,42,0,77,0b111, 0Xff)"
- set $I0, $P0
- print $I0
- print "\n"
- get_repr $S0, $P0
- print $S0
- print "\n"
-.end
-CODE
-7
-[ 1, 17, 42, 0, 77, 7, 255 ]
-OUTPUT
-
-TODO: {
- local $TODO = 'These tests require an obscure opcode that does not exist';
-
- pasm_output_is( <<'CODE', <<'OUTPUT', "new_p_s_s" );
- new P0, 'FixedIntegerArray', "(1, 17,42,0,77,0b111, 0Xff)"
- set I0, P0
- print I0
- print "\n"
- set I1, 0
-loop:
- set I2, P0[I1]
- print I2
- print "\n"
- inc I1
- lt I1, I0, loop
- print "ok\n"
- end
-CODE
-7
-1
-17
-42
-0
-77
-7
-255
-ok
-OUTPUT
-
- pir_output_is( <<'CODE', <<'OUTPUT', "get_repr" );
-.sub main
- new $P0, 'FixedIntegerArray', "(1, 17,42,0,77,0b111, 0Xff)"
- set $I0, $P0
- print $I0
- print "\n"
- get_repr $S0, $P0
- print $S0
- print "\n"
-.end
-CODE
-7
-[ 1, 17, 42, 0, 77, 7, 255 ]
-OUTPUT
-}
-
1;
# Local Variables: