view release on metacpan or search on metacpan
.gdb/dashboard view on Meta::CPAN
@staticmethod
def complete(word, candidates):
matching = []
for candidate in candidates:
if candidate.startswith(word):
matching.append(candidate)
return matching
@staticmethod
def parse_arg(arg):
# encode unicode GDB command arguments as utf8 in Python 2.7
if type(arg) is not str:
arg = arg.encode('utf8')
return arg
# Module descriptor ------------------------------------------------------------
class ModuleInfo:
def __init__(self, dashboard, module):
self.name = module.__name__.lower() # from class to module name
ByteLoader/ppport.h view on Meta::CPAN
parse_fullexpr||5.013008|
parse_fullstmt||5.013005|
parse_gv_stash_name|||
parse_ident|||
parse_label||5.013007|
parse_listexpr||5.013008|
parse_lparen_question_flags|||
parse_stmtseq||5.013006|
parse_subsignature|||
parse_termexpr||5.013008|
parse_unicode_opts|||
parser_dup|||
parser_free_nexttoke_ops|||
parser_free|||
path_is_searchable|||n
peep|||
pending_ident|||
perl_alloc_using|||n
perl_alloc|||n
perl_clone_using|||n
perl_clone|||n
ByteLoader/ppport.h view on Meta::CPAN
#endif
#ifndef PERL_PV_PRETTY_DUMP
# define PERL_PV_PRETTY_DUMP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_QUOTE
#endif
#ifndef PERL_PV_PRETTY_REGPROP
# define PERL_PV_PRETTY_REGPROP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE
#endif
/* Hint: pv_escape
* Note that unicode functionality is only backported to
* those perl versions that support it. For older perl
* versions, the implementation will fall back to bytes.
*/
#ifndef pv_escape
#if defined(NEED_pv_escape)
static char * DPPP_(my_pv_escape)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags);
static
#else
extern char * DPPP_(my_pv_escape)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags);
cache gv_stashpv calls.
Fix 5.22 for empty hash keys, share_hek("") (272, GH#249)
Fixed refcounts for shared hek's, fixing the notorious unshare_hek assertions
since 5.10 (GH #251, #255). See 1.06: "Had to disable -O1 -fcog (pv_copy_on_grow)
on 5.10 and higher until I find out how to fool S_unshare_hek_or_pvn. This fixes
all C -O1 and -O2 tests. Warn about this."
Fix Inf/NaN support for C (GH#287)
Fix handling of READONLY hashes in 5.22, i.e. use feature (GH#250)
Support custom op Devel_Peek_Dump, added with 5.20 (GH#274)
Defer regex compilation to new init1 for SWASHNEW (GH#273)
Support unicode labels (upstream B bug) (GH#318)
Skip unneeded init-time lexwarn checks,
support optimized cperl PERL_SUPPORT_STATIC_COP (cperl #70)
Fixed overload stringify broken since 5.18 (GH #219)
by adding a mro_isa_changed_in() to the overloaded stash.
Support multiple stash ENAMES, needed since 5.14 (GH #331)
This fixed many old 5.14 limitations. (Added to our version of B)
Support %^H, storing the hints_hash (features, pragmas) (GH#220)
This fixed many old 5.14 limitations.
Improve MATCH once (m??) handling with reset, find PMOP from
the Regexp dynamically (GH#252)
Bump refcounts of dynamic get_cv refs (#293). Fixes Coro in global destruction.
Skip more XS defined POSIX constants: all that start with 'M' (GH#335, #345)
One more "Eval-group not allowed at runtime" fix (GH#137, GH#346)
* CC (1.16_01): Encode unicode labels (GH#318)
* Stackobj (1.12_01): fix Inf/NaN support for CC (GH#287)
* t/CORE: versioned the core tests and moved to a external submodule
perl11/p5-coretests on github. (GH#332)
1.52 2014-09-09 rurban
* C: Protect against empty SV ptr in SV magic (\0) with $` with 5.20 (#370)
Save new pmop (?{}) code_list with 5.18 (#372)
Unset PL_use_safe_putenv as in perlmain, which initializes PL_origalen properly,
which fixes setting long a $0 string (#194)
Force Moose when only Class::MOP is loaded to give the needed path hint to XSLoader,
perl 5.16.0 shipped a slightly broken B without cop_stashlen. As workaround
we do not support utf8 stashes nor null bytes in stashes on 5.16.0 threaded.
Fixed Null COP storage for 5.16 and 5.17
Fix amagic_generation which was removed with 5.17
Fix ALLOW_PERL_OPTIONS: add -e behind all processed options, not before
Fixed HvAUX init. Previously only with magic hashes, now on all OOK hashes (OOK+SHAREKEYS)
e.g. %warning::Bits
Added support for new PADLIST type since 5.17.4 (with xpadl_id) and 5.17.6 (without)
$^X returns now the real executable name, not just perl or perl.exe
Adjust COW string lengths to hold the COW_REFCNT byte at the end
Fix unicode string CUR and LEN (#142, #162)
Fix unicode hashkeys (HEK) mostly (#200), but not yet testc.sh 2001 (compile-time
stored utf8 heks)
Save HvTOTALKEYS at run-time as max added to the number of run-time added keys (#178)
Fix UV uvuformat on 32bit -Duse64bitint (#145)
op_pmreplstart is now run-time initialized >= 5.10 (#160)
Fixed special usage of magic vars @-,@+,%+,$-,$! (#90)
Fixed wrong REGEXP length for compiled QR data (#143)
Fixed wrong -O3 comparison of strings to numbers (#138,#141, branch new-cog), unified
PV handling, disabled -fcog replaced by -O3 -fconst-strings
Fixed NUL-byte handling in strings by using B::SV->PV instead of PVX (#237)
Storing now bareword filehandles (#148,#149)
Makefile.PL view on Meta::CPAN
$conf =~ s/}\s*$/);/;
}
print PH "our \%Config = $conf\n";
print PH "\n";
print PH "1;\n";
close PH;
chmod 0644, "lib/B/C/Config.pm";
}
# XXX Check for 5.16.0 B-1.34 and offer to patch it? rather use `perlall build --patches=Compiler`
my $unicode_warning =
" Perl handling of new unicode identifiers - package and symbol names - \n".
" without proper TR39 handling is considered a security risc and is not fully supported.\n".
" See http://websec.github.io/unicode-security-guide/\n\n";
if ($ENV{PERL_CORE}) {
# supress the TR39 warnings in core
}
elsif ($] > 5.015005 and $] < 5.019004) {
# We do not want to support binary identifiers. syscalls with 5.019004 should be enabled
warn "Warning: Bad perl version $]\n".
$unicode_warning.
" Check your code for syntax spoofs, confusables, esp. strip \\0 from package names.\n";
} elsif ($] >= 5.019004 and !($Config{usecperl} and $] >= 5.025002)) {
warn "Warning:\n".
$unicode_warning.
" Check your code for syntax spoofs, confusables, strip \\0 from package names.\n".
($Config{usecperl} ? "" :
" Enable use warnings 'syscalls'.\n");
}
my $carp_warning =
" Perl5 broke Carp for the compiler with 5.26 with a dynamic _fetch_sub()\n".
" Either use an earlier Carp (<1.42) or check the cperl patches, replacing it\n".
" with a simple version check.\n";
if ($] >= 5.025004 and !$Config{usecperl}) {
warn "Warning: Unsupported perl version $]\n".
perl Makefile.PL FIXIN="perl -S pl2bat.bat"
On Windows and AIX for 5.12 and 5.14 you need to patch and rebuild CORE perl:
ramblings/Export-store_cop_label-for-the-perl-compiler.patch
For 5.14 and 5.15 I recommend also the following patches:
ramblings/revert-B-load-BEGIN.patch (The 5.14.1 version)
ramblings/Carp-wo-B.patch
We generally discourage the use of perl since 5.16 unhandled and
unacknowledged security problems with the implementation of "unicode"
symbols and packagenames, where they really implemented binary names
for all symbols without any checks and further support of such binary
names. Identifiers are not identifiable anymore.
See the warning at perl Makefile.PL.
5.20 improved support for binary names for most syscalls, dumpers and
APIs, but TR39 and strict names are still not handled, the problems
are not understood and reactions are generally hostile.
5.18 made it 20% bigger with the implementation of COW strings.
Most strings cannot be stored statically anymore since then.
The best perl versions for the compiler are 5.14.4, 5.22.1 and cperl,
The old core compiler fails for 50% of the testcases.
Windows and other OS with strict linking <5.16 will fail to install due to some
not exported libperl symbols. Looks at the patches in ramblings or use cperl,
which includes the compilers.
Security:
The latest released compiler version is only recommended up to 5.14.4 or cperl.
Newer perl versions do work, but 5.16-5.30 upstream are too insecure
to be recommended for production.
5.20 finally properly handles unicode names, but identifiers and package
names are still handled as binary blobs, which could lead to TR39 issues.
Check your code automatically (not manually, because new identifiers
are not identifiable anymore) for syntax spoofs, confusables, strip
\\0 from package names and enable use warnings 'syscalls'.
See http://websec.github.io/unicode-security-guide/
cperl since 5.26 fixed all the known issues.
C and CC: Same ok and less failures as with 5.6, 5.8 and 5.9.4.
In 5.8.8 and 5.8.9 we have much less errors in the testsuite for the
new CPAN compiler and the CORE compiler. See below.
Most B::C and B::CC bugs fixed.
Compatibility added for all major releases since 5.6.2
Open Problems for B::C:
static strings and heks with LEN=0
restore of many more dynamic magic variables: @+,@-,$$,${^UNICODE} ${^UTF8LOCALE}
$; $\ $, $/ $" $| $^A $^L $: $% $- $= $^H $^R
and allow other GP entries for ENV, ARGV, ...
do not set newGP for symbols, thus do not disturb pre-initialization, esp. XS CVs
do not boot internal core XS packages twice
better load-order for dynaloaded modules, which helps esp. on windows
improved deeper walker, detect more missing empty packages
HvAUX init without magic (iterators)
new PADLIST type
unicode and binary strings and heks
COW support
proper len of QR refs
stash symtab magic for PMf_ONCE m?? and reset
lexwarns
(See Changes for all fixes)
fixed with 1.42:
my_share_hek (global destruction)
Turn off CvDYNFILE
save @ISA of empty child classes
if $mainfile eq $op->file and $op->stashpv ne ($module ? $module : 'main');
}
savesym( $op, "(OP*)&cop_list[$ix]" );
}
# if REGCOMP can be called in init or deferred in init1
sub re_does_swash {
my ($qstr, $pmflags) = @_;
# SWASHNEW, now needing a multideref GV. 0x5000000 is just a hack. can be more
if (($] >= 5.021006 and ($pmflags & 0x5000000 == 0x5000000))
# or any unicode property (#253). Note: \p{} breaks #242
or ($qstr =~ /\\P\{/)
)
{
return 1;
} else {
return 0;
}
}
sub B::PMOP::save {
print sprintf(qq{ sv_setpv_mg(get_svs("0", GV_ADD|GV_NOTQUAL), %s);\n}, $dollar_0);
print sprintf(qq{ CopFILE_set(&PL_compiling, %s);\n}, $dollar_0);
}
else {
#print q{ warn("PL_origalen=%d\n", PL_origalen);},"\n";
print qq{ sv_setpv_mg(get_svs("0", GV_ADD|GV_NOTQUAL), argv[0]);\n};
print qq{ CopFILE_set(&PL_compiling, argv[0]);\n};
}
# more global vars
print " PL_hints = $^H;\n" if $^H;
print " PL_unicode = ${^UNICODE};\n" if ${^UNICODE};
# system-specific needs to be skipped: is set during init_i18nl10n if PerlIO
# is compiled in and on a utf8 locale.
#print " PL_utf8locale = ${^UTF8LOCALE};\n" if ${^UTF8LOCALE};
#print " PL_utf8cache = ${^UTF8CACHE};\n" if ${^UTF8CACHE};
# nomg
print sprintf(qq{ sv_setpv(get_svs(";", GV_ADD|GV_NOTQUAL), %s);\n}, cstring($;)) if $; ne "\34";
print sprintf(qq{ sv_setpv(get_svs("\\"", GV_NOTQUAL), %s); /* \$" */\n}, cstring($")) if $" ne " ";
# global IO vars
if ($PERL56) {
print sprintf(qq{ PL_ofs = %s; PL_ofslen = %u; /* \$, */\n}, cstring($,), length $,) if $,;
perlcompile.pod view on Meta::CPAN
save-data Save package::DATA filehandles ( only available with PerlIO::scalar )
ppaddr Optimize the initialization of op_ppaddr.
warn-sv Optimize the initialization of cop_warnings.
av-init Faster initialization of AVs.
av-init2 Initialization of AVs via ptmalloc3 independent_comalloc().
use-script-name Use the script name instead of the program name as $0.
ro-inc Readonly @INC and %INC pathnames.
const-strings Declares static readonly strings as const.
save-sig-hash Save compile-time modifications to the %SIG hash.
no-destruct Faster destruction.
no-fold Do not compile unicode foldings tables, needed for m//i
no-warnings Do not compile warnings hashes.
stash Add all stash hashes even if not used.
no-delete-pkg Do not delete compiler-internal and dependent packages.
no-dyn-padlist Disable dynamic padlists (5.18). This is faster but might cause
die and exit to crash.
cop Omit COP, no file+line info for warnings
-On Optimisation level (n = 0, 1, 2, ...). -O means -O1.
-O1 -fcog -fav-init2/-fav-init -fppaddr -fwarn-sv
-O2 -O1 -fro-inc -fsave-data
-O3 -O2 -fsave-sig-hash -fno-destruct fconst-strings
ramblings/next-steps.md view on Meta::CPAN
array autovivification, which slows down run-time so much as
benchmarked in my YAPC::EU 2013 talk.
So the plan is to compile to several optimized libraries seperately
and link them together later. For binaries which fork or which need to
be updated pretty often, shared libraries are preferred, for other
simple binaries static libraries are preferred as they are loaded much
faster. Shared libraries can be updated much easier, and when you
fork a binary, its shared libraries are shared, there's no seperate
copy in memory. This is also one of the main reasons to change our
current perl5 unicode implementation from simple and slow perl data
structures, to compiled shared libraries, which are just mapped in
when needed and can be shared.
Data::Compile
-------------
But first some other steps are needed. Before we create shared
libraries for perl packages we want to compile only some read-only
datastructures, hashes mainly. The name of this module is
Data::Compile and will replace our current cdb databases for
ramblings/next-steps.md view on Meta::CPAN
anagrams or weird keys), to create optimally fast C libraries or
optimally small C libraries for fast hash lookups, and even provide
backends to output perfect hashes for several popular programming
languages, like perl (XS), java, ruby, php or python. As C library
you can only store strings as keys, and integers and strings as
values. With those other backends you can store all supported values.
Perfect hashes look differently on small 8-bit machines than on fast
x86_64 machines, for static libraries or for shared libraries with
`-fPIC`, for <1000 keys or for >1.000.000 keys, for keys with NUL
characters or not, for 7-bit keys only, for unicode keys, for
case-insensitive key lookup, and much more. Using a high-level
language to analyze the keys to generate a good perfect hash (in this
case perl) is much easier than fixing and enhancing gperf.
The other main problem is `icu` which is a collection of glorified but
moderately efficient hashmaps of unicode tables and the even worse
perl5 implementation of those unicode tables. Encode does it much
better by pre-compiling encoding tables into good shared libraries,
but unicode has much more tables than just encodings. `parrot`
currently uses icu with a new `gperf` generated workaround for missing
tables in icu (the not-existing whitespace class and missing
namealiases which were broken in icu 5.0), and `moarvm` came up with
it's own implementation of those tables to workaround icu
deficiencies.
So far I have re-implemented the best algorithms to create and use
perfect hashes in pure perl and optimized it with XS functions and I
am able to create good C code. I am still testing optimal hash
functions and strategies. I need only ~2 seconds to create a perfect
ramblings/remark.js view on Meta::CPAN
require=function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=typeof require=="function"&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0].call(u.exports,function(t)...
this.QUOTE_STRING_MODE={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[this.BACKSLASH_ESCAPE]};this.PHRASAL_WORDS_MODE={begin:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such)...
SUBST.contains=EXPRESSIONS;return{aliases:["coffee","cson","iced"],keywords:KEYWORDS,contains:EXPRESSIONS.concat([{className:"comment",begin:"###",end:"###"},hljs.HASH_COMMENT_MODE,{className:"function",begin:"("+JS_IDENT_RE+"\\s*=\\s*)?(\\(.*\\))?\\...
}()},{}],8:[function(require,module,exports){exports.addClass=function(element,className){element.className=exports.getClasses(element).concat([className]).join(" ")};exports.removeClass=function(element,className){element.className=exports.getClasse...
events.on("slideChanged",updateHash);navigateByHash()}function navigateByHash(){var slideNoOrName=(dom.getLocationHash()||"").substr(1);events.emit("gotoSlide",slideNoOrName)}function updateHash(slideNoOrName){dom.setLocationHash("#"+slideNoOrName)}}...
ramblings/yapceu2015.html view on Meta::CPAN
We skipped all versions from 5.16 to 5.20, since they got worse
in almost all aspects: memory, security, compiler API.
But with the monomorphic inline cache patch by Oleg Pronin early 2015
and the :const attribute in core (for anonsubs, but we took the syntax),
5.22 became the next realistic target to aim for.
---
# Next goal
Even with several major blocks (p5p, unicode bloat, COW,
SVf\_PROTECT, @\_ in sigs), I started working on a fixed and improved
perl version in Feb 2015. <!-- Starting with my early 2012 type system
work which had no chance to get accepted or even discussed with p5p.-->
:const made it possible.
---
# Next goal
Compiling >5.14 with perl5 proper is not worthwhile. 5.22 maybe without COW.
But targetting our improved version based on 5.22 and coretypes is.
t/issue206.t view on Meta::CPAN
#! /usr/bin/env perl
# GH #208 utf8 symbols and stashes > 5.16
# get_cvn_flags, gv_fetchpvn_flags, gv_stashpvn_flags
use strict;
BEGIN {
unshift @INC, 't';
require TestBC;
}
use Test::More;
plan skip_all => 'unicode symbols with 5.16' if $] < 5.016;
plan tests => 3;
use B::C ();
my $todo = ($B::C::VERSION lt '1.52_03' ? "TODO " : "");
ctestok(1,'C','ccode206i',<<'EOF',$todo.'#206 utf8 symbols');
use utf8;package í
Å£::á´¼; sub á´¼_or_Ḡ{ "ok" } print á´¼_or_á¸;
EOF
ctestok(2,'C,-O3','ccode206i',<<'EOF',$todo.'#206 utf8 symbols');
use utf8;package í
Å£::á´¼; sub á´¼_or_Ḡ{ "ok" } print á´¼_or_á¸;
t/issue240.t view on Meta::CPAN
# not repro. fails only as file
use strict;
BEGIN {
unshift @INC, 't';
require TestBC;
}
use Test::More;
#plan skip_all => "no 5.26 support yet" if $] > 5.025003;
plan tests => 1;
ctestok(1,'C,-O3','ccode240i',<<'EOF','#240 not repro unicode race condition with \U');
my $a = "\x{100}\x{101}Aa";
print "ok\n" if "\U$a" eq "\x{100}\x{100}AA";
my $b = "\U\x{149}cD"; # no pb without that line
__END__
EOF
t/issue245.t view on Meta::CPAN
#! /usr/bin/env perl
# http://code.google.com/p/perl-compiler/issues/detail?id=245
# unicode value not preserved when passed to a function with -O3
# lc("\x{1E9E}") and "\x{df}" were hashed as the same string in const %strtable
use strict;
use Config;
my @plan;
BEGIN {
if ($ENV{PERL_CORE}) {
unshift @INC, ('t', '../../lib');
} else {
unshift @INC, 't', "blib/arch", "blib/lib";
}
t/issue245.t view on Meta::CPAN
}
}
use Test::More @plan;
use B::C;
# passes threaded and <5.10
my $fixed_with = "1.42_70";
my $TODO = "TODO " if $B::C::VERSION lt $fixed_with;
$TODO = "" if $Config{useithreads};
$TODO = "" if $] < 5.010;
my $todomsg = '#245 2nd static unicode char';
# this is now with 5.24.0.c also a test for FAKE_SIGNATURES
ctest(1,"b: 223", 'C,-O3','ccode245i', <<'EOF', $TODO.$todomsg);
sub foo {
my ( $a, $b ) = @_;
print "b: ".ord($b);
}
foo(lc("\x{1E9E}"), "\x{df}");
EOF
t/issue98.t view on Meta::CPAN
use Config;
# New bug reported by Zloysystem
# This is common-sense.pm
my $source = 'BEGIN {
local $^W; # work around perl 5.16 spewing out warnings for next statement
# use warnings
${^WARNING_BITS} ^= ${^WARNING_BITS} ^ "";
# use strict, use utf8; use feature;
$^H |= 0x1c820ec0;
@^H{qw(feature___SUB__ feature_fc feature_unicode feature_evalbytes feature_say feature_state feature_switch)} = (1) x 7;}
sub test { eval(""); }
print q(ok);';
# old bug reported by Zloysystem
#$source = "use strict; eval(\@_);print q(ok);";
open F, ">", "$name.pl";
print F $source;
close F;
my $expected = "ok";