From: Vishal Bhatia Date: Sat, 5 Jun 1999 08:42:17 +0000 (-0700) Subject: applied parts not duplicated by previous patches X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5ab5c7a43faed025589e7095fad6f1f1768cded4;p=p5sagit%2Fp5-mst-13.2.git applied parts not duplicated by previous patches Message-ID: Subject: Fwd: [PATCH 5.005_57] consolidated compiler changes p4raw-id: //depot/perl@3593 --- diff --git a/Changes b/Changes index 0c3c4ab..c1b80ca 100644 --- a/Changes +++ b/Changes @@ -79,6 +79,205 @@ Version 5.005_58 Development release working toward 5.006 ---------------- ____________________________________________________________________________ +[ 3592] By: jhi on 1999/07/05 17:17:22 + Log: AIX threaded build, plus few more on the side. + Branch: cfgperl + ! embed.h embed.pl ext/DynaLoader/dl_aix.xs + ! ext/DynaLoader/dl_next.xs ext/DynaLoader/dl_rhapsody.xs + ! ext/DynaLoader/dl_vms.xs hints/aix.sh objXSUB.h perl.h + ! perl_exp.SH pp_ctl.c proto.h toke.c util.c +____________________________________________________________________________ +[ 3591] By: gsar on 1999/07/05 16:52:34 + Log: "\e" and "\a" didn't produce right escape under EBCDIC + From: pvhp@forte.com (Peter Prymmer) + Date: Fri, 4 Jun 99 12:00:27 PDT + Message-Id: <9906041900.AA28387@forte.com> + Subject: [PATCH 5.005_57]lingering ASCIIism in tokener + Branch: perl + ! toke.c +____________________________________________________________________________ +[ 3590] By: gsar on 1999/07/05 16:40:01 + Log: s/scalar ref constructor/single ref constructor/ (suggested + by Stephen McCamant) + Branch: perl + ! opcode.h opcode.pl +____________________________________________________________________________ +[ 3589] By: gsar on 1999/07/05 16:34:06 + Log: no such thing as gdbm_clearerr() (from Andy Dougherty) + Branch: perl + ! ext/GDBM_File/GDBM_File.xs +____________________________________________________________________________ +[ 3588] By: gsar on 1999/07/05 16:29:39 + Log: allow C<-foo> under C (behavior of C<-$string> + is unchanged still) + Branch: perl + ! op.c +____________________________________________________________________________ +[ 3587] By: jhi on 1999/07/05 10:31:43 + Log: Make perl_exp.SH smarter about what to include and what to exclude. + Branch: cfgperl + ! perl_exp.SH +____________________________________________________________________________ +[ 3586] By: jhi on 1999/07/05 09:29:31 + Log: Remove unnecessary and extraneous my $i = 0. + Branch: cfgperl + ! bytecode.pl +____________________________________________________________________________ +[ 3585] By: jhi on 1999/07/05 07:28:59 + Log: Integrate with mainperl. + Branch: cfgperl + !> (integrate 30 files) +____________________________________________________________________________ +[ 3584] By: gsar on 1999/07/05 05:36:28 + Log: From: Vishal Bhatia + Date: Thu, 03 Jun 1999 00:57:48 PDT + Message-ID: <19990603075749.86665.qmail@hotmail.com> + Subject: Re: [PATCH 5.005_57] pp_sort sorted out + Branch: perl + ! ext/B/B/Bblock.pm ext/B/B/C.pm ext/B/B/CC.pm +____________________________________________________________________________ +[ 3583] By: gsar on 1999/07/05 05:31:19 + Log: suppress fancy display when in verbose mode (suggested by + Paul Johnson ) + Branch: perl + ! lib/Test/Harness.pm +____________________________________________________________________________ +[ 3582] By: gsar on 1999/07/05 05:17:12 + Log: cygwin32 update + From: "Fifer, Eric" + Date: Wed, 2 Jun 1999 15:16:05 +0100 + Message-Id: <71E287AB0D94D111BBD600600849EC8185EDD9@POST> + Subject: [ID 19990602.003] perl5.005_03 (CORE) cygwin32 port + Branch: perl + ! Configure Makefile.SH README.cygwin32 cygwin32/Makefile.SHs + ! cygwin32/build-instructions.READFIRST + ! cygwin32/build-instructions.charles-wilson + ! cygwin32/build-instructions.sebastien-barre + ! cygwin32/build-instructions.steven-morlock + ! cygwin32/build-instructions.steven-morlock2 doio.c dosish.h + ! ext/POSIX/Makefile.PL ext/POSIX/POSIX.xs hints/cygwin32.sh + ! lib/Cwd.pm lib/ExtUtils/MM_Cygwin.pm perl.h pp_hot.c + ! t/op/magic.t util.c +____________________________________________________________________________ +[ 3581] By: gsar on 1999/07/05 02:46:18 + Log: NeXT doesn't have FD_CLOEXEC (suggested by Hans Mulder) + Branch: perl + ! util.c +____________________________________________________________________________ +[ 3580] By: gsar on 1999/07/05 02:38:03 + Log: From: "Ed Peschko" + Date: Mon, 31 May 1999 18:18:13 -0600 + Message-ID: <19990601001813.AAA17834@csgsystems.com> + Subject: [ PATCH perl5.005_57 ] new perlcc + regression tests + Branch: perl + ! t/TEST t/UTEST t/harness utils/perlcc.PL +____________________________________________________________________________ +[ 3579] By: gsar on 1999/07/05 01:20:58 + Log: compatibility tweak for Class::Struct + Branch: perl + ! lib/Class/Struct.pm +____________________________________________________________________________ +[ 3578] By: jhi on 1999/07/04 23:26:01 + Log: Miscellaneus AIX fixes + SOCKS support. + Branch: cfgperl + ! Configure Makefile.SH Porting/Glossary Porting/config.sh + ! Porting/config_H config_h.SH doio.c ext/Socket/Socket.xs + ! hints/aix.sh pp_sys.c +____________________________________________________________________________ +[ 3577] By: gsar on 1999/07/04 23:07:39 + Log: test tweak + Branch: perl + ! t/io/openpid.t +____________________________________________________________________________ +[ 3576] By: jhi on 1999/07/04 22:39:23 + Log: Integrate with mainperl. + Branch: cfgperl + +> t/io/openpid.t + - win32/perlhost.h + !> (integrate 51 files) +____________________________________________________________________________ +[ 3575] By: jhi on 1999/07/04 22:26:48 + Log: Added 64-bit support for AIX 4.3 or better + based on Martin H. Rusoff's observations. + Branch: cfgperl + ! Configure config_h.SH hints/aix.sh +____________________________________________________________________________ +[ 3574] By: jhi on 1999/07/04 21:34:47 + Log: Do not throw away gccvers compilation errors. + From: Andy Dougherty + To: Ron Seguin + Cc: Perl Porters + Subject: [PATCH] Re: [ID 19990625.011] WHOA There + Date: Mon, 28 Jun 1999 12:36:38 -0400 (EDT) + Message-Id: + Branch: cfgperl + ! Configure config_h.SH +____________________________________________________________________________ +[ 3573] By: gsar on 1999/07/04 21:10:32 + Log: adapted suggested tests for addition to testsuite + From: RonaldWS@aol.com + Date: Sun, 30 May 1999 16:27:28 EDT + Message-Id: <25cd799f.2482f930@aol.com> + Subject: [19990530.007] Open with pipe | does not return pid under win32 + Branch: perl + + t/io/openpid.t + ! MANIFEST win32/win32.c +____________________________________________________________________________ +[ 3572] By: gsar on 1999/07/04 20:29:32 + Log: perl_run() should call my_exit(0) for normal completion + Branch: perl + ! perl.c +____________________________________________________________________________ +[ 3571] By: jhi on 1999/07/04 20:10:44 + Log: Add test for change #3568 plus general cleanup. + Branch: cfgperl + ! t/pragma/locale.t +____________________________________________________________________________ +[ 3570] By: gsar on 1999/07/04 20:03:21 + Log: make overload, Data::Dumper, and dumpvar understand qr// stringify + overloading + Branch: perl + ! ext/Data/Dumper/Dumper.pm ext/Data/Dumper/Dumper.xs + ! lib/Dumpvalue.pm lib/dumpvar.pl lib/overload.pm pp_ctl.c +____________________________________________________________________________ +[ 3569] By: gsar on 1999/07/04 18:04:48 + Log: make AIX dynaloading work when libperl is shared (and thus under + mod_perl etc.) + From: Jens-Uwe Mager + Date: Sat, 29 May 1999 17:09:52 +0200 + Message-Id: <199905291509.RAA43978@ans.helios.de> + Subject: [19990529.002] DynaLoader does not work properly if perl is not the main program (AIX) + Branch: perl + ! ext/DynaLoader/dl_aix.xs +____________________________________________________________________________ +[ 3568] By: jhi on 1999/07/04 14:54:23 + Log: pp_lc/pp_lcfirst/pp_quotemeta/pp_uc/pp_ucfirst were not calling mg_set(). + This resulted for example in the 'o' magic not being cleared by + magic_setcollxfrm(), which resulted in strange cmp results. + The bug was reported originally in the message + Subject: Bug with locale + From: Jan Starzynski + To: perlbug@perl.com + Date: Fri, 09 Apr 1999 13:23:07 +0200 + Message-ID: <370DE31B.DAEE1332@planet.de> + Branch: cfgperl + ! pp.c +____________________________________________________________________________ +[ 3567] By: gsar on 1999/07/04 02:38:34 + Log: remove misleading info on defined(&func), unclutter deprecation + about defined(@array) + Branch: perl + ! op.c pod/perldelta.pod pod/perldiag.pod pod/perlfunc.pod + ! t/pragma/warn/op +____________________________________________________________________________ +[ 3566] By: gsar on 1999/07/04 01:46:31 + Log: From: jan.dubois@ibm.net (Jan Dubois) + Date: Wed, 26 May 1999 22:07:17 +0200 + Message-ID: <374c53ac.10322322@smtp1.ibm.net> + Subject: [PATCH 5.005_57] MINGW32 and EGCS 1.1.2 support + Branch: perl + ! Changes win32/win32.c win32/win32.h +____________________________________________________________________________ [ 3565] By: gsar on 1999/07/04 01:26:02 Log: newer version of perlxstut from Jeff Okamoto (slightly edited for win32 issues) diff --git a/ext/B/B/Bblock.pm b/ext/B/B/Bblock.pm index ba6293b..df2a642 100644 --- a/ext/B/B/Bblock.pm +++ b/ext/B/B/Bblock.pm @@ -4,7 +4,9 @@ use Exporter (); @EXPORT_OK = qw(find_leaders); use B qw(peekop walkoptree walkoptree_exec - main_root main_start svref_2object OPf_SPECIAL OPf_STACKED); + main_root main_start svref_2object + OPf_SPECIAL OPf_STACKED ); + use B::Terse; use strict; @@ -17,19 +19,19 @@ sub mark_leader { $bblock->{$$op} = $op; } } -sub remove_sortblocks{ - foreach (keys %$bblock) { - my $leader = $$bblock{$_}; - delete $$bblock{$_} if ( $leader == 0); + +sub remove_sortblock{ + foreach (keys %$bblock){ + my $leader=$$bblock{$_}; + delete $$bblock{$_} if( $leader == 0); } } - sub find_leaders { my ($root, $start) = @_; $bblock = {}; mark_leader($start) if ( ref $start ne "B::NULL" ); walkoptree($root, "mark_if_leader") if ((ref $root) ne "B::NULL") ; - remove_sortblocks(); + remove_sortblock(); return $bblock; } @@ -104,18 +106,19 @@ sub B::CONDOP::mark_if_leader { mark_leader($op->false); } + sub B::LISTOP::mark_if_leader { my $op = shift; my $first=$op->first; - $first=$first->next while ($first->ppaddr eq "pp_null"); #remove optimed + $first=$first->next while ($first->ppaddr eq "pp_null"); mark_leader($op->first) unless (exists( $bblock->{$$first})); mark_leader($op->next); - if ($op->ppaddr eq "pp_sort" && $op->flags - & OPf_SPECIAL && $op->flags & OPf_STACKED){ - my $root=$op->first->sibling->first; - my $leader=$root->first; - $bblock->{$$leader} = 0; -} + if ($op->ppaddr eq "pp_sort" and $op->flags & OPf_SPECIAL + and $op->flags & OPf_STACKED){ + my $root=$op->first->sibling->first; + my $leader=$root->first; + $bblock->{$$leader} = 0; + } } sub B::PMOP::mark_if_leader { diff --git a/ext/B/B/C.pm b/ext/B/B/C.pm index 7f29543..0385452 100644 --- a/ext/B/B/C.pm +++ b/ext/B/B/C.pm @@ -551,7 +551,7 @@ sub B::PVMG::save_magic { if ($len == HEf_SVKEY){ #The pointer is an SV* $ptrsv=svref_2object($ptr)->save; - $init->add(sprintf("sv_magic((SV*)s\\_%x, (SV*)s\\_%x, %s, %s, %d);", + $init->add(sprintf("sv_magic((SV*)s\\_%x, (SV*)s\\_%x, %s,(char *) %s, %d);", $$sv, $$obj, cchar($type),$ptrsv,$len)); }else{ $init->add(sprintf("sv_magic((SV*)s\\_%x, (SV*)s\\_%x, %s, %s, %d);", @@ -1330,7 +1330,7 @@ sub save_main { my $init_av = init_av->save; $init->add(sprintf("PL_main_root = s\\_%x;", ${main_root()}), sprintf("PL_main_start = s\\_%x;", ${main_start()}), - "PL_initav = $init_av;"); + "PL_initav = (AV *) $init_av;"); save_context(); warn "Writing output\n"; output_boilerplate(); diff --git a/ext/B/B/CC.pm b/ext/B/B/CC.pm index 059491d..5a143bc 100644 --- a/ext/B/B/CC.pm +++ b/ext/B/B/CC.pm @@ -92,9 +92,10 @@ sub init_hash { map { $_ => 1 } @_ } # %skip_lexicals = init_hash qw(pp_enter pp_enterloop); %skip_invalidate = init_hash qw(pp_enter pp_enterloop); -%need_curcop = init_hash qw(pp_rv2gv pp_bless pp_repeat pp_sort - pp_caller pp_reset pp_rv2cv pp_entereval pp_require pp_dofile - pp_entertry pp_enterloop pp_enteriter pp_entersub pp_enter); +%need_curcop = init_hash qw(pp_rv2gv pp_bless pp_repeat pp_sort pp_caller + pp_reset pp_rv2cv pp_entereval pp_require pp_dofile + pp_entertry pp_enterloop pp_enteriter pp_entersub + pp_enter); sub debug { if ($debug_runtime) { @@ -582,7 +583,6 @@ sub pp_dbstate { } #default_pp will handle this: -#sub pp_rv2gv { $curcop->write_back; default_pp(@_) } #sub pp_bless { $curcop->write_back; default_pp(@_) } #sub pp_repeat { $curcop->write_back; default_pp(@_) } # The following subs need $curcop->write_back if we decide to support arybase: @@ -590,41 +590,40 @@ sub pp_dbstate { #sub pp_caller { $curcop->write_back; default_pp(@_) } #sub pp_reset { $curcop->write_back; default_pp(@_) } +sub pp_rv2gv{ + my $op =shift; + $curcop->write_back; + write_back_lexicals() unless $skip_lexicals{$ppname}; + write_back_stack() unless $skip_stack{$ppname}; + my $sym=doop($op); + if ($op->private & OPpDEREF) { + $init->add(sprintf("((UNOP *)$sym)->op_first = $sym;")); + $init->add(sprintf("((UNOP *)$sym)->op_type = %d;", + $op->first->type)); + } + return $op->next; +} sub pp_sort { my $op = shift; my $ppname = $op->ppaddr; - if ($op->flags & OPf_SPECIAL && $op->flags & OPf_STACKED){ - #this indicates the "sort BLOCK Array" case - #ugly optree surgery required. - my $root=$op->first->sibling->first; - my $start=$root->first; + if ( $op->flags & OPf_SPECIAL && $op->flags & OPf_STACKED){ + #this indicates the sort BLOCK Array case + #ugly surgery required. + my $root=$op->first->sibling->first; + my $start=$root->first; $op->first->save; $op->first->sibling->save; $root->save; - $start->save; - my $sym=objsym($start); - my $fakeop=cc_queue("pp_sort".$$op,$root,$start); - $init->add(sprintf("($sym)->op_next=%s;",$fakeop)); - } + my $sym=$start->save; + my $fakeop=cc_queue("pp_sort".$$op,$root,$start); + $init->add(sprintf("(%s)->op_next=%s;",$sym,$fakeop)); + } $curcop->write_back; - write_back_lexicals(); - write_back_stack(); - doop($op); - return $op->next; -} - -sub pp_leavesub{ - my $op = shift; - my $ppname = $op->ppaddr; - write_back_lexicals() unless $skip_lexicals{$ppname}; - write_back_stack() unless $skip_stack{$ppname}; - runtime("if (PL_curstackinfo->si_type == PERLSI_SORT) {"); - runtime("\tPUTBACK;return 0;"); - runtime("}"); + write_back_lexicals(); + write_back_stack(); doop($op); return $op->next; -} - +} sub pp_gv { my $op = shift; my $gvsym = $op->gv->save; @@ -1071,7 +1070,16 @@ sub pp_enterwrite { my $op = shift; pp_entersub($op); } - +sub pp_leavesub{ + my $op = shift; + write_back_lexicals() unless $skip_lexicals{$ppname}; + write_back_stack() unless $skip_stack{$ppname}; + runtime("if (PL_curstackinfo->si_type == PERLSI_SORT){"); + runtime("\tPUTBACK;return 0;"); + runtime("}"); + doop($op); + return $op->next; +} sub pp_leavewrite { my $op = shift; write_back_lexicals(REGISTER|TEMPORARY); @@ -1535,7 +1543,7 @@ sub cc_main { $init->add(sprintf("PL_main_root = s\\_%x;", ${main_root()}), "PL_main_start = $start;", "PL_curpad = AvARRAY($curpad_sym);", - "PL_initav = $init_av;", + "PL_initav = (AV *) $init_av;", "GvHV(PL_incgv) = $inc_hv;", "GvAV(PL_incgv) = $inc_av;", "av_store(CvPADLIST(PL_main_cv),0,SvREFCNT_inc($curpad_nam));", diff --git a/ext/B/B/Stackobj.pm b/ext/B/B/Stackobj.pm index c6aa1ba..123b2fc 100644 --- a/ext/B/B/Stackobj.pm +++ b/ext/B/B/Stackobj.pm @@ -264,13 +264,21 @@ sub B::Stackobj::Const::write_back { sub B::Stackobj::Const::load_int { my $obj = shift; - $obj->{iv} = int($obj->{sv}->PV); + if (ref($obj->{sv}) eq "B::RV"){ + $obj->{iv} = int($obj->{sv}->RV->PV); + }else{ + $obj->{iv} = int($obj->{sv}->PV); + } $obj->{flags} |= VALID_INT; } sub B::Stackobj::Const::load_double { my $obj = shift; - $obj->{nv} = $obj->{sv}->PV + 0.0; + if (ref($obj->{sv}) eq "B::RV"){ + $obj->{nv} = $obj->{sv}->RV->PV + 0.0; + }else{ + $obj->{nv} = $obj->{sv}->PV + 0.0; + } $obj->{flags} |= VALID_DOUBLE; }