Permalink
Browse files

[PMC] more cleanup from the Ref/SharedRef removal

git-svn-id: https://svn.parrot.org/parrot/trunk@38031 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
cotto committed Apr 10, 2009
1 parent f3e3a0b commit b5585bdee741476645eba79e1a5425354bd49ace
View
@@ -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.py [examples]
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/Object.pm [devel]lib
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
View
@@ -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
View
@@ -66,8 +66,6 @@ PMC2C_FILES = \\
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
View
@@ -153,10 +153,10 @@ newline or semicolon after an end keyword."
"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
@@ -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
@@ -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:
View
@@ -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:
@@ -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:
@@ -18,8 +18,6 @@ use Parrot::Pmc2c::UtilFunctions 'filename';
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; };
View
@@ -49,9 +49,7 @@ OUTPUT
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) );
View
@@ -12,7 +12,7 @@ t/pmc/sockaddr.t - test the Sockaddr PMC
=head1 DESCRIPTION
-Tests the SharedRef PMC.
+Test the Sockaddr PMC.
=cut

0 comments on commit b5585bd

Please sign in to comment.