[svn:parrot] r39944 - in trunk: . config/gen/makefiles docs/dev src/dynoplibs src/ops t/codingstd t/dynoplibs t/tools/ops2cutils
coke at svn.parrot.org
coke at svn.parrot.org
Wed Jul 8 02:48:41 UTC 2009
Author: coke
Date: Wed Jul 8 02:48:40 2009
New Revision: 39944
URL: https://trac.parrot.org/parrot/changeset/39944
Log:
-remove dynop myop (TT #450); migrate obscure from regular to dynop. (partial TT #449)
-lack of existing tests for dynops, and more regimented test conditions force us to todo a codingstd test.
Added:
trunk/src/dynoplibs/obscure.ops
- copied, changed from r39935, trunk/src/ops/obscure.ops
Deleted:
trunk/src/dynoplibs/myops.ops
trunk/src/ops/obscure.ops
trunk/t/dynoplibs/myops.t
Modified:
trunk/DEPRECATED.pod
trunk/MANIFEST
trunk/config/gen/makefiles/dynoplibs.in
trunk/docs/dev/events.pod
trunk/t/codingstd/test_file_coverage.t
trunk/t/tools/ops2cutils/06-dynamic.t
trunk/t/tools/ops2cutils/09-dynamic_nolines.t
Modified: trunk/DEPRECATED.pod
==============================================================================
--- trunk/DEPRECATED.pod Wed Jul 8 01:57:19 2009 (r39943)
+++ trunk/DEPRECATED.pod Wed Jul 8 02:48:40 2009 (r39944)
@@ -87,7 +87,7 @@
=item moved to dynop [eligible in 1.1]
-Parts or all of: bit.ops, debug.ops, io.ops, math.ops, obscure.ops, set.ops
+Parts or all of: bit.ops, debug.ops, io.ops, math.ops, set.ops
(the obscure and rarely used parts), sys.ops.
L<https://trac.parrot.org/parrot/ticket/449>
@@ -96,10 +96,6 @@
F<src/ops/experimental.ops> - only the C<trap> opcode remains
-=item myops [eligible in 1.1]
-
-L<https://trac.parrot.org/parrot/ticket/450>
-
=item get_addr and set_addr [eligible in 1.5]
L<https://trac.parrot.org/parrot/ticket/218>
Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST Wed Jul 8 01:57:19 2009 (r39943)
+++ trunk/MANIFEST Wed Jul 8 02:48:40 2009 (r39944)
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Mon Jul 6 16:56:56 2009 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Wed Jul 8 02:33:36 2009 UT
#
# See below for documentation on the format of this file.
#
@@ -1247,7 +1247,7 @@
src/debug.c []
src/dynext.c []
src/dynoplibs/README []doc
-src/dynoplibs/myops.ops []
+src/dynoplibs/obscure.ops []
src/dynpmc/README.pod []doc
src/dynpmc/dynlexpad.pmc [devel]src
src/dynpmc/ext.pir []
@@ -1359,7 +1359,6 @@
src/ops/io.ops []
src/ops/math.ops []
src/ops/object.ops []
-src/ops/obscure.ops []
src/ops/ops.num [devel]src
src/ops/ops.skip []
src/ops/pic.ops []
@@ -1671,7 +1670,6 @@
t/distro/file_metadata.t [test]
t/distro/manifest.t [test]
t/distro/meta_yml.t [test]
-t/dynoplibs/myops.t [test]
t/dynpmc/dynlexpad.t [test]
t/dynpmc/foo.t [test]
t/dynpmc/gdbmhash.t [test]
Modified: trunk/config/gen/makefiles/dynoplibs.in
==============================================================================
--- trunk/config/gen/makefiles/dynoplibs.in Wed Jul 8 01:57:19 2009 (r39943)
+++ trunk/config/gen/makefiles/dynoplibs.in Wed Jul 8 02:48:40 2009 (r39944)
@@ -25,10 +25,10 @@
LINKARGS := $(LDFLAGS) $(LD_LOAD_FLAGS) $(LIBPARROT) @icu_shared@ @libs@
OPS_TARGETS := \
-#IF(cg_flag): myops_ops_cg$(LOAD_EXT) \
-#IF(cg_flag): myops_ops_cgp$(LOAD_EXT) \
- myops_ops$(LOAD_EXT) \
- myops_ops_switch$(LOAD_EXT)
+#IF(cg_flag): obscure_ops_cg$(LOAD_EXT) \
+#IF(cg_flag): obscure_ops_cgp$(LOAD_EXT) \
+ obscure_ops$(LOAD_EXT) \
+ obscure_ops_switch$(LOAD_EXT)
CLEANUPS := \
"*.c" \
@@ -51,41 +51,41 @@
Makefile: ../../config/gen/makefiles/dynoplibs.in
cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::makefiles --target=src/dynoplibs/Makefile
-myops_ops$(LOAD_EXT): myops_ops$(O)
- $(LD) $(LD_OUT)myops_ops$(LOAD_EXT) myops_ops$(O) $(LINKARGS)
+obscure_ops$(LOAD_EXT): obscure_ops$(O)
+ $(LD) $(LD_OUT)obscure_ops$(LOAD_EXT) obscure_ops$(O) $(LINKARGS)
-myops_ops$(O): myops_ops.c
- $(CC) $(CC_OUT)myops_ops$(O) $(INCLUDES) $(CFLAGS) myops_ops.c
+obscure_ops$(O): obscure_ops.c
+ $(CC) $(CC_OUT)obscure_ops$(O) $(INCLUDES) $(CFLAGS) obscure_ops.c
-myops_ops.c: myops.ops
- $(OPS2C) C --dynamic myops.ops
+obscure_ops.c: obscure.ops
+ $(OPS2C) C --dynamic obscure.ops
-myops_ops_switch$(LOAD_EXT): myops_ops_switch$(O)
- $(LD) $(LD_OUT)myops_ops_switch$(LOAD_EXT) myops_ops_switch$(O) $(LINKARGS)
+obscure_ops_switch$(LOAD_EXT): obscure_ops_switch$(O)
+ $(LD) $(LD_OUT)obscure_ops_switch$(LOAD_EXT) obscure_ops_switch$(O) $(LINKARGS)
-myops_ops_switch$(O): myops_ops_switch.c
- $(CC) $(CC_OUT)myops_ops_switch$(O) $(INCLUDES) $(CFLAGS) myops_ops_switch.c
+obscure_ops_switch$(O): obscure_ops_switch.c
+ $(CC) $(CC_OUT)obscure_ops_switch$(O) $(INCLUDES) $(CFLAGS) obscure_ops_switch.c
-myops_ops_switch.c: myops.ops
- $(OPS2C) CSwitch --dynamic myops.ops
+obscure_ops_switch.c: obscure.ops
+ $(OPS2C) CSwitch --dynamic obscure.ops
-myops_ops_cg$(LOAD_EXT): myops_ops_cg$(O)
- $(LD) $(LD_OUT)myops_ops_cg$(LOAD_EXT) myops_ops_cg$(O) $(LINKARGS)
+obscure_ops_cg$(LOAD_EXT): obscure_ops_cg$(O)
+ $(LD) $(LD_OUT)obscure_ops_cg$(LOAD_EXT) obscure_ops_cg$(O) $(LINKARGS)
-myops_ops_cg$(O): myops_ops_cg.c
- $(CC) $(CC_OUT)myops_ops_cg$(O) $(INCLUDES) $(CFLAGS) myops_ops_cg.c
+obscure_ops_cg$(O): obscure_ops_cg.c
+ $(CC) $(CC_OUT)obscure_ops_cg$(O) $(INCLUDES) $(CFLAGS) obscure_ops_cg.c
-myops_ops_cg.c: myops.ops
- $(OPS2C) CGoto --dynamic myops.ops
+obscure_ops_cg.c: obscure.ops
+ $(OPS2C) CGoto --dynamic obscure.ops
-myops_ops_cgp$(LOAD_EXT): myops_ops_cgp$(O)
- $(LD) $(LD_OUT)myops_ops_cgp$(LOAD_EXT) myops_ops_cgp$(O) $(LINKARGS)
+obscure_ops_cgp$(LOAD_EXT): obscure_ops_cgp$(O)
+ $(LD) $(LD_OUT)obscure_ops_cgp$(LOAD_EXT) obscure_ops_cgp$(O) $(LINKARGS)
-myops_ops_cgp$(O): myops_ops_cgp.c
- $(CC) $(CC_OUT)myops_ops_cgp$(O) $(INCLUDES) $(CFLAGS) myops_ops_cgp.c
+obscure_ops_cgp$(O): obscure_ops_cgp.c
+ $(CC) $(CC_OUT)obscure_ops_cgp$(O) $(INCLUDES) $(CFLAGS) obscure_ops_cgp.c
-myops_ops_cgp.c: myops.ops
- $(OPS2C) CGP --dynamic myops.ops
+obscure_ops_cgp.c: obscure.ops
+ $(OPS2C) CGP --dynamic obscure.ops
test : all
cd ../.. && $(PERL) -Ilib t/harness t/dynoplibs/*.t
Modified: trunk/docs/dev/events.pod
==============================================================================
--- trunk/docs/dev/events.pod Wed Jul 8 01:57:19 2009 (r39943)
+++ trunk/docs/dev/events.pod Wed Jul 8 02:48:40 2009 (r39944)
@@ -31,8 +31,7 @@
=head2 Events
Events can be either timed (they are due after some elapsed time) or untimed.
-For the former there is one API call: B<Parrot_new_timer_event>, used by the
-F<src/dynoplibs/myops.ops>:B<alarm> opcode for testing.
+For the former there is one API call: B<Parrot_new_timer_event>
=head2 The B<event_thread>
Deleted: trunk/src/dynoplibs/myops.ops
==============================================================================
--- trunk/src/dynoplibs/myops.ops Wed Jul 8 02:48:40 2009 (r39943)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,49 +0,0 @@
-/*
- Copyright (C) 2003-2009, Parrot Foundation.
- $Id$
-*/
-
-#include "parrot/dynext.h"
-#include <stdlib.h>
-
-VERSION = PARROT_VERSION;
-
-=head1 NAME
-
-myops.ops - Sample Dynamic Opcodes
-
-=cut
-
-=head1 DESCRIPTION
-
-A dynamic oplib loadable at demand.
-
-=cut
-
-=head1 Essential ops
-
-=over 4
-
-=item B<fortytwo>(out INT)
-
-The famous and ever wanted opcode, proposed by Jos Visser in
-"We *need* this op! :-)".
-
-=cut
-
-inline op fortytwo(out INT) {
- $1 = 42;
-}
-
-=back
-
-=cut
-
-# vim: sw=4
-
-/*
- * Local variables:
- * c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */
Copied and modified: trunk/src/dynoplibs/obscure.ops (from r39935, trunk/src/ops/obscure.ops)
==============================================================================
--- trunk/src/ops/obscure.ops Tue Jul 7 17:14:49 2009 (r39935, copy source)
+++ trunk/src/dynoplibs/obscure.ops Wed Jul 8 02:48:40 2009 (r39944)
@@ -17,6 +17,10 @@
Parrot's library of obscure ops.
+To use this library of ops, add this directive to your PIR:
+
+ .loadlib 'obscure_ops'
+
=cut
Deleted: trunk/src/ops/obscure.ops
==============================================================================
--- trunk/src/ops/obscure.ops Wed Jul 8 02:48:40 2009 (r39943)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,115 +0,0 @@
-/*
- * $Id$
-** obscure.ops
-*/
-
-#include <math.h>
-
-VERSION = PARROT_VERSION;
-
-=head1 NAME
-
-obscure.ops - Obscure Mathmatical Opcodes
-
-=cut
-
-=head1 DESCRIPTION
-
-Parrot's library of obscure ops.
-
-=cut
-
-
-###############################################################################
-
-=head2 Obscure trigonometric operations
-
-Reference:
-
- Abramowitz, M. and Stegum, C. A. (Eds.). Handbook of Mathematical
- Functions with Formulas, Graphs, and Mathematical Tables, 9th printing.
- New York: Dover, p. 78, 1972.
-
-=over 4
-
-=cut
-
-
-########################################
-
-=item B<covers>(out NUM, in NUM)
-
-Set $1 to the coversine (in radians) of $2.
-
-=cut
-
-inline op covers(out NUM, in NUM) :advanced_math {
- $1 = 1.0 - sin($2);
-}
-
-
-########################################
-
-=item B<exsec>(out NUM, in NUM)
-
-Set $1 to the exsecant of $2 (given in radians).
-
-=cut
-
-
-inline op exsec(out NUM, in NUM) :advanced_math {
- $1 = (1.0 / cos($2)) - 1.0;
-}
-
-
-########################################
-
-=item B<hav>(out NUM, in NUM)
-
-Set $1 to the haversine (in radians) of $2.
-
-=cut
-
-inline op hav(out NUM, in NUM) {
- $1 = 0.5 * (1.0 - cos($2));
-}
-
-
-########################################
-
-=item B<vers>(out NUM, in NUM)
-
-Set $1 to the versine (in radians) of $2.
-
-=cut
-
-inline op vers(out NUM, in NUM) :advanced_math {
- $1 = 1.0 - cos($2);
-}
-
-
-=back
-
-=cut
-
-
-###############################################################################
-
-=head1 COPYRIGHT
-
-Copyright (C) 2001-2008, Parrot Foundation.
-
-=head1 LICENSE
-
-This program is free software. It is subject to the same license
-as the Parrot interpreter itself.
-
-=cut
-
-
-/*
- * Local variables:
- * c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */
Modified: trunk/t/codingstd/test_file_coverage.t
==============================================================================
--- trunk/t/codingstd/test_file_coverage.t Wed Jul 8 01:57:19 2009 (r39943)
+++ trunk/t/codingstd/test_file_coverage.t Wed Jul 8 02:48:40 2009 (r39944)
@@ -62,8 +62,11 @@
or diag "files in $dynpmc_dir but not in test dir:\n\t@$test_dynpmc_miss";
# Tests in src/dynoplibs
+ {
+ local $TODO = "obscure.ops needs tests. (TT #819)";
ok( !@$test_dynoplibs_miss, "there are test files in $test_dynoplibs_dir for all OPS files" )
or diag "files in $dynoplibs_dir but not in test dir:\n\t@$test_dynoplibs_miss";
+ }
} # PMC
# remember to change the number of tests :-)
Deleted: trunk/t/dynoplibs/myops.t
==============================================================================
--- trunk/t/dynoplibs/myops.t Wed Jul 8 02:48:40 2009 (r39943)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,48 +0,0 @@
-#! perl
-# Copyright (C) 2006-2008, Parrot Foundation.
-# $Id$
-
-use strict;
-use warnings;
-use lib qw( . lib ../lib ../../lib );
-use Test::More;
-use Parrot::Test tests => 1;
-use Parrot::Config;
-
-=head1 NAME
-
-t/dynoplibs/myops.t - Test for the ops in src/dynoplibs/myops.ops
-
-=head1 SYNOPSIS
-
- % prove t/dynoplibs/myops.t
-
-=head1 DESCRIPTION
-
-Tests the sample dynamic op library "myops".
-
-=cut
-
-$ENV{TEST_PROG_ARGS} ||= '';
-
-my $is_ms_win32 = $^O =~ m!MSWin32!;
-my $is_mingw = $is_ms_win32
- && grep { $PConfig{cc} =~ /\b$_\b/ } qw(gcc gcc.exe);
-
-pir_output_is( <<'CODE', <<'OUTPUT', 'fortytwo' );
-.loadlib "myops_ops"
-.sub main :main
- $I0 = fortytwo
- print $I0
- print "\n"
-.end
-CODE
-42
-OUTPUT
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Modified: trunk/t/tools/ops2cutils/06-dynamic.t
==============================================================================
--- trunk/t/tools/ops2cutils/06-dynamic.t Wed Jul 8 01:57:19 2009 (r39943)
+++ trunk/t/tools/ops2cutils/06-dynamic.t Wed Jul 8 02:48:40 2009 (r39944)
@@ -34,7 +34,7 @@
|;
use IO::CaptureOutput qw | capture |;
-my @dynopsfiles = qw( src/dynoplibs/myops.ops );
+my @dynopsfiles = qw( src/dynoplibs/obscure.ops );
ok( chdir $main::topdir, "Positioned at top-level Parrot directory" );
my $cwd = cwd();
@@ -55,16 +55,16 @@
}
chdir "src/dynoplibs" or croak "Unable to change to src/dynoplibs: $!";
- test_dynops( [qw( CGoto myops.ops )] );
- test_dynops( [qw( CGP myops.ops )] );
- test_dynops( [qw( C myops.ops )] );
- test_dynops( [qw( CSwitch myops.ops )] );
+ test_dynops( [qw( CGoto obscure.ops )] );
+ test_dynops( [qw( CGP obscure.ops )] );
+ test_dynops( [qw( C obscure.ops )] );
+ test_dynops( [qw( CSwitch obscure.ops )] );
{
my ($self, $stdout, $stderr);
capture(
sub { $self = Parrot::Ops2c::Utils->new( {
- argv => [qw( CSwitch myops.ops myops.ops )],
+ argv => [qw( CSwitch obscure.ops obscure.ops )],
flag => { dynamic => 1 },
} ); },
\$stdout,
@@ -73,7 +73,7 @@
ok( defined $self,
"Constructor correctly returned when provided >= 1 arguments" );
like( $stderr,
- qr/Ops file 'myops\.ops' mentioned more than once!/, "Error message is correct" );
+ qr/Ops file 'obscure\.ops' mentioned more than once!/, "Error message is correct" );
my $c_header_file = $self->print_c_header_file();
ok( -e $c_header_file, "$c_header_file created" );
Modified: trunk/t/tools/ops2cutils/09-dynamic_nolines.t
==============================================================================
--- trunk/t/tools/ops2cutils/09-dynamic_nolines.t Wed Jul 8 01:57:19 2009 (r39943)
+++ trunk/t/tools/ops2cutils/09-dynamic_nolines.t Wed Jul 8 02:48:40 2009 (r39944)
@@ -32,7 +32,7 @@
$num
$skip
|;
-my @dynopsfiles = qw( src/dynoplibs/myops.ops );
+my @dynopsfiles = qw( src/dynoplibs/obscure.ops );
ok( chdir $main::topdir, "Positioned at top-level Parrot directory" );
my $cwd = cwd();
@@ -52,10 +52,10 @@
}
chdir "src/dynoplibs" or croak "Unable to change to src/dynoplibs: $!";
- test_dynops_nolines( [qw( CGoto myops.ops )] );
- test_dynops_nolines( [qw( CGP myops.ops )] );
- test_dynops_nolines( [qw( C myops.ops )] );
- test_dynops_nolines( [qw( CSwitch myops.ops )] );
+ test_dynops_nolines( [qw( CGoto obscure.ops )] );
+ test_dynops_nolines( [qw( CGP obscure.ops )] );
+ test_dynops_nolines( [qw( C obscure.ops )] );
+ test_dynops_nolines( [qw( CSwitch obscure.ops )] );
ok( chdir($cwd), "returned to starting directory" );
}
More information about the parrot-commits
mailing list