On Sat Jan 12 04:42:26 2008, allison wrote:
> This opcode has been superseded by 'inspect'.

The pmcinfo opcode is removed by the attached patch.  I would have
committed this directly however, I'm not 100% sure that removing the:
'Class PMCs also have the "I am a class" flag set on them.'
test was the right thing to do.  Something tells me that it should be
rewritten to use 'inspect' instead, but I don't know how to do this...

Feedback most definitely appreciated,

Paul
Index: DEPRECATED.pod
===================================================================
--- DEPRECATED.pod	(revision 25038)
+++ DEPRECATED.pod	(working copy)
@@ -132,10 +132,6 @@
 
 See RT #48310.
 
-=item * C<pmcinfo> [post 0.5.2]
-
-See RT #42375.
-
 =back
 
 =head1 Class Features
Index: src/ops/experimental.ops
===================================================================
--- src/ops/experimental.ops	(revision 25016)
+++ src/ops/experimental.ops	(working copy)
@@ -400,27 +400,6 @@
   goto NEXT();
 }
 
-=item B<pmcinfo>(out INT, invar PMC, inconst INT)
-
-Extract some information about PMC $2 and store it in $1.
-Possible values for $3 are:
-
-=over 4
-
-=item .PMCINFO_FLAGS Get the PMC's flags.
-
-=back
-
-RT#42375 move/officalize this opcode at next op cleanup.
-
-=cut
-
-op pmcinfo(out INT, invar PMC, inconst INT) {
-  if ($3 == PMCINFO_FLAGS)
-      $1 = PObj_get_FLAGS($2);
-  goto NEXT();
-}
-
 ########################################
 
 =item B<add_io_event>(invar PMC, invar PMC, invar PMC, inconst INT)
Index: include/parrot/pmc.h
===================================================================
--- include/parrot/pmc.h	(revision 25016)
+++ include/parrot/pmc.h	(working copy)
@@ -96,14 +96,6 @@
 
 /* HEADERIZER END: src/pmc.c */
 
-/* pmcinfo parameters */
-
-/* &gen_from_def(pmcinfo.pasm) */
-
-#define PMCINFO_FLAGS    4      /* see also STRINGINFO_FLAGS */
-
-/* &end_gen */
-
 #endif /* PARROT_PMC_H_GUARD */
 
 /*
Index: t/pmc/class.t
===================================================================
--- t/pmc/class.t	(revision 25016)
+++ t/pmc/class.t	(working copy)
@@ -17,10 +17,8 @@
 =cut
 
 
-.const int TESTS = 49
-.include 'pmcinfo.pasm'
+.const int TESTS = 48
 
-
 .sub 'main' :main
      load_bytecode 'Test/More.pir'
      .local pmc exporter, test_ns
@@ -30,7 +28,6 @@
 
      plan(TESTS)
      'new op'()
-     'class flag'()
      'name'()
      'new method'()
      'attributes'()
@@ -59,21 +56,6 @@
     isa_ok(class, 'Class')
 .end
 
-
-# L<PDD15/Class PMC API/'Class PMCs also have the "I am a class" flag set on them.'>
-.sub 'class flag'
-    .local pmc class
-    .local int class_flags, class_flag_set
-    .const int POBJ_IS_CLASS_FLAG = 536870912  # 1 << 29
-
-    new class, 'Class'
-    class_flags = pmcinfo class, .PMCINFO_FLAGS    # XXX op currently experimental
-    class_flag_set = class_flags & POBJ_IS_CLASS_FLAG
-    ok(class_flag_set, 'Class PMC has "I am a class" flag set')
-.end
-
-
-
 # L<PDD15/Class PMC API/=item name>
 .sub 'name'
     .local pmc class, result
Index: t/pmc/pmc.t
===================================================================
--- t/pmc/pmc.t	(revision 25016)
+++ t/pmc/pmc.t	(working copy)
@@ -7,7 +7,7 @@
 use lib qw( . lib ../lib ../../lib );
 
 use Test::More;
-use Parrot::Test tests => 20;
+use Parrot::Test tests => 19;
 use Parrot::PMC qw(%pmc_types);
 
 =head1 NAME
@@ -364,22 +364,6 @@
 42
 OUTPUT
 
-pasm_output_is( <<'CODE', <<'OUTPUT', "pmcinfo_i_p_ic" );
-.include "pmcinfo.pasm"
-    new P0, 'Integer'
-    pmcinfo I0, P0, .PMCINFO_FLAGS
-    shl I2, 1, 9        # PObj_is_PMC_FLAG s. pobj.h
-    band I1, I0, I2
-    if I1, ok
-    print "PMC flag not set\n"
-    end
-ok:
-    print "ok\n"
-    end
-CODE
-ok
-OUTPUT
-
 # Local Variables:
 #   mode: cperl
 #   cperl-indent-level: 4

Reply via email to