Permalink
Browse files

merge e7d2741 into stable

  • Loading branch information...
2 parents b5bf173 + e7d2741 commit 0f19071c55c321218b4f7571940246780545af81 Reini Urban committed Sep 24, 2012
View
150 .gdbinit
@@ -1,50 +1,52 @@
#directory /usr/src/perl/perl-5.10.1/perl-5.10.1
#directory /usr/src/perl/perl-5.6.2
+break __asan_report_error
+
define run10plc
run -Mblib -MByteLoader -Dtv bytecode10.plc
end
#set args -Dtv -Mblib -MByteLoader bytecode10.plc
# grep -Hn PL_no_modify *.c|perl -ne'/^([\w.]+:\d+)/ && print "break $1\n";'
-define break_no_modify
- break av.c:342
- break av.c:435
- break av.c:540
- break av.c:579
- break av.c:648
- break av.c:720
- break av.c:851
- break doop.c:640
- break doop.c:1025
- break doop.c:1111
- break mg.c:615
- break mg.c:2361
- break pp.c:161
- break pp.c:864
- break pp.c:881
- break pp.c:903
- break pp_hot.c:401
- break pp_hot.c:2098
- break pp_hot.c:2966
- break pp_sort.c:1569
- break pp_sys.c:1027
- break regcomp.c:4924
- break regcomp.c:5225
- break sv.c:3247
- break sv.c:3365
- break sv.c:3424
- break sv.c:4331
- break sv.c:4349
- break sv.c:4748
- break sv.c:6950
- break sv.c:7113
- break sv.c:8390
- break universal.c:1353
- break universal.c:1375
- break universal.c:1396
- break util.c:3430
- break util.c:3433
-end
+#define break_no_modify
+# break av.c:342
+# break av.c:435
+# break av.c:540
+# break av.c:579
+# break av.c:648
+# break av.c:720
+# break av.c:851
+# break doop.c:640
+# break doop.c:1025
+# break doop.c:1111
+# break mg.c:615
+# break mg.c:2361
+# break pp.c:161
+# break pp.c:864
+# break pp.c:881
+# break pp.c:903
+# break pp_hot.c:401
+# break pp_hot.c:2098
+# break pp_hot.c:2966
+# break pp_sort.c:1569
+# break pp_sys.c:1027
+# break regcomp.c:4924
+# break regcomp.c:5225
+# break sv.c:3247
+# break sv.c:3365
+# break sv.c:3424
+# break sv.c:4331
+# break sv.c:4349
+# break sv.c:4748
+# break sv.c:6950
+# break sv.c:7113
+# break sv.c:8390
+# break universal.c:1353
+# break universal.c:1375
+# break universal.c:1396
+# break util.c:3430
+# break util.c:3433
+#end
# break Dynaloader.xs:190
# break byteloader_filter
@@ -57,23 +59,69 @@ end
# break Perl_pp_match
# break Perl_pad_new
-# threaded
-define stack_dump
- call Perl_sv_dump(my_perl, *sp)
+# stack dump, sp or PL_sp or my_perl->Istack_sp?
+define sp_dump
+ if my_perl
+ p/x **my_perl->Istack_sp
+ call Perl_sv_dump(my_perl, *my_perl->Istack_sp)
+ else
+ p/x **PL_sp
+ Perl_sv_dump(*PL_sp)
+ end
end
-# non-threaded
-define stack_dump_nt
- call Perl_sv_dump(*sp)
+document sp_dump
+ => Perl_sv_dump(PL_sp)
end
+
define op_dump
- call Perl_op_dump(my_perl, PL_op)
+ if my_perl
+ p/x *my_perl->Iop
+ call Perl_op_dump(my_perl, my_perl->Iop)
+ else
+ p/x *PL_op
+ call Perl_op_dump(PL_op)
+ end
end
-define op_dump_nt
- call Perl_op_dump(PL_op)
+document op_dump
+ => Perl_op_dump(PL_op)
+see `odump op`
end
+
define sv_dump
- call Perl_sv_dump(my_perl, sv)
+ p/x *sv
+ if my_perl
+ call Perl_sv_dump(my_perl, sv)
+ else
+ call Perl_sv_dump(sv)
+ end
+end
+document sv_dump
+ => Perl_sv_dump(sv)
+see `sdump sv`
+end
+
+define odump
+ p/x *$arg0
+ if my_perl
+ call Perl_op_dump(my_perl, $arg0)
+ else
+ call Perl_op_dump($arg0)
+ end
+end
+document odump
+odump op => p/x *op; Perl_op_dump(op)
+see `help op_dump` for PL_op
+end
+
+define sdump
+ p/x *$arg0
+ if my_perl
+ call Perl_sv_dump(my_perl, $arg0)
+ else
+ call Perl_sv_dump($arg0)
+ end
end
-define sv_dump_nt
- call Perl_sv_dump(sv)
+document sdump
+sdump sv => p/x *sv; Perl_sv_dump(sv)
+see `help sv_dump`
end
View
@@ -41,5 +41,7 @@ log.test-*
log.make-*
log.do-*
log.testvm-*
+log.modules-*.err
+log.modules-5*-201*-*
.DS_Store
B-C-*.tar.gz
View
@@ -1 +1,3 @@
$DB::deep=500;
+$SIG{__WARN__}='';
+# a 934 print $op->name
View
@@ -27,12 +27,7 @@ WriteMakefile(
sub MY::depend {
my $up = File::Spec->updir;
- my ($bytecode_pl);
- if ($core) {
- $bytecode_pl = File::Spec->catdir( 'ByteLoader', 'bytecode.pl' );
- } else {
- $bytecode_pl = File::Spec->catdir( '..', 'bytecode.pl' );
- }
+ my $bytecode_pl = File::Spec->catdir( '..', 'bytecode.pl' );
return "
\$(INST_LIB)/ByteLoader.pm : ByteLoader.pm
\$(NOECHO) \$(ABSPERLRUN) -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\''$(INST_LIB)/auto'\'', '\''$(PM_FILTER)'\'')' -- \
View
@@ -310,6 +310,10 @@ static int bget_swab = 0;
#define BSET_pregcomp(o, arg) \
STMT_START { \
if (arg) { \
+ SV * const repointer = &PL_sv_undef; \
+ av_push(PL_regex_padav, repointer); \
+ cPMOPx(o)->op_pmoffset = av_len(PL_regex_padav); \
+ PL_regex_pad = AvARRAY(PL_regex_padav); \
PM_SETRE(cPMOPx(o), \
CALLREGCOMP(newSVpvn(arg, strlen(arg)), cPMOPx(o)->op_pmflags)); \
} \
@@ -319,7 +323,7 @@ static int bget_swab = 0;
/* see op.c:newPMOP
* Must use a SV now. build it on the fly from the given pv.
* TODO: 5.11 could use newSVpvn_flags with SVf_TEMP
- * PM_SETRE adjust no PL_regex_pad, so repoint manually.
+ * PM_SETRE does not adjust PL_regex_pad, so repoint manually.
*/
#define BSET_pregcomp(o, arg) \
STMT_START { \
@@ -516,7 +520,12 @@ static int bget_swab = 0;
#ifdef USE_ITHREADS
#define BSET_cop_file(cop, arg) CopFILE_set(cop,arg)
+#if PERL_VERSION >= 16
+/* 3arg: 6379d4a9 Father Chrysostomos 2012-04-08 20:25:52 */
+#define BSET_cop_stashpv(cop, arg) CopSTASHPV_set(cop,arg,strlen(arg))
+#else
#define BSET_cop_stashpv(cop, arg) CopSTASHPV_set(cop,arg)
+#endif
/* only warn, not croak, because those are not really important. stash could be. */
#define BSET_cop_filegv(cop, arg) Perl_warn(aTHX_ "cop_filegv with ITHREADS not yet implemented")
#define BSET_cop_stash(cop,arg) Perl_warn(aTHX_ "cop_stash with ITHREADS not yet implemented")
View
37 Changes
@@ -3,34 +3,55 @@
The Perl compiler was in CORE from alpha4 until Perl 5.9.4
and worked quite fine with Perl 5.6 and 5.8
-1.43 2012-02-xx rurban
- * C: Fixed more method not found. issue95 and t/perldoc.t -
- parent @File::Spec::ISA was not saved.
+1.43 2012-04-xx rurban
+ Improved package detection: methods, functions, require, new and bless.
+ Bigger compile sizes. Store all subs of dependent packages.
+ 5.16 support
+
+ * C: issue95 and t/perldoc.t: parent @File::Spec::ISA was not saved.
+ Detect typed lexicals objects to reliably find method packages.
+ Sanified package_pv default a bit when a method padsv was not
+ found. Check for method_named as last argument of methods.
+ Added check_entersub, check_bless, check_require - bless and new caching of
+ packages for methods
+ Recursively store all package subs in 2nd pass, not only the needed.
try_isa(): Desperate method finding attempt by trying all seen packages, which
slows down the compiler a lot. Added internal ISA Caching.
+ Special case Carp calling threads and B methods.
Avoid saving not undefined CVs if possible. with Autoloading, i.e. POSIX
the first is always saved as empty CV.
Fix -u<module> without file extension.
- Special case Carp calling threads and B methods.
- Sanified package_pv default a bit when a method padsv was not
- found. Check for method_named as last argument of methods.
Fixed wrong boot_ arg for the xs version check with --staticxs
Fixed refinition warnings of XS CONSTSUB. Ignore them as they are
loaded later.
- With hek do not drop FAKE, only for const pv
+ With hek do not drop FAKE, only for const pv.
+ Broke __DATA__ (15), 91, 95, perldoc, Test::NoWarnings
+ Detect and skip GV->save in defined (issue 96).
+ Threaded use the right CV PADLIST for SVOP's, proper curcv for new and
+ bless detection.
+ Add $dlmodule::VERSION as 2nd arg to boot_$dlmodule resp. $dlmodule::bootstrap
+ to get rid of the pesky Invalid version format error in xs_version_bootcheck
+ if the $VERSION had already version magic attached. (no testcase, hard to repro)
+ * CC (1.13): added check_entersub, check_bless - bless and new caching
+ * Bytecode (1.14): fixed require and op_first, issue 97
+ Fixed regex_pad offset in threaded perls >= 5.11, issue 68
* t/perldoc.t: perlcc fails with 5.8 because Cwd disturbs the
fragile method package finder for File::Spec. Use cc_harness.
* Stash (1.03): fix compilation for 5.8.8 and below: gv_fetchsv missing
- * perlcc (2.14): new option --dryrun, -v5 does not -Dsp,-v
+ * perlcc (2.14): new option --dryrun, -v5 does not -Dsp,-v.
+ new option -f passthru to C and CC
1.42 2012-02-01 rurban
+ stable up to 5.14
+
* C: Improved finding methods in parent classes, visible by the
warning: <method> not found with -Ds, try_isa now
Save @ISA of those child classes.
Re-implement and simplify my_share_hek, now in terms of share_hek.
PL_strtab hack gone. This fixed the shared_hek destruction
problems.
Turn off CvDYNFILE needed since 5.15.4, use static CvFILE. (DateTime)
+ Changed option -DW to -Dw ("walk") for consistency
* t/e_perlcc.t: perlcc -stash does not hang anymore, renabled stash section
* Stash (1.02): '-xs' does not load B anymore.
Now in seperate directory Stash
View
@@ -124,12 +124,14 @@ t/issue51.t
t/issue52.t
t/issue54.t
t/issue59.t
+t/issue68.t
t/issue71.t
t/issue76.t
t/issue81.t
t/issue90.t
t/issue93.t
t/issue95.t
+t/issue97.t
t/modules.pm
t/modules.t
t/mymodules
View
@@ -8,7 +8,11 @@ my $core = grep { $_ eq 'PERL_CORE=1' } @ARGV;
# generate lib/B/Asmdata.pm beforehand
# my $X = $^X =~ / / ? qq("$^X") : $^X;
-system($^X, "bytecode.pl");
+if ($core) {
+ system($^X,"-I../../lib/auto","-I../../lib","bytecode.pl");
+} else {
+ system($^X, "bytecode.pl");
+}
my ($use_declare_independent_comalloc, $extra_cflags, $extra_libs) = (0, "", "");
my $have_independent_comalloc = check_independent_comalloc();
@@ -67,9 +71,9 @@ WriteMakefile(
" B::Flags: 0.04\n".
" B::Debug: 1.16\n".
" Opcodes: 0.10\n".
+ " IO::Socket::SSL: 0\n",
" IPC::Run: 0\n",
" Set::Object: 0\n",
- " IO::Socket::SSL: 0\n",
) : ()),
($ExtUtils::MakeMaker::VERSION gt '6.46' ?
('META_MERGE' => {"recommends" =>
View
2 Todo
@@ -20,6 +20,8 @@ CvOUTSIDE for ordinary subs
* Features
+Detect ExtUtils::Constant autoloaded "Your vendor has not defined"
+ functions stubs. E.g. "WARNING: &Socket::AF_DATAKIT not found"
optimize static or typed method calls. How-perl-compiles-subs-and-methods.md
detect typed objects (my Class $obj = new Class;)
modularize (-m) for faster link times
View
@@ -13,7 +13,7 @@
package B::Bytecode;
-our $VERSION = '1.13';
+our $VERSION = '1.14';
#use 5.008;
use B qw( class main_cv main_root main_start
@@ -746,10 +746,12 @@ sub B::UNOP::bsave {
&& $op->flags & OPf_MOD
&& $op->private & OPpLVAL_INTRO
- # change #18774 made my life hard
+ # change #18774 (localref) made my life hard (commit 82d039840b913b4)
? $first->ix
: 0;
+ # XXX Are there more new UNOP's with first?
+ $firstix = $first->ix if $name eq 'require'; #issue 97
$op->B::OP::bsave($ix);
asm "op_first", $firstix;
}
@@ -927,14 +929,14 @@ sub B::PMOP::bsave {
asm "pregcomp";
}
elsif ($PERL510) {
- # Since PMf_BASE_SHIFT we need a U32, which is a new bytecode for
- # backwards compat
+ my $pv = $op->precomp;
+ # Since PMf_BASE_SHIFT we need a U32, which needs a new bytecode for
+ # backwards compat.
asm "op_pmflags", $op->pmflags;
bwarn("PMOP op_pmflags: ", $op->pmflags) if $debug{M};
- my $pv = $op->precomp;
+ # pregcomp does not set the extflags correctly, just the pmflags
asm "newpv", pvstring $pv;
asm "pregcomp";
- # pregcomp does not set the extflags correctly, just the pmflags
asm "op_reflags", $op->reflags if $pv; # so overwrite the extflags
}
}
Oops, something went wrong.

0 comments on commit 0f19071

Please sign in to comment.