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

Issue 8429027: Add an external array type to support typed arrays. (Closed)

Created:
9 years, 1 month ago by cshapiro
Modified:
9 years, 1 month ago
Reviewers:
siva, Ivan Posva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Add an external array type to support typed arrays. Committed: https://code.google.com/p/dart/source/detail?r=1601

Patch Set 1 #

Total comments: 10

Patch Set 2 : Add dart interface #

Patch Set 3 : Address review comments from patch set 1 #

Total comments: 4

Patch Set 4 : Make loads and stores byte relative #

Total comments: 10

Patch Set 5 : Address review comments #

Patch Set 6 : wrap another native, tweak whitespace #

Total comments: 9

Patch Set 7 : Address final review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+832 lines, -1 line) Patch
A runtime/lib/byte_buffer.cc View 1 2 3 4 1 chunk +246 lines, -0 lines 0 comments Download
A runtime/lib/byte_buffer.dart View 1 2 3 4 5 1 chunk +222 lines, -0 lines 0 comments Download
M runtime/lib/lib_sources.gypi View 1 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/bootstrap_natives.h View 1 2 3 4 1 chunk +22 lines, -0 lines 0 comments Download
M runtime/vm/class_finalizer.cc View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
M runtime/vm/globals.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/object.h View 1 2 3 4 5 6 1 chunk +64 lines, -0 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 4 5 6 5 chunks +61 lines, -1 line 0 comments Download
M runtime/vm/object_store.h View 1 3 chunks +7 lines, -0 lines 0 comments Download
M runtime/vm/object_store.cc View 1 2 chunks +3 lines, -0 lines 0 comments Download
M runtime/vm/object_test.cc View 1 2 3 4 5 6 1 chunk +166 lines, -0 lines 0 comments Download
M runtime/vm/raw_object.h View 1 2 3 4 5 6 2 chunks +11 lines, -0 lines 0 comments Download
M runtime/vm/raw_object.cc View 1 2 3 4 5 6 1 chunk +9 lines, -0 lines 0 comments Download
M runtime/vm/raw_object_snapshot.cc View 1 2 3 4 5 6 1 chunk +15 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
cshapiro
9 years, 1 month ago (2011-11-01 00:20:48 UTC) #1
siva
LGTM once comments regarding byte_start and byte_end is addressed. http://codereview.chromium.org/8429027/diff/1/runtime/vm/object.h File runtime/vm/object.h (right): http://codereview.chromium.org/8429027/diff/1/runtime/vm/object.h#newcode2856 runtime/vm/object.h:2856: ...
9 years, 1 month ago (2011-11-02 17:05:30 UTC) #2
cshapiro
http://codereview.chromium.org/8429027/diff/1/runtime/vm/object.h File runtime/vm/object.h (right): http://codereview.chromium.org/8429027/diff/1/runtime/vm/object.h#newcode2856 runtime/vm/object.h:2856: intptr_t byte_start = index / sizeof(T); No, it was ...
9 years, 1 month ago (2011-11-04 18:16:21 UTC) #3
cshapiro
PTAL
9 years, 1 month ago (2011-11-10 00:23:47 UTC) #4
Ivan Posva
Older comments were stuck. Not sure whether they still apply. -Ivan http://codereview.chromium.org/8429027/diff/11001/runtime/lib/byte_buffer.cc File runtime/lib/byte_buffer.cc (right): ...
9 years, 1 month ago (2011-11-10 18:06:41 UTC) #5
Ivan Posva
http://codereview.chromium.org/8429027/diff/12001/runtime/lib/byte_buffer.cc File runtime/lib/byte_buffer.cc (right): http://codereview.chromium.org/8429027/diff/12001/runtime/lib/byte_buffer.cc#newcode65 runtime/lib/byte_buffer.cc:65: if ((index.Value() < 0) || (index.Value() >= buffer.Length())) { ...
9 years, 1 month ago (2011-11-10 22:31:02 UTC) #6
cshapiro
PTAL http://codereview.chromium.org/8429027/diff/11001/runtime/lib/byte_buffer.cc File runtime/lib/byte_buffer.cc (right): http://codereview.chromium.org/8429027/diff/11001/runtime/lib/byte_buffer.cc#newcode25 runtime/lib/byte_buffer.cc:25: if (length.IsNull() || (length.Value() < 0)) { I ...
9 years, 1 month ago (2011-11-11 00:37:53 UTC) #7
Ivan Posva
http://codereview.chromium.org/8429027/diff/19002/runtime/lib/byte_buffer.cc File runtime/lib/byte_buffer.cc (right): http://codereview.chromium.org/8429027/diff/19002/runtime/lib/byte_buffer.cc#newcode131 runtime/lib/byte_buffer.cc:131: if (index.Value() >= buffer.Length()) { Don't you need to ...
9 years, 1 month ago (2011-11-16 22:50:00 UTC) #8
cshapiro
9 years, 1 month ago (2011-11-17 03:17:02 UTC) #9
http://codereview.chromium.org/8429027/diff/19002/runtime/lib/byte_buffer.cc
File runtime/lib/byte_buffer.cc (right):

http://codereview.chromium.org/8429027/diff/19002/runtime/lib/byte_buffer.cc#...
runtime/lib/byte_buffer.cc:153: SetIndexed<int8_t, Smi>(arguments);
Based on a conversation with Srdjan, a value in the Smi range will always be
represented as a Smi.  Same goes for Mint.  Am I confused?

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

http://codereview.chromium.org/8429027/diff/19002/runtime/vm/object.cc#newcod...
runtime/vm/object.cc:6718: return !memcmp(this->Addr<uint8_t>(0),
other_array.Addr<uint8_t>(0), len);
Certainly.  Done.

http://codereview.chromium.org/8429027/diff/19002/runtime/vm/object.h
File runtime/vm/object.h (right):

http://codereview.chromium.org/8429027/diff/19002/runtime/vm/object.h#newcode...
runtime/vm/object.h:2806: ASSERT(Utils::IsAligned(byte_offset, sizeof(T)));
It depends on whether the base address will ever be misaligned.  Either way, it
does not hurt to make the change you propose, so I will go ahead and
future-proof the code. Done.

http://codereview.chromium.org/8429027/diff/19002/runtime/vm/object.h#newcode...
runtime/vm/object.h:2811: ASSERT(Utils::IsAligned(byte_offset, sizeof(T)));
Done.

Powered by Google App Engine
This is Rietveld 408576698