r61640 - in /trunk/libclass-xsaccessor-perl: Changes MANIFEST META.yml XSAccessor.xs debian/changelog lib/Class/XSAccessor.pm lib/Class/XSAccessor/Array.pm lib/Class/XSAccessor/Heavy.pm t/40hash_bad_call.t t/41array_bad_call.t
ansgar-guest at users.alioth.debian.org
ansgar-guest at users.alioth.debian.org
Mon Aug 16 04:50:07 UTC 2010
Author: ansgar-guest
Date: Mon Aug 16 04:49:51 2010
New Revision: 61640
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=61640
Log:
TODO: Is #define PERL_CORE safe or not?
Added:
trunk/libclass-xsaccessor-perl/t/40hash_bad_call.t
- copied unchanged from r61639, branches/upstream/libclass-xsaccessor-perl/current/t/40hash_bad_call.t
trunk/libclass-xsaccessor-perl/t/41array_bad_call.t
- copied unchanged from r61639, branches/upstream/libclass-xsaccessor-perl/current/t/41array_bad_call.t
Modified:
trunk/libclass-xsaccessor-perl/Changes
trunk/libclass-xsaccessor-perl/MANIFEST
trunk/libclass-xsaccessor-perl/META.yml
trunk/libclass-xsaccessor-perl/XSAccessor.xs
trunk/libclass-xsaccessor-perl/debian/changelog
trunk/libclass-xsaccessor-perl/lib/Class/XSAccessor.pm
trunk/libclass-xsaccessor-perl/lib/Class/XSAccessor/Array.pm
trunk/libclass-xsaccessor-perl/lib/Class/XSAccessor/Heavy.pm
Modified: trunk/libclass-xsaccessor-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-xsaccessor-perl/Changes?rev=61640&op=diff
==============================================================================
--- trunk/libclass-xsaccessor-perl/Changes (original)
+++ trunk/libclass-xsaccessor-perl/Changes Mon Aug 16 04:49:51 2010
@@ -1,10 +1,16 @@
Revision history for Perl extension Class-XSAccessor.
+1.07 Sun Aug 15 14:41 2010
+ - Include two new test files for the fix in 1.06.
+ - Define PERL_CORE, but *only* while including XSUB.h to get
+ a significant speed-up (see XSAccessor.xs for an explanation).
+ Idea from Chocolateboy. Complaints from rightfully annoyed
+ perl5-porters (in particular but not limited to Nicholas)
+ go to Steffen.
+
1.06 Sat Aug 14 20:21 2010
- - Add sanity checks in the optimized (5.10 and up)
- implementations to make sure we don't segfault on
- $not_a_hashref->accessor
- (Chocolateboy
+ - Add sanity checks to make sure we don't segfault on
+ invalid invocants (chocolateboy)
1.05 Sun Nov 15 12:54 2009
- Minor developer doc tweaks.
@@ -26,7 +32,7 @@
** This release features some very radical changes. Test well. **
- Replace use of perl hashes in the global hash key name storage with
a full-blown, separate implementation of a hash table
- (Steffen, Chocolateboy)
+ (Steffen, chocolateboy)
- Similarly, throw out the SV's for simple C strings.
- Add a global lock for all modifications to global data structures:
- The above three items fix RT #50454 (serious threading issues).
@@ -36,19 +42,19 @@
1.04_02 Mon Sep 7 11:35 2009
** This release features some very radical changes. Test well. **
- Significant optimization by replacing the relevant entersub ops
- with stripped down versions (Chocolateboy)
+ with stripped down versions (chocolateboy)
1.04_01 Mon Sep 7 11:35 2009
** This release features some very radical changes. Test well. **
- - More aggressive OPTIMIZE flags if possible (Chocolateboy)
+ - More aggressive OPTIMIZE flags if possible (chocolateboy)
- Added shorthand syntax for getters, setters, accessors, and predicates
- where the attribute has the same name as the method (Chocolateboy)
+ where the attribute has the same name as the method (chocolateboy)
- Remove dependency on AutoXS::Header.
- Merge Class::XSAccessor::Array into this distribution.
- Refactored the XS to remove duplicate code.
- Refactored the perl code in XSAccessor.pm and Array.pm to remove
duplicate code (=> Heavy.pm).
- - Upgrade Devel::PPPort/ppport.h (Chocolateboy)
+ - Upgrade Devel::PPPort/ppport.h (chocolateboy)
1.04 Thu Jun 11 16:40 2009
- Fix a bunch of warnings thanks to a heads up from
@@ -100,8 +106,8 @@
- Copy input scalars on setter/mutator calls (RT #38573)
0.05 Sat Jun 21 18:06 2008
- - Add read/write accessors. (Chocolateboy)
- - By default, return the new value from setters. (Chocolateboy)
+ - Add read/write accessors. (chocolateboy)
+ - By default, return the new value from setters. (chocolateboy)
- Add predicates, i.e. "has_foo".
0.04 Mon May 3 19:12 2008
Modified: trunk/libclass-xsaccessor-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-xsaccessor-perl/MANIFEST?rev=61640&op=diff
==============================================================================
--- trunk/libclass-xsaccessor-perl/MANIFEST (original)
+++ trunk/libclass-xsaccessor-perl/MANIFEST Mon Aug 16 04:49:51 2010
@@ -27,6 +27,8 @@
t/36array_constructor.t
t/37array_boolean.t
t/38array_use_hash.t
+t/40hash_bad_call.t
+t/41array_bad_call.t
XS/Array.xs
XS/Hash.xs
XSAccessor.xs
Modified: trunk/libclass-xsaccessor-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-xsaccessor-perl/META.yml?rev=61640&op=diff
==============================================================================
--- trunk/libclass-xsaccessor-perl/META.yml (original)
+++ trunk/libclass-xsaccessor-perl/META.yml Mon Aug 16 04:49:51 2010
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Class-XSAccessor
-version: 1.06
+version: 1.07
abstract: Generate fast XS accessors without runtime compilation
author:
- Steffen Mueller <smueller at cpan.org>
Modified: trunk/libclass-xsaccessor-perl/XSAccessor.xs
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-xsaccessor-perl/XSAccessor.xs?rev=61640&op=diff
==============================================================================
--- trunk/libclass-xsaccessor-perl/XSAccessor.xs (original)
+++ trunk/libclass-xsaccessor-perl/XSAccessor.xs Mon Aug 16 04:49:51 2010
@@ -1,7 +1,33 @@
#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
+
+/*
+ * Quoting chocolateboy from his Method::Lexical module at 2009-02-08:
+ *
+ * for binary compatibility (see perlapi.h), XS modules perform a function call to
+ * access each and every interpreter variable. So, for instance, an innocuous-looking
+ * reference to PL_op becomes:
+ *
+ * (*Perl_Iop_ptr(my_perl))
+ *
+ * This (obviously) impacts performance. Internally, PL_op is accessed as:
+ *
+ * my_perl->Iop
+ *
+ * (in threaded/multiplicity builds (see intrpvar.h)), which is significantly faster.
+ *
+ * defining PERL_CORE gets us the fast version, at the expense of a future maintenance release
+ * possibly breaking things: http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2008-04/msg00171.html
+ *
+ * Rather than globally defining PERL_CORE, which pokes its fingers into various headers, exposing
+ * internals we'd rather not see, just define it for XSUB.h, which includes
+ * perlapi.h, which imposes the speed limit.
+ */
+
+#define PERL_CORE
#include "XSUB.h"
+#undef PERL_CORE
#include "ppport.h"
Modified: trunk/libclass-xsaccessor-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-xsaccessor-perl/debian/changelog?rev=61640&op=diff
==============================================================================
--- trunk/libclass-xsaccessor-perl/debian/changelog (original)
+++ trunk/libclass-xsaccessor-perl/debian/changelog Mon Aug 16 04:49:51 2010
@@ -1,4 +1,6 @@
-libclass-xsaccessor-perl (1.06-1) unstable; urgency=low
+libclass-xsaccessor-perl (1.07-1) unstable; urgency=low
+
+ TODO: Is #define PERL_CORE safe or not?
[ gregor herrmann ]
* Set Standards-Version to 3.9.1; replace Conflicts with Breaks.
Modified: trunk/libclass-xsaccessor-perl/lib/Class/XSAccessor.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-xsaccessor-perl/lib/Class/XSAccessor.pm?rev=61640&op=diff
==============================================================================
--- trunk/libclass-xsaccessor-perl/lib/Class/XSAccessor.pm (original)
+++ trunk/libclass-xsaccessor-perl/lib/Class/XSAccessor.pm Mon Aug 16 04:49:51 2010
@@ -7,7 +7,7 @@
use Carp qw/croak/;
-our $VERSION = '1.06';
+our $VERSION = '1.07';
require XSLoader;
XSLoader::load('Class::XSAccessor', $VERSION);
Modified: trunk/libclass-xsaccessor-perl/lib/Class/XSAccessor/Array.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-xsaccessor-perl/lib/Class/XSAccessor/Array.pm?rev=61640&op=diff
==============================================================================
--- trunk/libclass-xsaccessor-perl/lib/Class/XSAccessor/Array.pm (original)
+++ trunk/libclass-xsaccessor-perl/lib/Class/XSAccessor/Array.pm Mon Aug 16 04:49:51 2010
@@ -5,7 +5,7 @@
use warnings;
use Carp qw/croak/;
-our $VERSION = '1.06';
+our $VERSION = '1.07';
require Class::XSAccessor;
require Class::XSAccessor::Heavy;
Modified: trunk/libclass-xsaccessor-perl/lib/Class/XSAccessor/Heavy.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-xsaccessor-perl/lib/Class/XSAccessor/Heavy.pm?rev=61640&op=diff
==============================================================================
--- trunk/libclass-xsaccessor-perl/lib/Class/XSAccessor/Heavy.pm (original)
+++ trunk/libclass-xsaccessor-perl/lib/Class/XSAccessor/Heavy.pm Mon Aug 16 04:49:51 2010
@@ -5,7 +5,7 @@
use warnings;
use Carp;
-our $VERSION = '1.06';
+our $VERSION = '1.07';
our @CARP_NOT = qw(
Class::XSAccessor
Class::XSAccessor::Array
More information about the Pkg-perl-cvs-commits
mailing list