Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

1.43 release: doc updates and version bump

  • Loading branch information...
commit ee7b67058f47d4d35ffb587977869c0d25a53a83 1 parent 9aeadd6
@rurban authored
Showing with 99 additions and 228 deletions.
  1. +1 −1  Changes
  2. +11 −19 README
  3. +65 −179 STATUS
  4. +21 −28 Todo
  5. +1 −1  lib/B/C.pm
View
2  Changes
@@ -50,7 +50,7 @@
of NULL vs &PL_sv_undef (save_pv_or_rv => savesym, cur, len, pv, static)
Restore $^H, the numeric value of global warnings flags (#193,#207,#243)
Restore more missing globals: ${^UNICODE} ${^UTF8LOCALE} $; $\ $, $/ $" $|
- $^A $^L $: $^ $^ $^ $% $- $= if set in a BEGIN block or via cmdline (#256,#231)
+ $^A $^L $: $^H $^R $% $- $= if set in a BEGIN block or via cmdline (#256,#231)
Restore even deprecated vars $] $# $* (#171)
Fix HvAUX memory corruption, accessing HvAUX beyond HE fields, esp. with threaded perls.
Initialize now HvAUX backref and mro_meta fields.
View
30 README
@@ -2,13 +2,12 @@
Copyright (c) 1996, 1997, Malcolm Beattie
Copyright (c) 2008, 2009, 2010, 2011 Reini Urban
+ Copyright (c) 2012, 2013, 2014 cPanel Inc
Homepage: http://www.perl-compiler.org/
Releases: http://search.cpan.org/dist/B-C/
-Code: http://code.google.com/p/perl-compiler/
- git clone https://code.google.com/p/perl-compiler/
-was previously:
- svn checkout http://perl-compiler.googlecode.com/svn/trunk/ perl-compiler
+Code: http://github.com/rurban/perl-compiler/
+ and mirrored at http://code.google.com/p/perl-compiler/
INSTALL
@@ -28,11 +27,11 @@ USAGE
The Bytecode, C and CC backends are now all functional
enough to compile almost the whole of the main perl test
-suite and 97-100% of the top100 modules.
+suite and 99-100% of the top100 modules.
In the case of the CC backend, any failures are all
-due to differences and/or known bugs documented below. See
-the file TESTS.
+due to differences and/or known bugs documented below.
+See the file TESTS.
(1) To compile perl program foo.pl with the C backend, do
@@ -160,6 +159,8 @@ cc linking. Then add the appropriate -L and -l options to your
You may also need to fix up some platform-dependent environment variable
to ensure that linked-against .so files are found at runtime too.
+Read about perlcc --staticxs
+
DIFFERENCES
The result of running a CC compiled Perl program can sometimes be different
@@ -223,8 +224,8 @@ Deprecated features
STATUS
-C and Bytecode works fine, best with non-threaded perls. 3-4% fails on the top100 modules.
-CC fails on some tests. See Todo.
+C is stable, CC is unstable.
+Bytecode stable until 5.16
The Bytecode compiler is disabled for 5.6.2, use the default instead.
See STATUS for details.
@@ -235,12 +236,6 @@ Here are some things which may cause the compiler problems.
The following render the compiler useless (without serious hacking):
-* Use of the DATA filehandle (via __END__ or __DATA__ tokens) on earlier
- Perl versions withotu IO::Scalar. See test 15.
-* Operator overloading with %OVERLOAD
-* The (deprecated) magic array-offset variable $[ does not work
-* For -O1 and -O2 copy-on-grow of static pvs and heks since 5.10 is disabled.
- Fixes of the destruction failures there is work in progress.
* The following operators are not yet implemented for CC
goto
continue/next/last to a outer LABEL
@@ -253,12 +248,9 @@ The following may give significant problems:
and NOT executed at run-time.
* Code which is only ever referred to at runtime (e.g. via eval "..." or
via method calls): see the -u option for the C and CC backends.
-* Run-time lookups of lexical variables in "outside" closures
The following may cause problems (not thoroughly tested):
-* Dependencies on whether values of some "magic" Perl variables are
- determined at compile-time or runtime.
* For the C and CC backends: compile-time strings which are longer than
your C compiler can cope with in a single line or definition.
* Reliance on intimate details of global destruction
@@ -294,7 +286,7 @@ LICENSE
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
Reini Urban
-2011-04-21
+2014-01-15
Malcolm Beattie
2 September 1996
View
244 STATUS
@@ -1,37 +1,38 @@
5.8, 5.6 and earlier had a good core perl compiler, but we are much better.
B::C is stable and used in production for -O0 and -O3. For bigger programs
-not all methods in certain packages are detected, you'd need to add them via
--u<packagename>.
+not all methods in certain packages might be detected, you'd need to add them
+manually via -u<packagename>.
B::CC is very unstable, work is in progress. Certain alioth benchmarks are 6x faster.
Recursive function calls and certain dynamic ops are not yet supported.
-The Bytecode compiler is only stable for >=5.8, non-debugging, threaded. The
+The Bytecode compiler is only stable for >=5.8 except 5.18 threaded. The
CPAN Bytecode compiler is disabled for 5.6, we keep the old. The old core
compiler fails for 50% of the testcases.
-Windows and other OS with strict linking will fail to install due to some
+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.
-Windows: Bad luck. perl 5.16 has finally all needed symbols exported, but the
-5.16 perl releases are considered too insecure to be recommended for production.
-
-Security: The latest released compiler version 1.42 is only supported up to 5.14.2.
-5.16.x, 5.14.3 and 5.12.5 are too insecure to be recommended for production.
+Security: The latest released compiler version 1.43 is only supported up to 5.14.4.
+5.16.x and 5.18.x upstream are too insecure to be recommended for production.
+5.20 will finally properly handle unicode names, but identifiers and package
+names are still handled as binary blobs, which could lead to TR39 issues.
+Check your code for syntax spoofs, confusables, strip \\0 from package names
+and enable use warnings 'syscalls'. There is no strict 'names' pragma yet.
+See http://websec.github.io/unicode-security-guide/
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.
-5.10 + 5.12 + 5.14 + 5.16 + 5.18 compatibility added.
+Compatibility added for all major releases since 5.6.2
Open Problems for B::C:
See google issues.
- 5.16 not yet supported in the stable 1.42 release, only git master.
-See below at the detailed 5.6, 5.8, 5.10, 5.12, 5.14, 5.16, 5.17.6 status
+See below at the detailed status of the major releases.
TEST STATUS
-----------
@@ -80,93 +81,82 @@ B::C (new)
----
t/testc.sh -q -c; t/testcc.sh -q -c or make test TEST_VERBOSE=1
-5.6.2:
-t/bytecode broken/not used
-t/c 15,41-43,50
-t/c_o1,2 +44,45
-t/cc 15,21,30,35,41-46,50,103-105
-
-5.8.[45]:
-t/bytecode -
-t/c -
-t/cc 3,7,15,21,27,29,30,44-46,50,103,105
-
-5.8.9:
-t/bytecode -
-t/c -
-t/cc 21,30,46,50,103,105
-
-5.10.1:
-t/bytecode 27,42,43
-t/c -
-t/cc 14,21,30,46,50,103,105
-
-5.12.4:
-t/bytecode 32,46
-t/c 21
-t/cc 14,21,30,46,50,103,105
-
-5.14.2:
-t/bytecode 27,46
-t/c -
-t/cc 14,21,30,46,50,103,105
-
-5.16.1:
-t/bytecode 27,46
-t/c -
-t/cc 14,21,30,46,50,103,105
-
+See t/test.pl for the TODO tests:
+Only 42..43 < 5.12
CPAN Modules
------------
See t/modules.t:is_todo() We only try to compile use module, not the testsuite.
-We only try B::C so far.
+We only try B::C with -O3 so far.
The full module testsuite is run with t/testm.sh -t [OPTS] Module
Compile-time status from top100:
-generally: pass 100%
-5.6.2 pass 100%
-5.8.9 pass 100%
-5.10.1 pass 100%
-5.12.4 pass 100%
-5.14.2 pass 100%
-5.16.1 fail 4% (unshare_hek) Moose MooseX::Types DateTime DateTime::TimeZone
-5.17.6 ??
+5.6.2 fail 1% Sub::Name
+5.8.5 fail 1% DateTime
+5.8.8 fail 1% Test::Tester
+5.8.9 fail 3% Moose MooseX::Types DateTime
+5.10.1 pass 100% (but PMOP->pregcomp is broken)
+5.12.5 fail 1% ExtUtils::CBuilder
+5.14.4 pass 100%
+5.16.3 fail 1% Module::Build
+5.18.2 fail 2% ExtUtils::ParseXS Module::Build
Run-time tests not yet fully done
-5.19.x status
+5.19.8 status
-----------
-PADLIST support not yet stable.
+Bytecode is better than 5.18 but still unstable, B::CC also
5.18 status
-----------
-PADLIST support not yet stable.
-op_static fixed since 5.17.6, 5.17.2-5.17.5 are unusable without -fno-destruct
+Bytecode is broken for threaded perls, B::CC worse than with 5.14
-5.16 status
------------
-new XSLoader:load_file
-hang at hfree_next_entry issue78 (runtime load of Carp), esp. problematic non-debugging
-unshare_hek issues in dynamic scope
-
-5.10, 5.12, 5.14 status
+5.10, 5.12, 5.14, 5.16 status
-----------------------
TODO for B::C
- tests 21,41-43: B destruction,46,50
- Encode qr-copy issue 71
- restricted hashes in 5.10.0
- r-magic (e.g. Template::Stash 5.10.0 only)
- check t/testcore and testm.sh -t
- see google issues (71,59)
+ see google issues https://code.google.com/p/perl-compiler/issues/
+ Most of them have either easy workarounds or are not fixable.
Fix CC
several other issues detected (and mostly fixed) by Heinz Knutzen
minimize pad copies from local to pad
label not defined (utf8::SWASHNEW)
+ -faelem is fast but still a bit unstable
+ -funroll-loops by Will Braswell not yet merged
DONE
----
+fixed with 1.43:
+ 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
+
+fixed with 1.40:
+ static PerlIO Layers
+ synced %INC
+ defer eval section after dl_init
+
+fixed with 1.39:
+ improved eval AUTOLOAD
+
fixed with 1.37:
fixed wrong test 46, test for Exporter STASH in *main:: STASH
copy-on-grow with LEN=0 and FAKE clash with share_hek
@@ -293,93 +283,6 @@ cop_io status?
I've restored full 5.8 backwards compatibility, mainly for test comparison.
But since the new B::C compiler is better than the CORE compiler, it is installed.
-Details
---------
-Test::Harness:
-t/testm.sh -D- Test::Harness; gdb ./test_harness
- enter nextstate pushmark const(PV("ok"\0)) print leave
-cxstack is corrupt at leave
-
-5.8.9d-nt test 27 AUTOLOAD:
-gdb --args ccode27
- start
- b Perl_gv_autoload4
- => The Fcntl stash misses AUTOLOAD
-
--fcog: (13) unshare_hek tricky assertion fails
- he: "Find the shared he which is just before us in memory"
- ./ccode13_o1 Assertion he->shared_he_he.hent_hek == hek failed: file "hv.c", line 2327.
- Maybe call our own destruct handler on >=510, which resets all such pv's to NULL beforehand.
-
-cccode12_o2: 5.10.1d-nt
- Program received signal SIGSEGV, Segmentation fault.
- 0x521ab445 in Perl_pop_scope () at scope.c:103
- 103 const I32 oldsave = PL_scopestack[--PL_scopestack_ix];
- (gdb) p PL_scopestack_ix
- $1 = -272716323
- (gdb) bt
- #0 0x521ab445 in Perl_pop_scope () at scope.c:103
- #1 0x52121784 in Perl_pp_leave () at pp_hot.c:1904
- #2 0x00401ca5 in _fu23__PL_ppaddr () at cccode12_o2.c:246
- #3 0x520d95d1 in Perl_runops_debug () at dump.c:1968
-
-bytecode11 - 5.11d
-assertion "isGV_with_GP(shplep)" failed: file "B.c", line 4961
-#0 XS_B__GV_GP (my_perl=0x14222d0, cv=0x152a750) at B.c:15887
-#1 0x521ca568 in Perl_pp_entersub () from /usr/local/bin/cygperl5_11d.dll
-#2 0x52165d4c in Perl_runops_debug () from /usr/local/bin/cygperl5_11d.dll
-#3 0x521a9730 in Perl_call_sv () from /usr/local/bin/cygperl5_11d.dll
-#4 0x521b1640 in Perl_call_list () from /usr/local/bin/cygperl5_11d.dll
-#5 0x521a596f in perl_parse () from /usr/local/bin/cygperl5_11d.dll
-#6 0x00401136 in main (argc=4, argv=0x14221a0, env=0x1420090)
-(gdb) p *gv
-$2 = {sv_any = 0x14d1d48, sv_refcnt = 3, sv_flags = 32777 (0x8009), sv_u = {
- svu_iv = -5931823458977729848, svu_uv = 12514920614731821768,
- svu_rv = 0x14db2c8, svu_pv = 0x14db2c8 "��E\001", svu_array = 0x14db2c8,
- svu_hash = 0x14db2c8, svu_gp = 0x14db2c8}}
-
-cccode3.c - 5.11 dstr assert
- XPUSHs(GvSV(PL_curpad[1])); /* oops, this GV is empty */
- /* stack = */
- /* BINOP (0x15ec140) sassign [OPf_STACKED] */
- dst = POPs; src = TOPs; /* empty var dst at stack ! */
- MAYBE_TAINT_SASSIGN_SRC(src);
- SvSetSV(dst, src);
-
-ccode3 - 5.10 (fixed via workaround, dynamic init)
--------------
-SEGV $_ = "xyxyx"; %j=(1,2); s/x/$j{print("z")}/g; print $_
-empty data. cause: no pv flag and refcnt in the sv
-#0 0x004a38c3 in Perl_fbm_instr (my_perl=0x18926d0, big=0x18d4bc8 "xyxyx",
- bigend=0x18d4bcd "", littlestr=0x0, flags=0) at util.c:577
-#1 0x006481d4 in Perl_re_intuit_start (my_perl=0x18926d0, prog=0x18d2088,
- sv=0x18d3fb8, strpos=0x18d4bc8 "xyxyx", strend=0x18d4bcd "", flags=0,
- data=0x0) at regexec.c:561
-#2 0x005a13f3 in Perl_pp_subst (my_perl=0x18926d0) at pp_hot.c:2105
-(gdb) p *rx
-$7 = {engine = 0x6a06a0, mother_re = 0x0, extflags = 1126170624, minlen = 0,
- minlenret = 0, gofs = 0, substrs = 0x18c0908, nparens = 0, intflags = 0,
- pprivate = 0x18d1588, lastparen = 0, lastcloseparen = 0, swap = 0x0,
- offs = 0x18cf748, subbeg = 0x0, sublen = 0, prelen = 0,
- precomp = 0x18ab870 ")", wrapped = 0x18ab868 "(?-xism:)", wraplen = 9,
- seen_evals = 0, paren_names = 0x0, refcnt = 1}
-
-ccode2 - 5.11 (fixed via workaround, dynamic init)
--------------
-match with /\d/
-(gdb) p *pm
-$1 = {op_next = 0x66513c, op_sibling = 0x665198, op_ppaddr = 0x59a6e9 <Perl_pp_match>, op_targ = 0, op_type = 31,
- op_opt = 0, op_latefree = 1, op_latefreed = 0, op_attached = 0, op_spare = 0, op_flags = 2 '\002',
- op_private = 64 '@', op_first = 0x0, op_last = 0x0, op_pmoffset = 46, op_pmflags = 0, op_pmreplrootu = {
- op_pmreplroot = 0x0, op_pmtargetoff = 0}, op_pmstashstartu = {op_pmreplstart = 0x0, op_pmstashpv = 0x0}}
-(gdb) n
-1216 register REGEXP *rx = PM_GETRE(pm);
-(gdb) p *rx
-$2 = {engine = 0x69f690, mother_re = 0x0, extflags = 52428800, minlen = 1, minlenret = 1, gofs = 0,
- substrs = 0x1920188, nparens = 0, intflags = 0, pprivate = 0x1915448, lastparen = 0, lastcloseparen = 0,
- swap = 0x0, offs = 0x191f6c8, subbeg = 0x0, sublen = 0, prelen = 1, precomp = 0x18fb870 "0)",
- wrapped = 0x18fb868 "(?-xism:0)", wraplen = 10, seen_evals = 0, paren_names = 0x0, refcnt = 1}
-
TEST COVERAGE
-------------
Bytecode:
@@ -407,23 +310,6 @@ cop_label(122) cop_stash(125) cop_filegv(126) push_begin(134) push_init(135)
push_end(136) curstash(137) defstash(138) data(139) incav(140) load_glob(141)
regex_padav(142) comppad_name(144) xgv_stash(145) signal(146) formfeed(147)
-JIT PLANS
----------
-Jit came alive March 2010 on github and now CPAN.
-It works to do profiling, but is not finished.
-
-B-C-1.04_10:
-Playing with the idea to target against parrot pir instead of lightning
-and use the parrot jit, with pbc_to_exe or exec_save.
-Then we need no jit support in the ByteLoader and get rid of all the Jit
-stuff for now.
-=> B::PIR, Doing mentoring for Google Soc 2008
-
-B-C-1.04_03:
-added Jit and Asm layout, with the idea of using either
-lightning as jit backend (Jit), or creating our own assembler (Asm)
-to be able to use a high-level language.
-
Abbrevations
------------
bc B::ByteCode
@@ -432,4 +318,4 @@ cc B::CC
-D -DDEBUGGING perl, also used as d version suffix, eg 5.8.8d
-nt not threaded perl
-2012-01-26 rurban
+2014-01-15 14:48:08 rurban
View
49 Todo
@@ -1,40 +1,31 @@
* Fixes
-'n' magic (shared_scalar) e.g. t/testm.sh Test::Tester
-del_backref cvgv since 5.13
-run-time label lookup (fixed all tests, need more tests)
-store_cop_label for 5.12 windows/AIX only (=> p5p; needs CORE patch)
-
-CC backend: goto (needs test),
-
-check failing modules: Test::Tester with threads
-check perlcc failing with File::Temp
-proper destruction of vars in END blocks on -O2
-improve XSUB handling (perlcc, both static and dynamic, needs tests)
-sv_magic can do SvREFCNT_inc(obj) which messes up precalculated refcounts
-allocation of XPV[INAHC]V structures needs fixing: Perl tries to free
- them, whereas the compiler expects them to be linked to a xpv[inahc]v_root
-list the same as X[IPR]V structures.
-ref counts
-perl_parse replacement
-signed/unsigned problems with NV (and IV?) initialisation and elsewhere?
+bytecode for 5.18 threaded and 5.20 (suspect: walkoptree upstream)
+empty CVs are no proper coderefs
+use bytes AUTOLOAD handling
CvOUTSIDE for ordinary subs
-DATA filehandle for C-compiled program (almost done)
-method_named packagepv quirks at compile-time. Are run-time pkg names tested?
+-fwalk-all for recursive deep inspection
+method_named packagepv quirks at compile-time. Are run-time pkg names
+
+CC backend: goto (needs test)
* Features
-modularize (-m) for faster link times
+modularize (-m) for faster link times, buiildcc, rperl intergration
+backport improvements from oldmaster:
+ do not define symbols which are arguments of define (destructive
+ check)
+ store static bless packagenames
run-time label lookup (fixed)
skip code after BEGIN goto (usually Carp including B in some AUTOLOAD block, issue 61)
type checking: Devel::TypeCheck
-compile time v. runtime initialisation (mostly done):
+compile time v. runtime initialisation (done):
execute run-time BEGIN blocks for side-effects such as print or chdir,
use and require not.
-save PMOPs in compiled form
+save PMOPs in compiled form (5.10thr missing)
selection of what to dump (done)
-options for cutting out line info (COP elimination) etc. (-fcop)
-shared constants: share_hek, constpv (mostly done)
+options for cutting out line info (COP elimination) etc. (-fcop, sortcv's)
+shared constants: share_hek, constpv (done)
check module dependencies, vs. link libs static, not via DynaLoader (done)
check Bytecode op coverage in the tests, should cover all ops 0-142
ByteLoader compatibility: version, platform. eventually Bytecode version
@@ -46,10 +37,12 @@ check CC op coverage, add tests
-fro-inc read-only INC paths. not the AV, run-time savepvn (done)
-fno-destruct skip optree and sv destruction at all, leave it to the OS (done)
collect static strings beforehand, such as GvNAMEs, COP FILENAME (for pre 5.10)
- and GV method names package::name. (partially done)
+ and GV method names package::name. (done)
proper static init of PMOP SV's (only works dynamic >= 5.10)
-proper static init of PVBM/FBM (almost done, just 5.8.9 not)
-compile-time initialisation of AvARRAYs (improved with -fav-init and -fav-init2)
+proper static init of PVBM/FBM (done)
+compile-time initialisation of AvARRAYs (improved with -fav-init and
+ -fav-init2)
+
collapse LISTOPs to UNOPs or BASEOPs
compile-time qw(), constant subs
variable types: global analysis of variables, type hints etc.
View
2  lib/B/C.pm
@@ -12,7 +12,7 @@
package B::C;
use strict;
-our $VERSION = '1.42_70';
+our $VERSION = '1.43';
my %debug;
our $check;
my $eval_pvs = '';
Please sign in to comment.
Something went wrong with that request. Please try again.