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

Issue 9958046: Implement {Int,Uint}{8,16,32,64} and Float{32,64} typed arrays. (Closed)

Created:
8 years, 8 months ago by cshapiro
Modified:
8 years, 7 months ago
Reviewers:
jjb, siva, Ivan Posva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Implement {Int,Uint}{8,16,32,64} and Float{32,64} typed arrays. Internal and external representations of each array are provided. A single interface type implementing the ByteArray and List interfaces is shared among the internal and external implementation type. Committed: https://code.google.com/p/dart/source/detail?r=7311

Patch Set 1 #

Patch Set 2 : add unit tests and byte view class #

Patch Set 3 : remove reference withheld int8 view test #

Patch Set 4 : remove commented-out code #

Patch Set 5 : add view classes and their tests #

Total comments: 26

Patch Set 6 : address review comments #

Total comments: 10

Patch Set 7 : address final review comments #

Patch Set 8 : move test code, minor formatting and consistency tweaks #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7899 lines, -1253 lines) Patch
M runtime/lib/byte_array.cc View 1 2 3 4 5 2 chunks +445 lines, -139 lines 0 comments Download
M runtime/lib/byte_array.dart View 1 2 3 4 5 6 7 2 chunks +2093 lines, -311 lines 0 comments Download
A runtime/tests/vm/dart/byte_array_test.dart View 1 2 3 4 5 6 7 1 chunk +2177 lines, -0 lines 0 comments Download
M runtime/vm/bootstrap_natives.h View 1 1 chunk +70 lines, -41 lines 0 comments Download
M runtime/vm/class_finalizer.cc View 1 3 chunks +59 lines, -7 lines 0 comments Download
M runtime/vm/dart_api_impl.cc View 1 2 3 4 5 8 chunks +49 lines, -49 lines 0 comments Download
M runtime/vm/dart_api_message.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/vm/intrinsifier.h View 1 1 chunk +0 lines, -2 lines 0 comments Download
M runtime/vm/intrinsifier_ia32.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -44 lines 0 comments Download
M runtime/vm/intrinsifier_x64.cc View 1 2 3 4 5 6 1 chunk +0 lines, -10 lines 0 comments Download
M runtime/vm/object.h View 1 2 3 4 5 6 4 chunks +976 lines, -91 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 4 5 6 11 chunks +675 lines, -78 lines 0 comments Download
M runtime/vm/object_store.h View 1 2 3 4 5 3 chunks +174 lines, -12 lines 0 comments Download
M runtime/vm/object_store.cc View 3 chunks +80 lines, -8 lines 0 comments Download
M runtime/vm/object_test.cc View 1 2 3 4 5 6 1 chunk +234 lines, -411 lines 0 comments Download
M runtime/vm/raw_object.h View 1 2 3 4 5 6 4 chunks +165 lines, -14 lines 0 comments Download
M runtime/vm/raw_object.cc View 1 2 3 4 5 6 2 chunks +244 lines, -10 lines 0 comments Download
M runtime/vm/raw_object_snapshot.cc View 1 2 3 4 5 6 2 chunks +451 lines, -19 lines 0 comments Download
M runtime/vm/snapshot_test.cc View 1 2 chunks +5 lines, -5 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
cshapiro
8 years, 8 months ago (2012-03-31 03:08:15 UTC) #1
cshapiro
8 years, 7 months ago (2012-04-28 23:17:11 UTC) #2
Ivan Posva
https://chromiumcodereview.appspot.com/9958046/diff/9002/runtime/lib/byte_array.cc File runtime/lib/byte_array.cc (right): https://chromiumcodereview.appspot.com/9958046/diff/9002/runtime/lib/byte_array.cc#newcode36 runtime/lib/byte_array.cc:36: GET_NATIVE_ARGUMENT(ObjectT, integer_value, arguments->At(2)); I find the name integer_value a ...
8 years, 7 months ago (2012-05-02 08:19:17 UTC) #3
cshapiro
PTAL http://codereview.chromium.org/9958046/diff/9002/runtime/lib/byte_array.cc File runtime/lib/byte_array.cc (right): http://codereview.chromium.org/9958046/diff/9002/runtime/lib/byte_array.cc#newcode36 runtime/lib/byte_array.cc:36: GET_NATIVE_ARGUMENT(ObjectT, integer_value, arguments->At(2)); True. I have used the ...
8 years, 7 months ago (2012-05-03 04:01:49 UTC) #4
Ivan Posva
LGTM with comments. -Ivan http://codereview.chromium.org/9958046/diff/9002/runtime/lib/byte_array.dart File runtime/lib/byte_array.dart (right): http://codereview.chromium.org/9958046/diff/9002/runtime/lib/byte_array.dart#newcode129 runtime/lib/byte_array.dart:129: void addLast(int value) { On ...
8 years, 7 months ago (2012-05-03 05:53:19 UTC) #5
cshapiro
8 years, 7 months ago (2012-05-04 04:42:04 UTC) #6
http://codereview.chromium.org/9958046/diff/16002/runtime/lib/byte_array.dart
File runtime/lib/byte_array.dart (right):

http://codereview.chromium.org/9958046/diff/16002/runtime/lib/byte_array.dart...
runtime/lib/byte_array.dart:1388: assert(array is _ByteArrayBase);
Removed.

http://codereview.chromium.org/9958046/diff/16002/runtime/lib/byte_array.dart...
runtime/lib/byte_array.dart:1502: class _ByteArrayViewBase<E> {
Removed.

http://codereview.chromium.org/9958046/diff/16002/runtime/lib/byte_array.dart...
runtime/lib/byte_array.dart:1513: void addAll(Collection<int> value) {
Removed.

http://codereview.chromium.org/9958046/diff/16002/runtime/vm/intrinsifier.h
File runtime/vm/intrinsifier.h (right):

http://codereview.chromium.org/9958046/diff/16002/runtime/vm/intrinsifier.h#n...
runtime/vm/intrinsifier.h:64: V(GrowableObjectArray, set:data,
GrowableArray_setData)                      \
I spoke with Srdjan about getting some help writing new intrinsic
implementations of the access methods.  We will work on that together
post-submit.

http://codereview.chromium.org/9958046/diff/16002/runtime/vm/object.cc
File runtime/vm/object.cc (right):

http://codereview.chromium.org/9958046/diff/16002/runtime/vm/object.cc#newcod...
runtime/vm/object.cc:627: // String& public_class_name = String::Handle();
Sorry, you weren't supposed to see that.  Fixed!

Powered by Google App Engine
This is Rietveld 408576698