[svn:parrot] r38031 - in trunk: . config/auto editor examples/benchmarks lib/Parrot/Pmc2c lib/Parrot/Pmc2c/PMC t/pmc
cotto at svn.parrot.org
cotto at svn.parrot.org
Fri Apr 10 21:13:08 UTC 2009
Author: cotto
Date: Fri Apr 10 21:13:06 2009
New Revision: 38031
URL: https://trac.parrot.org/parrot/changeset/38031
Log:
[PMC] more cleanup from the Ref/SharedRef removal
Deleted:
trunk/examples/benchmarks/shared_ref.pasm
trunk/examples/benchmarks/shared_ref.pl
trunk/lib/Parrot/Pmc2c/PMC/Ref.pm
trunk/lib/Parrot/Pmc2c/PMC/SharedRef.pm
Modified:
trunk/MANIFEST
trunk/PBC_COMPAT
trunk/config/auto/pmc.pm
trunk/editor/pir-mode.el
trunk/lib/Parrot/Pmc2c/Pmc2cMain.pm
trunk/t/pmc/pmc.t
trunk/t/pmc/sockaddr.t
Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST Fri Apr 10 20:08:11 2009 (r38030)
+++ trunk/MANIFEST Fri Apr 10 21:13:06 2009 (r38031)
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Fri Apr 10 19:51:49 2009 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Fri Apr 10 20:55:13 2009 UT
#
# See tools/dev/install_files.pl for documentation on the
# format of this file.
@@ -613,8 +613,6 @@
examples/benchmarks/primes2.rb [examples]
examples/benchmarks/primes2_i.pir [examples]
examples/benchmarks/primes_i.pasm [examples]
-examples/benchmarks/shared_ref.pasm [examples]
-examples/benchmarks/shared_ref.pl [examples]
examples/benchmarks/stress.pasm [examples]
examples/benchmarks/stress.pl [examples]
examples/benchmarks/stress.rb [examples]
@@ -1078,8 +1076,6 @@
lib/Parrot/Pmc2c/PMC/ParrotClass.pm [devel]lib
lib/Parrot/Pmc2c/PMC/PrintTree.pm [devel]lib
lib/Parrot/Pmc2c/PMC/RO.pm [devel]lib
-lib/Parrot/Pmc2c/PMC/Ref.pm [devel]lib
-lib/Parrot/Pmc2c/PMC/SharedRef.pm [devel]lib
lib/Parrot/Pmc2c/PMC/default.pm [devel]lib
lib/Parrot/Pmc2c/PMCEmitter.pm [devel]lib
lib/Parrot/Pmc2c/Parser.pm [devel]lib
Modified: trunk/PBC_COMPAT
==============================================================================
--- trunk/PBC_COMPAT Fri Apr 10 20:08:11 2009 (r38030)
+++ trunk/PBC_COMPAT Fri Apr 10 21:13:06 2009 (r38031)
@@ -27,7 +27,7 @@
# please insert tab separated entries at the top of the list
-4.5 2009.04.10 cotto removed Ref and SharedRef PMCs
+4.5 2009.04.10 cotto removed Ref and SharedRef PMCs
4.4 2009.04.07 pmichaud find_caller_lex added
4.3 2009.03.25 jonathan socket opcodes added
4.2 2009.03.21 cotto removed Bound_NCI PMC
Modified: trunk/config/auto/pmc.pm
==============================================================================
--- trunk/config/auto/pmc.pm Fri Apr 10 20:08:11 2009 (r38030)
+++ trunk/config/auto/pmc.pm Fri Apr 10 21:13:06 2009 (r38031)
@@ -66,8 +66,6 @@
lib/Parrot/Pmc2c/UtilFunctions.pm \\
lib/Parrot/Pmc2c/PMC/default.pm \\
lib/Parrot/Pmc2c/PMC/Null.pm \\
- lib/Parrot/Pmc2c/PMC/Ref.pm \\
- lib/Parrot/Pmc2c/PMC/SharedRef.pm \\
lib/Parrot/Pmc2c/PMC/RO.pm
END
Modified: trunk/editor/pir-mode.el
==============================================================================
--- trunk/editor/pir-mode.el Fri Apr 10 20:08:11 2009 (r38030)
+++ trunk/editor/pir-mode.el Fri Apr 10 21:13:06 2009 (r38031)
@@ -153,10 +153,10 @@
"ManagedStruct" "MultiSub" "NCI" "NameSpace" "Null"
"OS" "Object" "OrderedHash" "PMCProxy" "ParrotClass"
"ParrotIO" "ParrotInterpreter" "ParrotLibrary" "ParrotObject"
- "ParrotRunningThread" "ParrotThread" "Pointer" "Random" "Ref"
+ "ParrotRunningThread" "ParrotThread" "Pointer" "Random"
"ResizableBooleanArray" "ResizableFloatArray" "ResizableIntegerArray"
"ResizablePMCArray" "ResizableStringArray" "RetContinuation"
- "Role" "Scalar" "SharedRef" "String" "Sub" "Super"
+ "Role" "Scalar" "String" "Sub" "Super"
"Timer" "UnManagedStruct" "Undef" "VtableCache"))
(defvar pir-ops
Deleted: trunk/examples/benchmarks/shared_ref.pasm
==============================================================================
--- trunk/examples/benchmarks/shared_ref.pasm Fri Apr 10 21:13:06 2009 (r38030)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,32 +0,0 @@
-# Copyright (C) 2001-2006, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-examples/benchmarks/shared_ref.pasm - Shared reference between threads
-
-=head1 SYNOPSIS
-
- % time ./parrot examples/benchmarks/shared_ref.pasm
-
-=head1 DESCRIPTION
-
-Shares references between threads.
-
-=cut
-
- set I0, 100000
- set I1, 0
-lp:
- new P0, 'Integer'
- new P1, 'SharedRef', P0 # or 'Ref'
- set P1, I1
- inc I1
- lt I1, I0, lp
- end
-
-=head1 SEE ALSO
-
-F<examples/benchmarks/shared_ref.pl>.
-
-=cut
Deleted: trunk/examples/benchmarks/shared_ref.pl
==============================================================================
--- trunk/examples/benchmarks/shared_ref.pl Fri Apr 10 21:13:06 2009 (r38030)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,42 +0,0 @@
-#! perl
-# Copyright (C) 2001-2003, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-examples/benchmarks/shared_ref.pl - Shared reference between threads
-
-=head1 SYNOPSIS
-
- % time perl examples/benchmarks/shared_ref.pl
-
-=head1 DESCRIPTION
-
-Shares references between threads.
-
-=cut
-
-use strict;
-use warnings;
-use threads;
-use threads::shared;
-
-for my $i ( 0 .. 99_999 ) {
- my $r : shared;
- my $j : shared;
- $r = \$j;
- $$r = $i;
-}
-
-=head1 SEE ALSO
-
-F<examples/benchmarks/shared_ref.pasm>.
-
-=cut
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Deleted: trunk/lib/Parrot/Pmc2c/PMC/Ref.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/PMC/Ref.pm Fri Apr 10 21:13:06 2009 (r38030)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,111 +0,0 @@
-# Copyright (C) 2007-2008, Parrot Foundation.
-# $Id$
-
-=head1 Parrot::Pmc2c::Ref Instance Methods
-
-=over 4
-
-=cut
-
-package Parrot::Pmc2c::PMC::Ref;
-use base 'Parrot::Pmc2c::PMC';
-use strict;
-use warnings;
-use Parrot::Pmc2c::UtilFunctions qw( return_statement passable_args_from_parameter_list );
-
-=item C<prederef($method)>
-
-Returns C code to be executed before executing a delegated method.
-Default versions always returns an empty string.
-
-=cut
-
-sub prederef {
- return '';
-}
-
-=item C<postderef($method)>
-
-Returns C code to be executed after executing a delegated method
-through this reference. Default version returns an empty string.
-
-=cut
-
-sub postderef {
- return '';
-}
-
-=item C<raw_deref($method)>
-
-Returns C code that can be used to access the underlying PMC in the
-delegated methods. Default is PMC_pmc_val(pmc)
-
-=cut
-
-sub raw_deref {
- my ( $self, $method ) = @_;
- return 'PMC_pmc_val(pmc)';
-}
-
-=item C<body($method, $line, $out_name)>
-
-Returns the C code for the method body.
-
-Overrides the default implementation to direct all unknown methods to
-the thing referred to.
-
-=cut
-
-sub pre_method_gen {
- my ($self) = @_;
-
- # vtable methods
- foreach my $method ( @{ $self->vtable->methods } ) {
- my $vt_method_name = $method->name;
- next unless $self->normal_unimplemented_vtable($vt_method_name);
- my $new_default_method = $method->clone(
- {
- parent_name => $self->name,
- type => Parrot::Pmc2c::Method::VTABLE,
- }
- );
-
- my $arg = passable_args_from_parameter_list( $method->parameters );
- my $pre = $self->prederef($method);
- my $post = $self->postderef($method);
- my $deref = $self->raw_deref($method);
- my $ret_def = '';
- my $ret_assign = '';
- my $ret = '';
-
- if ( $method->return_type ne 'void' ) {
- $ret_def = $method->return_type . ' ret_val;';
- $ret_assign = 'ret_val = ';
- $ret = return_statement( $method, 'ret_val' );
- }
- my $body = <<EOC;
- $ret_def
- $pre
- $ret_assign VTABLE_$vt_method_name(interp, $deref$arg);
- $post
- $ret
-EOC
-
- $new_default_method->body( Parrot::Pmc2c::Emitter->text($body) );
- $self->add_method($new_default_method);
- }
- return 1;
-}
-
-1;
-
-=back
-
-=cut
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Deleted: trunk/lib/Parrot/Pmc2c/PMC/SharedRef.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/PMC/SharedRef.pm Fri Apr 10 21:13:06 2009 (r38030)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,49 +0,0 @@
-# Copyright (C) 2007, Parrot Foundation.
-# $Id$
-
-=head1 Parrot::Pmc2c::SharedRef Instance Methods
-
-=over 4
-
-=cut
-
-package Parrot::Pmc2c::PMC::SharedRef;
-use base 'Parrot::Pmc2c::PMC::Ref';
-use strict;
-use warnings;
-
-=item C<prederef($method)>
-
-Returns code that will lock the PMC for calling the underlying
-implementation of $method.
-
-=cut
-
-sub prederef {
- my ( $self, $method ) = @_;
- return 'LOCK_PMC(interp, pmc);';
-}
-
-=item C<postderef($method)>
-
-Returns the unlocking code.
-
-=cut
-
-sub postderef {
- my ( $self, $method ) = @_;
- return 'UNLOCK_PMC(interp, pmc);';
-}
-
-=back
-
-=cut
-
-1;
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Modified: trunk/lib/Parrot/Pmc2c/Pmc2cMain.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/Pmc2cMain.pm Fri Apr 10 20:08:11 2009 (r38030)
+++ trunk/lib/Parrot/Pmc2c/Pmc2cMain.pm Fri Apr 10 21:13:06 2009 (r38031)
@@ -18,8 +18,6 @@
use Parrot::Pmc2c::PCCMETHOD ();
use Parrot::Pmc2c::PMC::default ();
use Parrot::Pmc2c::PMC::Null ();
-use Parrot::Pmc2c::PMC::Ref ();
-use Parrot::Pmc2c::PMC::SharedRef ();
use Parrot::Pmc2c::PMC::Object ();
$SIG{'__WARN__'} = sub { use Carp; warn $_[0]; Carp::confess; };
Modified: trunk/t/pmc/pmc.t
==============================================================================
--- trunk/t/pmc/pmc.t Fri Apr 10 20:08:11 2009 (r38030)
+++ trunk/t/pmc/pmc.t Fri Apr 10 21:13:06 2009 (r38031)
@@ -49,9 +49,7 @@
my $checkTypes;
my %types_we_cant_test
= map { $_ => 1; } ( # These require initializers.
- qw(Null Iterator Enumerate Ref SharedRef
- ParrotObject ParrotThread
- BigInt LexInfo LexPad Object),
+ qw(Null Iterator Enumerate ParrotObject ParrotThread BigInt LexInfo LexPad Object),
# Instances of these appear to have other types.
qw(PMCProxy Class) );
Modified: trunk/t/pmc/sockaddr.t
==============================================================================
--- trunk/t/pmc/sockaddr.t Fri Apr 10 20:08:11 2009 (r38030)
+++ trunk/t/pmc/sockaddr.t Fri Apr 10 21:13:06 2009 (r38031)
@@ -12,7 +12,7 @@
=head1 DESCRIPTION
-Tests the SharedRef PMC.
+Test the Sockaddr PMC.
=cut
More information about the parrot-commits
mailing list