Thread overview
[Issue 12780] Multiplying integer array by scalar double fails
Dec 18, 2014
John Colvin
Dec 19, 2014
Kenji Hara
December 18, 2014
https://issues.dlang.org/show_bug.cgi?id=12780

John Colvin <john.loughran.colvin@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |john.loughran.colvin@gmail.
                   |                            |com
           Hardware|x86_64                      |All
            Summary|Multiplying integer vector  |Multiplying integer array
                   |by scalar double fails      |by scalar double fails
                 OS|Linux                       |All

--
December 19, 2014
https://issues.dlang.org/show_bug.cgi?id=12780

Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> ---
https://github.com/D-Programming-Language/dmd/pull/4218

--
December 27, 2014
https://issues.dlang.org/show_bug.cgi?id=12780

github-bugzilla@puremagic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--
December 27, 2014
https://issues.dlang.org/show_bug.cgi?id=12780

--- Comment #2 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/5bea0130e4d3491dfcae1501f8248b478fb5e8ae fix Issue 12780 - Multiplying integer array by scalar double fails

Support upcasting slice elements in array operations.

1. The tweak in the buildArrayIdent() retains backward compatibility.
a) If no element upcasting exists in array operation, the generated function
name is not changed.
  double_res[] = double_val * double_arr[];
  // _arrayExpSliceMulSliceAssign_d
b) If upcasting slice elements is necessary, it will be encoded by the postfix
"Of" + element-type-deco
  double_res[] = double_val * int_arr[];
  // _arrayExpSlice'Ofi'MulSliceAssign_d

2. Even if the whole array operation requires double element, the sub array
operations can be processed by int.
  double_res[] = (int_val ^ int_arr[]) * double_val;
  // typeof(int_val ^ int_arr[]) == int[]

https://github.com/D-Programming-Language/dmd/commit/22611aa7eda98705a5661f0df424434a73b3c837 Merge pull request #4218 from 9rnsr/fix12780

Issue 12780 - Multiplying integer array by scalar double fails

--
December 27, 2014
https://issues.dlang.org/show_bug.cgi?id=12780

bearophile_hugs@eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs@eml.cc

--- Comment #3 from bearophile_hugs@eml.cc ---
(In reply to github-bugzilla from comment #2)

> Issue 12780 - Multiplying integer array by scalar double fails

For me one of the most important problems with array operations is Issue 10523

--
February 18, 2015
https://issues.dlang.org/show_bug.cgi?id=12780

--- Comment #4 from github-bugzilla@puremagic.com ---
Commits pushed to 2.067 at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/5bea0130e4d3491dfcae1501f8248b478fb5e8ae fix Issue 12780 - Multiplying integer array by scalar double fails

https://github.com/D-Programming-Language/dmd/commit/22611aa7eda98705a5661f0df424434a73b3c837 Merge pull request #4218 from 9rnsr/fix12780

--