Mercurial > octave
changeset 25829:8ac4bfa55053 stable
restore optimization for compound transpose-mul/div ops (bug #45890)
* oct-parse.in.yy: Undo changset b5dc88246c02.
* pt-cbinop.cc (maybe_compound_binary_expression): Disable only
compound negation and elementwise and/or ops here instead of disabling
all compound binary ops.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 28 Aug 2018 13:32:53 -0400 |
parents | b7e0ed1b2b32 |
children | 9b0e5a035cd0 d0062829754a |
files | libinterp/parse-tree/oct-parse.in.yy libinterp/parse-tree/pt-cbinop.cc |
diffstat | 2 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/parse-tree/oct-parse.in.yy Thu Aug 23 15:27:10 2018 +0200 +++ b/libinterp/parse-tree/oct-parse.in.yy Tue Aug 28 13:32:53 2018 -0400 @@ -2646,7 +2646,7 @@ int l = tok_val->line (); int c = tok_val->column (); - return new tree_binary_expression (op1, op2, l, c, t); + return maybe_compound_binary_expression (op1, op2, l, c, t); } // Build a boolean expression.
--- a/libinterp/parse-tree/pt-cbinop.cc Thu Aug 23 15:27:10 2018 +0200 +++ b/libinterp/parse-tree/pt-cbinop.cc Tue Aug 28 13:32:53 2018 -0400 @@ -179,10 +179,14 @@ ct = simplify_ldiv_op (ca, cb); break; +#if 0 + // Restore this case if short-circuit behavior can be preserved + // when needed. See bug #54465. case octave_value::op_el_and: case octave_value::op_el_or: ct = simplify_and_or_op (ca, cb, t); break; +#endif default: ct = octave_value::unknown_compound_binary_op;