summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Txoic tpyo.Jarkko Hietaniemi2014-11-091-4/+4
|
* FreeBSD may not have the C99 long double math interfaces.Jarkko Hietaniemi2014-11-091-0/+33
| | | | (This sanity logic could migrated to Configure)
* Don’t allow OPpTARGET_MY on postdec/incFather Chrysostomos2014-11-095-20/+33
| | | | | | | | | | | | | | | | I was wrong in 9e319cc4f. postfix ++/-- writes to its return value before reading its argument. If we optimise away the scalar assignment in $a = $b++; (that’s what OPpTARGET_MY does), then $a gets written to before $b is read. If $a and $b are the same, we get the wrong answer. This bug has been present under ‘use integer’ since 5.6.0. I accidentally extended it to non-integer ++/-- in 9e319cc4f. (It’s not likely that someone will write $a = $b++, but it could hap- pen inadvertently in more complex code.)
* tr_utf8.t: Suppress warningFather Chrysostomos2014-11-091-1/+1
|
* sv.c:find_uninit_var: use newSVpvs_flagsFather Chrysostomos2014-11-091-6/+2
| | | | This makes the machine code smaller.
* op.c:bind_match: remove redundant varFather Chrysostomos2014-11-091-7/+3
| | | | This shrinks the machine code slightly.
* Skip padsv op in $lex =~ ...Father Chrysostomos2014-11-094-16/+46
| | | | | | | | | m//, s/// and y/// already have logic to deal with implicit lexical $_. The pad offset of $_ is stored in the match op itself. We can take advantage of that and extend it to lexical variables in general. That way we have fewer ops to execute, as $lex =~ // no longer calls pp_padsv. It also allows lexical variables’ names to be mentioned in uninitialized warnings for y///.
* Don’t check OPpTARGET_MY on match ops at run timeFather Chrysostomos2014-11-093-4/+4
| | | | | The offset in op_targ is sufficient. The next commit will take advan- tage of this.
* util.c: fix comiler warningsDavid Mitchell2014-11-091-7/+9
| | | | | A recent commit gave some warnings about format types, and assignments without extra parens within an if condition.
* Version bump for File::Spec::VMS.Craig A. Berry2014-11-091-1/+1
|
* Simplify abs2rel.t.Craig A. Berry2014-11-091-50/+19
| | | | | | | | | | Factor out all the things that were common for the different test cases (which was everything except the filename). And use made-up names that indicate what's being tested rather than special system filenames commonly found on Unix systems. Otherwise, if, for example, a test for "'init.d' is a directory" fails, you'd be wondering whether something is wrong with your system rather than looking for problems in File::Spec, which is what we're testing.
* Fix undefined warning in File::Spec::VMS::catfile.Craig A. Berry2014-11-091-1/+1
| | | | | | | We had very carefully created a lexical variable to hold a default result when the filename was undefined. Then we forgot to use it. Now we use it.
* Force barename base to be a directory in File::Spec::VMS:abs2rel.Craig A. Berry2014-11-091-0/+4
| | | | | | | | The docs say that the filename portion of base is ignored, but they don't specify what happens when base is a single component without directory syntax, leaving ambiguous whether it's a file or a Unix- style directory spec. Let's default to the latter for greatest consistency with what happens elsewhere.
* Revise Unix syntax detection File::Spec::VMS::abs2rel.Craig A. Berry2014-11-091-1/+1
| | | | | | | | For a long time we've punted to the Unix method if either path or base has a forward slash in it. But that really only works if *both* are not native specs. So check for that by making sure we don't have unescaped left bracket (square or angle) or colon in either parameter before handing off to File::Spec::Unix::abs2rel.
* Move rel2abs earlier in File::Spec::VMS::abs2rel.Craig A. Berry2014-11-091-3/+1
| | | | | | We need to make the path and base parameters absolute before splitting them apart and comparing their pieces. Since rel2abs will do its own canonpath, we don't need to do that anymore here.
* Extend y/// warnings to utf8Father Chrysostomos2014-11-092-8/+19
|
* release_schedule.pod: Correct some versionsFather Chrysostomos2014-11-081-3/+3
|
* release schedule: 5.18.4 shipped, 5.18.5 may happenRicardo Signes2014-11-081-1/+3
|
* release schedule: the v5.22 landing planRicardo Signes2014-11-081-0/+9
|
* op.c:scalarvoid: Remove redundant scalar(o)Father Chrysostomos2014-11-081-1/+2
|
* op.c:ck_sassign: Simplify freeing of sassign opFather Chrysostomos2014-11-081-4/+2
| | | | | | Instead of detaching both the rhs and lhs and then freeing the assign- ment and the lhs, just detach the rhs and free the assignment. This results in smaller machine code.
* Don’t use OP_SIBLING(o) in op.c:ck_sassignFather Chrysostomos2014-11-081-3/+2
| | | | | When this is called, the op is not part of a larger tree yet, so its sibling is always NULL.
* Shrink PL_op_private_bitdefsFather Chrysostomos2014-11-082-678/+410
| | | | | | | | | | | It doesn’t matter whether things in this table are ordered by opcode, because the indices into it are stored in PL_op_private_bitdef_ix. If we have multiple ops with exactly the same private flags, we don’t need multiple entries in PL_op_private_bitdefs. One practical advantage is that patches are less likely to conflict, which will make rebasing easier. (I hope.)
* [Merge] More OA_DANGEROUS stuffFather Chrysostomos2014-11-088-75/+125
|\ | | | | | | | | | | | | | | | | The OA_DANGEROUS op type flag indicates that an op might return a value referenced elsewhere, so list assignment should make tempor- ary copies. Some ops had this flag needlessly. Some lacked it erroneously, resulting in bugs.
| * values and each are OA_DANGEROUSFather Chrysostomos2014-11-085-15/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | OA_DANGEROUS indicates that temporary copies may need to be made in list assignment, to handle things like: ($a, $b) = ($b, $a); In other words, an op type is flagged with OA_DANGEROUS if its return values could occur elsewhere on the stack. values and each can both return scalars that are referenced elsewhere, causing list assignment to behave erratically if temporary copies are not made.
| * smartkve.t doesn’t need to disable dep warningsFather Chrysostomos2014-11-081-1/+1
| |
| * kill is not OA_DANGEROUSFather Chrysostomos2014-11-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | OA_DANGEROUS indicates that temporary copies may need to be made in list assignment, to handle things like: ($a, $b) = ($b, $a); In other words, an op type is flagged with OA_DANGEROUS if its return values could occur elsewhere on the stack. kill only ever returns a target unused elsewhere, so it does not necessitate temp copies in list assignment.
| * exec is not OA_DANGEROUSFather Chrysostomos2014-11-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | OA_DANGEROUS indicates that temporary copies may need to be made in list assignment, to handle things like: ($a, $b) = ($b, $a); In other words, an op type is flagged with OA_DANGEROUS if its return values could occur elsewhere on the stack. When exec fails, it only ever returns a target unused elsewhere, so it does not necessitate temp copies in list assignment.
| * enterwrite is not OA_DANGEROUSFather Chrysostomos2014-11-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | OA_DANGEROUS indicates that temporary copies may need to be made in list assignment, to handle things like: ($a, $b) = ($b, $a); In other words, an op type is flagged with OA_DANGEROUS if its return values could occur elsewhere on the stack. ‘write’ only ever returns a read-only true or false, so temp copies are not necessary for its sake.
| * Fix ext/B/t tests after OA_DANGEROUS removalsFather Chrysostomos2014-11-082-26/+26
| |
| * tied is OA_DANGEROUSFather Chrysostomos2014-11-083-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OA_DANGEROUS indicates that temporary copies may need to be made in list assignment, to handle things like: ($a, $b) = ($b, $a); In other words, an op type is flagged with OA_DANGEROUS if its return values could occur elsewhere on the stack. tied returns the same scalar that the tied variables uses to hold a reference to the object (so weaken(tied(...)) works). tie uses the very scalar that TIESCALAR (or TIEWHATEVER) returns and attaches it to the tied variable by magic. That returned scalar could be referenced elsewhere. That means ($a, $b) = ($c, tied $d) could have common vars on either side, if the tie constructor for $d happened to return $a or $b. (Normally it would have to be an XSUB or an lvalue sub for its return value not to have been copied.)
| * Remove OA_DANGEROUS from exitFather Chrysostomos2014-11-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | OA_DANGEROUS indicates that temporary copies may need to be made in list assignment, to handle things like: ($a, $b) = ($b, $a); In other words, an op type is flagged with OA_DANGEROUS if its return values could occur elsewhere on the stack. exit usually doesn’t return. When it fails, it returns a read-only undef, so we don’t need temp copies for its sake.
| * Remove OA_DANGEROUS from loopctl-type opsFather Chrysostomos2014-11-082-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OA_DANGEROUS indicates that temporary copies may need to be made in list assignment, to handle things like: ($a, $b) = ($b, $a); In other words, an op type is flagged with OA_DANGEROUS if its return values could occur elsewhere on the stack. These operators never return, so they shouldn’t necessitate temp copies. (This could probably apply to dump, too, but I don’t fully under- stand dump.)
| * Remove OA_DANGEROUS from dieFather Chrysostomos2014-11-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | OA_DANGEROUS indicates that temporary copies may need to be made in list assignment, to handle things like: ($a, $b) = ($b, $a); In other words, an op type is flagged with OA_DANGEROUS if its return values could occur elsewhere on the stack. die never returns, so it shouldn’t necessitate temp copies.
| * Remove OA_DANGEROUS from cond_exprFather Chrysostomos2014-11-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | OA_DANGEROUS indicates that temporary copies may need to be made in list assignment, to handle things like: ($a, $b) = ($b, $a); In other words, an op type is flagged with OA_DANGEROUS if its return values could occur elsewhere on the stack. ?: always returns one of its arguments. Since aassign_common_vars, which does the danger check, also checks the kids of the cond_expr op, it is not necessary for cond_expr to be flagged this way.
| * Remove OA_DANGEROUS from grep and mapFather Chrysostomos2014-11-082-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OA_DANGEROUS indicates that temporary copies may need to be made in list assignment, to handle things like: ($a, $b) = ($b, $a); In other words, an op type is flagged with OA_DANGEROUS if its return values could occur elsewhere on the stack. grep returns its arguments, while map returns the results of its first expression. Since aassign_common_vars, which does the danger check, will also check the kids of the mapstart/grepstart ops, it is not nec- essary for grep and map themselves to be flagged this way.
| * Remove OA_DANGEROUS from sortFather Chrysostomos2014-11-082-2/+2
|/ | | | | | | | | | | | | | | OA_DANGEROUS indicates that temporary copies may need to be made in list assignment, to handle things like: ($a, $b) = ($b, $a); In other words, an op type is flagged with OA_DANGEROUS if its return values could occur elsewhere on the stack. pp_sort returns its arguments. aassign_common_vars will check its kid ops for danger as well, so it’s not necessary for sort itself to be flagged this way. This will allow cases like ($a,$b) = sort($c,$d) to forego the temp copy.
* Don’t copy VMS hints to cop->op_privateFather Chrysostomos2014-11-087-195/+173
| | | | | | Commit d5ec29879 in 2006 started storing all the hints in COPs. Some VMS-specific hints have nonetheless still been copied from PL_hints to cop->op_private, though that is no longer necessary.
* FV_ISFINITE, not FV_ISINITE.Jarkko Hietaniemi2014-11-081-1/+1
|
* Remove OA_DANGEROUS from non-integer postdec/incFather Chrysostomos2014-11-082-8/+8
| | | | | | | | | | | | | | | | | OA_DANGEROUS indicates that temporary copies may need to be made in list assignment, to handle things like: ($a, $b) = ($b, $a); In other words, an op type is flagged with OA_DANGEROUS if its return values could occur elsewhere on the stack. While pp_postinc may return a lexical scalar, that only happens when the OPpTARGET_MY optimisation is happening; and aassign_common_vars in op.c checks specifically for that. Otherwise, it only returns a mortal or target, so it is not OA_DANGEROUS.
* Allow OPpTARGET_MY on non-integer postdec/incFather Chrysostomos2014-11-083-306/+306
| | | | | I don’t know why this was not done to begin with. The previous two commits fixed the only outstanding problems I am aware of.
* Make pp_postinc call set-magic on its targetFather Chrysostomos2014-11-082-1/+13
| | | | | | Its target may be a lexical scalar (under ‘use integer’ currently, and soon even outside of ‘use integer’). The assignment in $lex = $foo++ currently gets optimised away and ++ writes directly to $lex.
* Fix $lex = $ref++ under use integerFather Chrysostomos2014-11-082-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Operators generally have targets, that is, scalars in the pad that are used to return values. The same scalar is used again and again for efficiency. If the value assigned to a target is a reference, that can be bad, because the referent will last longer than expected, even forever. $ref++ used to have this problem (bug #9466). So commit v5.13.4-148-g7dcb9b9 fixed it by returning a new mortal if the return value was a reference. However, under ‘use integer’, the OPpTARGET_MY optimisation is per- mitted on postdec and postinc (why only under ‘use integer’ I don’t know). Under that optimisation, $lexicalvariable = <some op> has the assignment optimised away and the lexical variable becomes the operat- or’s target. If we skip assigning to the target and it is a lexical variable, then the assignment never happens: $ perl5.14.4 -le 'my $x=7; $_={}; $x = $_++; print $x' HASH(0x7ff4a8806d00) $ perl5.14.4 -Minteger -le 'my $x=7; $_={}; $x = $_++; print $x' 7
* Using bignum needs skip_if_miniperl().Jarkko Hietaniemi2014-11-081-2/+4
|
* skip_all, not skip, if only miniperl.Jarkko Hietaniemi2014-11-081-1/+1
|
* Wrong (non-existent) Config var name.Jarkko Hietaniemi2014-11-081-1/+1
|
* Fix one test message, add two tests.Jarkko Hietaniemi2014-11-081-1/+3
|
* undef the temp variables between tests.Jarkko Hietaniemi2014-11-081-0/+10
| | | | This way a failing result doesn't carry over between subtests.
* Perl_isfinitel is not necessarily always there.Jarkko Hietaniemi2014-11-081-2/+6
|
* Drop uselongdouble unless it really gives longer doubles.Jarkko Hietaniemi2014-11-081-5/+3
|