B-C

 view release on metacpan or  search on metacpan

STATUS  view on Meta::CPAN

5.8, 5.6 and earlier had a good core perl compiler, but we are much better.

Still missing in general are:

  - attribute handlers (i.e. run-time attributes)
  - smartmatch subrefs
  - compile-time stash-magic delete renames to ANON
  - p5p Carp >= 1.42 die recursion

B::C is stable and used in production for -O0 and -O3 until 5.24.x
5.26.0 broke Carp, you should use cperl then.
For bigger programs not all methods in certain packages or eval strings
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.
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 <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:
See github issues.

See below at the detailed status of the major releases.

TEST STATUS
-----------
Regularily tested with every cperl update, since it is in core there.

Regularily tested on cygwin1.7, darwin 64bit intel, centos5, centos6, centos7,
debian5, debian6, freebsd7, freebsd8, solaris10/intel sunpro, openbsd49, netbsd.
With the respective default gcc and clang compilers, with the latest address-sanitizer
versions.

Not so regurarily on darwin 10.4/ppc, strawberry-5.10.1, strawberry-5.12.2,
strawberry-5.14, strawberry-5.16 and activeperl-5.10.1/msvc8

List of failed tests:

CORE (old)
----

5.6.2:
t/bytecode      3,6,8..10,12,15,16,18,28,31,35,38,39
t/c             8,15,16,22,27,28,31			   | 27 worked in 5.6.2!
t/c_o1          8,15,16,22,27,28,31
t/c_o2          8,15,16,22,27,28,31
t/cc            15,18,21,25,27,28,30..32
t/cc_o1         15,18,21,25,27,28,30..32
t/cc_o2         10,15,16,18,21,25,26,27,28,30..32

5.8:  			                          	   | non-threaded
t/bytecode      27,44,33,39
t/c             11,14,15,20,23,27..29,31,101,102 	   | 5,7-12,14-20,22-23,25,27,28,30,31
t/c_o1          1,3-8,10..12,14,15,17..25,27..29,31,101,102| 7-12,14-20,22-23,25,27,28,30,31
t/c_o2          1,3-12,14,15,17..25,27..29,31,101,102      | 7-12,14-20,22-23,25,27,28,30,31
t/cc            7,11,14,15,18..21,23..25,28..32,101..103	
t/cc_o1         7,11,14,15,18..21,23..32,101..103		
t/cc_o2         7,10,11,14..16,18-21,23..32,101..103

Recipe:
  p=perl5.6.2
  t/testc.sh -q -c
  for t in $(seq -f"%02.0f" 32); do rm ccode 2>/dev/null; $p -MO=C,-occode.c ccode$t.pl 2>/dev/null && $p script/cc_harness ccode.c -o ccode >/dev/null; echo -n "$t: "; $p ccode$t.pl; echo -n " => "; ./ccode; echo; done
  p=perl5.8.9
  for t in $(seq -f"%02.0f" 35); do rm ccode 2>/dev/null; $p -MO=C,-occode.c ccode$t.pl 2>/dev/null && $p script/cc_harness -Bstatic ccode.c -o ccode >/dev/null; echo -n "$t: "; $p ccode$t.pl; echo -n " => "; ./ccode; echo; done
  p=perl5.8.9d-nt
  for t in $(seq -f"%02.0f" 35); do rm ccode 2>/dev/null; $p -MO=C,-occode.c ccode$t.pl 2>/dev/null && $p script/cc_harness -Bdynamic ccode.c -o ccode >/dev/null; echo -n "$t: "; $p ccode$t.pl; echo -n " => "; ./ccode; echo; done


B::C (new)

STATUS  view on Meta::CPAN

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

DONE
----
fixed with 1.48:
  bytecode compiler for >=5.18
  C/CC walker, dumping all external, non compiler added packages properly
    and detecting required compiler added packages also.
  RTLD_NOLOAD on BSD for run-time remapping of .so syms
  Moose XS init

fixed with 1.47:
  run-time remapping of .so syms with special support by Encode-2.58
  fix %INC cleanup
  non-const %warnings::Bits with -O3
  lexical subs threaded
  Coro
  some readonly related problems: re-eval, hashes
  byteloader binmode for 5.18
  mro and maybe::next

fixed with 1.46:
  global destruction of our and global objects
  utf8 qr and utf8 /i initialization with -fppaddr
  @-
  lexical warnings on 5.8
  -O4 CvSTART cops
  mro: c3 and maybe|next:: method calls
  Encode dlsym patching of compile-time XS handles (Net::DNS, IO::Socket::SSL)
  $/, $@ and $\, esp. when localized
  dump all used @ISA's
  GvFORM pseudo CVs (B::FM) on 5.10
  __DATA__ blocks in packages without printing wrong warnings
  Replace each %hash with foreach sort keys (no random misses of functions)

fixed with 1.44:
  SvLEN and PV ptr for empty shared hash keys
  cop_hints to support lexical numeric hints pragmas (use bytes, use open, ...)
  -O3 with ~ and ~~ formatstrings
  skip saving a cv on defined(&cv)
  format STDOUT/STDERR
  Save empty bodyless subs if they exist, for signal handlers, prototypes declarations
    and cvrefs
  PVMG PV overwriting the RV, overload sub

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
  share_hek re-implemented
  init of READONLY hash keys
  re-hash everything at startup (oCERT-2011-003)
  find UNIVERSAL methods, load SelectSaver with IO
  hv_clear_placeholders
  %+, %-, %!
  %SIG
  magic->PTR when SV (>5.6)
  attributes::reftype
  inc_cleanup (partially)
  CV prototypes (>5.10)
  ignore aelemfast SPECIAL pads (5.8.[45])
  strip version object overload from XS packages (i91)
  restore stdio handles from BEGIN blocks (Test::NoWarnings)
  B::COP::stashflags (>5.15.4)
  lost PL_regex_pad, (5.15 threaded)

fixed with 1.36:
  5.15 XSLoader and hash init
  support lexical warnings
  better __DATA__ detection and support, 
    still IO::File not IO::Scalar handle though
  fixed test 29 mostly (use IO)

fixed with 1.35:
  improve package_pv detection for methods,
  detect previously missing packages within the main source file 
  run-time %ENV

fixed with 1.32:
  improved scanner, try_isa, mark_package force, ...
  do not gp_free shared GPs 
  Internals::V
  dl_init of cached deleted packages

fixed with 1.30:
  cc_queue sort 18 ccpp
  dl_init regression



( run in 1.104 second using v1.01-cache-2.11-cpan-39bf76dae61 )