Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Issue 148043003: Add Float64x2, Float64x2List, etc... with runtime and dart2js implementations (Closed)

Created:
6 years, 10 months ago by Cutch
Modified:
6 years, 10 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Add Float64x2, Float64x2List, etc... with runtime and dart2js implementations R=sra@google.com, srdjan@google.com Committed: https://code.google.com/p/dart/source/detail?r=32196

Patch Set 1 #

Total comments: 10

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 21
Unified diffs Side-by-side diffs Delta from patch set Stats (+1455 lines, -86 lines) Patch
M runtime/lib/simd128.cc View 1 2 3 chunks +188 lines, -4 lines 0 comments Download
M runtime/lib/typed_data.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/lib/typed_data.dart View 9 chunks +276 lines, -0 lines 0 comments Download
M runtime/platform/globals.h View 1 3 chunks +10 lines, -0 lines 0 comments Download
M runtime/vm/bootstrap_natives.h View 5 chunks +25 lines, -0 lines 0 comments Download
M runtime/vm/intrinsifier.h View 2 chunks +2 lines, -0 lines 0 comments Download
M runtime/vm/object.h View 1 2 3 chunks +33 lines, -1 line 0 comments Download
M runtime/vm/object.cc View 1 6 chunks +97 lines, -1 line 0 comments Download
M runtime/vm/object_store.h View 3 chunks +12 lines, -0 lines 0 comments Download
M runtime/vm/object_store.cc View 2 chunks +4 lines, -0 lines 0 comments Download
M runtime/vm/raw_object.h View 7 chunks +27 lines, -9 lines 0 comments Download
M runtime/vm/raw_object.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M runtime/vm/raw_object_snapshot.cc View 5 chunks +52 lines, -10 lines 0 comments Download
M runtime/vm/service_test.cc View 1 2 3 3 chunks +46 lines, -57 lines 0 comments Download
M runtime/vm/snapshot.h View 2 chunks +2 lines, -0 lines 0 comments Download
runtime/vm/snapshot.cc View 1 chunk +12 lines, -0 lines 0 comments Download
M runtime/vm/symbols.h View 5 chunks +8 lines, -0 lines 0 comments Download
M sdk/lib/typed_data/dart2js/typed_data_dart2js.dart View 1 8 chunks +262 lines, -4 lines 0 comments Download
M sdk/lib/typed_data/typed_data.dart View 3 chunks +95 lines, -0 lines 21 comments Download
A tests/lib/typed_data/float64x2_functional_test.dart View 1 1 chunk +295 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Cutch
6 years, 10 months ago (2014-01-28 19:06:42 UTC) #1
srdjan
LGTM for the VM changes. https://codereview.chromium.org/148043003/diff/1/runtime/lib/simd128.cc File runtime/lib/simd128.cc (right): https://codereview.chromium.org/148043003/diff/1/runtime/lib/simd128.cc#newcode66 runtime/lib/simd128.cc:66: float _y = v.y(); ...
6 years, 10 months ago (2014-01-29 23:49:41 UTC) #2
sra1
https://codereview.chromium.org/148043003/diff/1/sdk/lib/typed_data/dart2js/typed_data_dart2js.dart File sdk/lib/typed_data/dart2js/typed_data_dart2js.dart (right): https://codereview.chromium.org/148043003/diff/1/sdk/lib/typed_data/dart2js/typed_data_dart2js.dart#newcode1069 sdk/lib/typed_data/dart2js/typed_data_dart2js.dart:1069: final int elementSizeInBytes = 16; Shouldn't it be a ...
6 years, 10 months ago (2014-01-30 02:08:08 UTC) #3
Cutch
https://codereview.chromium.org/148043003/diff/1/sdk/lib/typed_data/dart2js/typed_data_dart2js.dart File sdk/lib/typed_data/dart2js/typed_data_dart2js.dart (right): https://codereview.chromium.org/148043003/diff/1/sdk/lib/typed_data/dart2js/typed_data_dart2js.dart#newcode1069 sdk/lib/typed_data/dart2js/typed_data_dart2js.dart:1069: final int elementSizeInBytes = 16; On 2014/01/30 02:08:09, sra1 ...
6 years, 10 months ago (2014-01-30 16:06:52 UTC) #4
Cutch
https://codereview.chromium.org/148043003/diff/1/runtime/lib/simd128.cc File runtime/lib/simd128.cc (right): https://codereview.chromium.org/148043003/diff/1/runtime/lib/simd128.cc#newcode66 runtime/lib/simd128.cc:66: float _y = v.y(); On 2014/01/29 23:49:42, srdjan wrote: ...
6 years, 10 months ago (2014-01-30 18:27:26 UTC) #5
sra1
lgtm Thanks!
6 years, 10 months ago (2014-01-30 23:44:39 UTC) #6
Cutch
Committed patchset #4 manually as r32196 (presubmit successful).
6 years, 10 months ago (2014-01-31 15:28:17 UTC) #7
Lasse Reichstein Nielsen
Late comment drive-by. I can look at doing some of the documentation myself on Monday. ...
6 years, 10 months ago (2014-01-31 17:51:09 UTC) #8
Cutch
6 years, 10 months ago (2014-01-31 19:36:13 UTC) #9
Message was sent while issue was closed.
Doc fixes in this CL: https://codereview.chromium.org/144863003/

Lasse, please note that the typed_data classes are documented in two places (the
interface and the dart2js implementation) and I believe the doc generator
consumes the dart2js sources.

https://codereview.chromium.org/148043003/diff/60001/sdk/lib/typed_data/typed...
File sdk/lib/typed_data/typed_data.dart (right):

https://codereview.chromium.org/148043003/diff/60001/sdk/lib/typed_data/typed...
sdk/lib/typed_data/typed_data.dart:877: * all of whose elements are initially
zero.
On 2014/01/31 17:51:10, Lasse Reichstein Nielsen wrote:
> zero on each entry
> ?

Done.

https://codereview.chromium.org/148043003/diff/60001/sdk/lib/typed_data/typed...
sdk/lib/typed_data/typed_data.dart:882: * Creates a [Float64x2List] with the
same size as the [elements] list
On 2014/01/31 17:51:10, Lasse Reichstein Nielsen wrote:
> size -> length

Done.

https://codereview.chromium.org/148043003/diff/60001/sdk/lib/typed_data/typed...
sdk/lib/typed_data/typed_data.dart:900: * BYTES_PER_ELEMENT.
On 2014/01/31 17:51:10, Lasse Reichstein Nielsen wrote:
> -> [BYTES_PER_ELEMENT]
> (or `BYTES_PER_ELEMENT` if you don't want a link, but I think it should be a
> link)

Done.

https://codereview.chromium.org/148043003/diff/60001/sdk/lib/typed_data/typed...
sdk/lib/typed_data/typed_data.dart:919: external factory
Float32x4.fromFloat64x2(Float64x2 v);
On 2014/01/31 17:51:10, Lasse Reichstein Nielsen wrote:
> Needs documentation. It is not obvious what the resulting Float32x4 contains -
> guessing (v.x, v.y, 0.0, 0.0)?
> 
> Should we have Float32x4.fromFloat64x2s(Float64x2 xy, Float64x2 zw)?

Done. I'm not sure if we should have Float32x4.fromFloat64x2s because there
aren't CPU instructions which do that quickly.

https://codereview.chromium.org/148043003/diff/60001/sdk/lib/typed_data/typed...
sdk/lib/typed_data/typed_data.dart:1590: * Interface of Dart Float64x2 immutable
value type and operations.
On 2014/01/31 17:51:10, Lasse Reichstein Nielsen wrote:
> First line is redundant with being an abstract class called Float64x2.

Done.

https://codereview.chromium.org/148043003/diff/60001/sdk/lib/typed_data/typed...
sdk/lib/typed_data/typed_data.dart:1598: external factory
Float64x2.fromFloat32x4(Float32x4 v);
On 2014/01/31 17:51:10, Lasse Reichstein Nielsen wrote:
> Also needs documentation.

Done.

https://codereview.chromium.org/148043003/diff/60001/sdk/lib/typed_data/typed...
sdk/lib/typed_data/typed_data.dart:1611: /// Returns a copy of [this] each lane
being scaled by [s].
On 2014/01/31 17:51:10, Lasse Reichstein Nielsen wrote:
> So this is equivalent to  this * new Float64x2.splat(s) ?
> Might be worth saying.

Done.

https://codereview.chromium.org/148043003/diff/60001/sdk/lib/typed_data/typed...
sdk/lib/typed_data/typed_data.dart:1625: /// Extract the sign bits from each
lane return them in the first 2 bits.
On 2014/01/31 17:51:10, Lasse Reichstein Nielsen wrote:
> Specify order. I assume "x" is bit zero and "y" is bit one?

Done.

https://codereview.chromium.org/148043003/diff/60001/sdk/lib/typed_data/typed...
sdk/lib/typed_data/typed_data.dart:1640: Float64x2 sqrt();
On 2014/01/31 17:51:10, Lasse Reichstein Nielsen wrote:
> How about having:
>   static Float64x2 sincos(double radian);
> ? I could see the use for that :)

Will discuss with Srdjan and add that in a follow up CL.

Powered by Google App Engine
This is Rietveld 408576698