| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
In Tru64 the cc -ieee enables the IEEE math but disables traps.
We need to reenable the "invalid" trap because otherwise generation
of NaN values leaves the IEEE fp flags in bad state, leaving any further
fp ops behaving strangely (Inf + 1 resulting in zero, for example).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- after return/croak/die/exit, return/break are pointless
(break is not a terminator/separator, it's a goto)
- after goto, another goto (!) is pointless
- in some cases (usually function ends) introduce explicit NOT_REACHED
to make the noreturn nature clearer (do not do this everywhere, though,
since that would mean adding NOT_REACHED after every croak)
- for the added NOT_REACHED also add /* NOTREACHED */ since
NOT_REACHED is for gcc (and VC), while the comment is for linters
- declaring variables in switch blocks is just too fragile:
it kind of works for narrowing the scope (which is nice),
but breaks the moment there are initializations for the variables
(the initializations will be skipped since the flow will bypass
the start of the block); in some easy cases simply hoist the declarations
out of the block and move them earlier
Note 1: Since after this patch the core is not yet -Wunreachable-code
clean, not enabling that via cflags.SH, one needs to -Accflags=... it.
Note 2: At least with the older gcc 4.4.7 there are far too many
"unreachable code" warnings, which seem to go away with gcc 4.8,
maybe better flow control analysis. Therefore, the warning should
eventually be enabled only for modernish gccs (what about clang and
Intel cc?)
|
|
|
|
|
|
|
| |
This reverts commit 8c2b19724d117cecfa186d044abdbf766372c679.
I don't understand - smoke-me came back happy with three
separate reports... oh well, some other time.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- after croak/die/exit (or return), break (or return!) are pointless
(break is not a terminator/separator, it's a promise of a jump)
- after goto, another goto (!) is pointless
- in some cases (usually function ends) introduce explicit NOT_REACHED
to make the noreturn nature clearer (do not do this everywhere, though,
since that would mean adding NOT_REACHED after every croak)
- for the added NOT_REACHED also add /* NOTREACHED */ since
NOT_REACHED is for gcc (and VC), while the comment is for linters
- declaring variables in switch blocks is just too fragile:
it kind of works for narrowing the scope (which is nice),
but breaks the moment there are initializations for the variables
(they will be skipped!); in some easy cases simply hoist the declarations
out of the block and move them earlier
There are still a few places left.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With PERL_GLOBAL_STRUCT_PRIVATE, all "global" vars are in a malloc()d
structure pointed to by the static var my_plvarsp. At exit, this struct is
freed and my_plvarsp is set to NULL.
My previous commit c1181d2b skipped the free if PL_veto_cleanup is set
(as it would be if other threads are still running for example), but
still left my_plvarsp getting set to NULL. Thus other threads could still
deref a null pointer if they accessed a "global" var just as the main
thread was exiting.
This commit makes the veto skip the NULLing in addition to the freeing.
This commit is quite late into the code freeze, but it's a follow-up to the
earlier attempt to get smokes not to fail, and all the affected code is
within #ifdef PERL_GLOBAL_STRUCT_PRIVATE, so it shouldn't affect
mainstream builds at all. (Famous last words.)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With PERL_GLOBAL_STRUCT_PRIVATE "global" variables are in a structure in
malloc()ed memory, not in global static variables or a global static
structure. Hence no global variables are implicitly initialised to zero.
* PL_curinterp and PL_op_sequence need initialising to NULL
* The global structure is free()d before handlers registered with atexit()
run, so be defensive about this.
* Some C code checks SvOK(PL_sv_placeholder) so ensure that its SvFLAGS()
are 0.
* Zero PL_hash_seed
|
|
|
|
|
|
|
|
| |
There is now only one copy of Perl code to generate the C for an xsinit()
function.
This also eliminates ExtUtils::Miniperl::canon(), which was not exported, and
is no longer needed.
|
|
|
|
|
|
|
| |
As miniperlmain.c is now generated by ExtUtils::Miniperl (and not the other
way round), there's no reason to have an editor block in the generated file,
as it's not intended to be edited. Instead, add the "generated from" and
read-only headers to miniperlmain.c
|
|
|
|
|
|
|
|
|
| |
Give it a $VERSION.
Bring the joy of strict (and warnings) to it.
Inline the C code into writemain() instead of using $head, $tail and a regex
to split the $tail into $tail1, $tail2 and $tail3.
Tweak the NAME section so that ABSTRACT_FROM parses it.
Document the updated functionality of writemain().
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now ExtUtils::Miniperl has the master version of {mini,}perlmain.c and is
checked into the repository. miniperlmain.c is now generated by a script
in regen/ which uses ExtUtils::Miniperl.
Tweak ExtUtils::Miniperl::writemain() to take an optional first argument,
a reference to a file handle. This permits the regen script to use the
regen_lib.pl functions for file opening/closing/renaming and TAP generation.
For now check in ExtUtils::Miniperl minimally modified from the version
generated by the former minimod.pl. The next commit will tidy it up.
|
| |
|
|
|
|
|
| |
The subdirectory containing the port specific files was purged when 5.000
was released, but changes made to other files were not removed.
|
| |
|
|
|
|
|
| |
This updates the editor hints in our files for Emacs and vim to request
that tabs be inserted as spaces.
|
|
|
|
|
| |
It is only ever checked for truth/falsehood, and all assignments to it (in core
and on CPAN) are either 0 or 1.
|
| |
|
|
|
|
|
|
| |
This is only normally defined if OEMVS is defined; the commit that added it
(2f3efc97) claims z/OS support. I guess no-one has tried this for awhile as
dd374669 broke this in 2005.
|
|
|
|
| |
since 5.005
|
|
|
|
|
|
|
|
| |
If the signal handler runs after perl_destruct() has been called, it
will get an invalid (or NULL) my_perl when it asks for the
thread-specific interpreter struct. This patch resets the signal
handler for any signal previously handled by PL_csighandlerp to SIG_DFL
before calling perl_destruct().
|
|
|
|
|
|
| |
Message-ID: <25940.1225611819@chthon>
Date: Sun, 02 Nov 2008 01:43:39 -0600
p4raw-id: //depot/perl@34698
|
|
|
| |
p4raw-id: //depot/perl@32237
|
|
|
| |
p4raw-id: //depot/perl@29696
|
|
|
|
|
|
|
| |
McCamant's comment
Message-ID: <44B67921.6090901@iki.fi>
p4raw-id: //depot/perl@28567
|
|
|
|
|
| |
Message-ID: <20060226204721.00be2bff@r2d2>
p4raw-id: //depot/perl@27343
|
|
|
|
|
| |
Message-ID: <20060221062711.GA16160@petdance.com>
p4raw-id: //depot/perl@27300
|
|
|
|
|
|
| |
in read-only mode. Make vi modelines compatible with non-vim
vi versions.
p4raw-id: //depot/perl@24445
|
|
|
|
|
| |
(except the generated ones)
p4raw-id: //depot/perl@24440
|
|
|
|
|
| |
Message-ID: <B356D8F434D20B40A8CEDAEC305A1F2453D653@esebe105.NOE.Nokia.com>
p4raw-id: //depot/perl@24271
|
|
|
| |
p4raw-id: //depot/perl@24106
|
|
|
|
|
|
|
|
| |
Message-ID: <20050325231409.GB17660@petdance.com>
[with modification - the extra argument to incpush was supposed to
be being used]
p4raw-id: //depot/perl@24081
|
|
|
| |
p4raw-id: //depot/perl@23746
|
|
|
|
|
|
|
|
|
| |
Message-ID: <20041111145443.GA1854@immd4.informatik.uni-erlangen.de>
slightly reworked to make the PL_use_safe_putenv variable fit in
the current framework. This patch turns on the use of safe putenv
for any application that embeds a perl interpreter.
p4raw-id: //depot/perl@23507
|
|
|
| |
p4raw-id: //depot/perl@23187
|
|
|
| |
p4raw-id: //depot/perl@23180
|
|
|
| |
p4raw-id: //depot/perl@23176
|
|
|
|
|
| |
as per suggestion from Sarathy.
p4raw-id: //depot/perl@19878
|
|
|
|
|
|
|
| |
is set very early in main(), before perl_parse()
has been called and PL_tainting (or PL_taint_warn)
might have been set.
p4raw-id: //depot/perl@19863
|
|
|
|
|
|
|
| |
(Lots of Perl 5 source code archaeology was involved.)
Larry didn't make strangled noises when I showed him
the patch, either :-)
p4raw-id: //depot/perl@19242
|
|
|
| |
p4raw-id: //depot/perl@18807
|
|
|
| |
p4raw-id: //depot/perl@18801
|
|
|
|
|
| |
Still imcomplete. Configure will follow
p4raw-id: //depot/perl@18030
|
|
|
|
|
|
| |
be found in the repository, which is most often not right,
but at least consistent)
p4raw-id: //depot/perl@14400
|
|
|
|
|
|
|
|
|
|
| |
in speed (upto 20% speedup in certain operations) but meanwhile
regexps and arithmetics got slower (5-10%) (according to
perlbench average speedup is negligible, and within measuring
flutter, 1%). Therefore retracting all the changes
aimed at getting -std1 to compile cleanly: #12475, #12476,
#12479, #12480, #12481, #12482, #12483, #12484.
p4raw-id: //depot/perl@12485
|
|
|
|
|
|
| |
Strict ANSI doesn't like the third argument of main()
so enable ignoring it if using ultra picky compiler.
p4raw-id: //depot/perl@12484
|
|
|
| |
p4raw-id: //depot/perl@11783
|
|
|
|
|
|
| |
Thanks to H. Merijn Brand for the patch.
Some of the comments and or guards might be removable in perl.h now.
p4raw-id: //depot/perl@11758
|
|
|
|
|
| |
running to perl_destruct, changes prototype of perl_destruct to return exitstatus.
p4raw-id: //depot/perl@11702
|
|
|
|
|
| |
Message-ID: <03fd01c122b5$c803c600$052aa8c0@foo>
p4raw-id: //depot/perl@11647
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
platforms that don't have pthread_atfork() (extension of
the fix in change#11151).
Note that this will not help extensions that call fork()
directly in C, or that link to libraries that call fork()
directly. Such cases must be fixed to either call
PerlProc_fork(), or call atfork_lock() in parent before the
calling the function that forks and call atfork_unlock()
in both parent and child immediately after the fork().
(There are no worries if C code calls exec() in the child
immediately after a fork(). Only cases where the child
calls perl's API functions (including New()) after the
fork() are problematic.)
This change also eliminates the use of vfork() from perl,
since all such uses were violating the severe restrictions
on modifying the state of the process between the vfork()
and the exec().
This is a modified version of patches suggested by Abhijit
Menon-Sen and Richard Soderberg.
p4raw-link: @11151 on //depot/perl: 50dd6e574ff39b609595ddb16b2fe9f625a26f8c
p4raw-id: //depot/perl@11423
|