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

Issue 11414211: Expose transferable constructor to Int8List (Closed)

Created:
8 years ago by Cutch
Modified:
8 years ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Expose transferable constructor to Int8List Committed: https://code.google.com/p/dart/source/detail?r=15598

Patch Set 1 #

Total comments: 5

Patch Set 2 : Move aligned allocation routines into OS:: interface #

Patch Set 3 : Add constructors for all array types. #

Patch Set 4 : Fix whitespace issues #

Patch Set 5 : Add tests #

Total comments: 18

Patch Set 6 : Review fixes #

Total comments: 14

Patch Set 7 : Review fixes #

Total comments: 5

Patch Set 8 : Final review fixes #

Total comments: 4

Patch Set 9 : Style guide fix #

Patch Set 10 : os.h fix #

Total comments: 10
Unified diffs Side-by-side diffs Delta from patch set Stats (+538 lines, -51 lines) Patch
M runtime/lib/byte_array.cc View 1 2 3 4 5 6 7 8 10 chunks +140 lines, -0 lines 4 comments Download
M runtime/lib/byte_array.dart View 1 2 3 4 5 6 7 30 chunks +103 lines, -1 line 1 comment Download
M runtime/tests/vm/dart/byte_array_test.dart View 1 2 3 4 22 chunks +181 lines, -50 lines 0 comments Download
M runtime/vm/bootstrap_natives.h View 1 2 3 4 5 6 7 8 1 chunk +10 lines, -0 lines 0 comments Download
M runtime/vm/os.h View 1 2 3 4 5 6 7 8 9 1 chunk +16 lines, -0 lines 5 comments Download
M runtime/vm/os_android.cc View 1 2 3 4 5 6 2 chunks +18 lines, -0 lines 0 comments Download
M runtime/vm/os_linux.cc View 1 2 3 4 5 6 2 chunks +18 lines, -0 lines 0 comments Download
M runtime/vm/os_macos.cc View 1 2 3 4 5 6 1 chunk +19 lines, -0 lines 0 comments Download
M runtime/vm/os_test.cc View 1 2 3 4 5 6 7 1 chunk +13 lines, -0 lines 0 comments Download
M runtime/vm/os_win.cc View 1 2 3 4 5 6 2 chunks +18 lines, -0 lines 0 comments Download
M runtime/vm/raw_object.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
cshapiro
https://codereview.chromium.org/11414211/diff/1/runtime/lib/byte_array.cc File runtime/lib/byte_array.cc (right): https://codereview.chromium.org/11414211/diff/1/runtime/lib/byte_array.cc#newcode46 runtime/lib/byte_array.cc:46: static void* AllocateExternalBytes(intptr_t len, intptr_t alignment = 16) { ...
8 years ago (2012-11-28 22:28:01 UTC) #1
srdjan
DBC https://codereview.chromium.org/11414211/diff/1/runtime/lib/byte_array.cc File runtime/lib/byte_array.cc (right): https://codereview.chromium.org/11414211/diff/1/runtime/lib/byte_array.cc#newcode48 runtime/lib/byte_array.cc:48: intptr_t slop = alignment+pointersize; please add spaces around ...
8 years ago (2012-11-28 23:30:26 UTC) #2
cshapiro
https://codereview.chromium.org/11414211/diff/6007/runtime/lib/byte_array.cc File runtime/lib/byte_array.cc (right): https://codereview.chromium.org/11414211/diff/6007/runtime/lib/byte_array.cc#newcode45 runtime/lib/byte_array.cc:45: #define EXTERNAL_ALIGNMENT 16 Macros like this are strongly discouraged ...
8 years ago (2012-11-29 21:28:17 UTC) #3
Cutch
https://codereview.chromium.org/11414211/diff/6007/runtime/lib/byte_array.cc File runtime/lib/byte_array.cc (right): https://codereview.chromium.org/11414211/diff/6007/runtime/lib/byte_array.cc#newcode45 runtime/lib/byte_array.cc:45: #define EXTERNAL_ALIGNMENT 16 On 2012/11/29 21:28:17, cshapiro wrote: > ...
8 years ago (2012-11-29 23:53:17 UTC) #4
cshapiro
https://codereview.chromium.org/11414211/diff/2003/runtime/lib/byte_array.cc File runtime/lib/byte_array.cc (right): https://codereview.chromium.org/11414211/diff/2003/runtime/lib/byte_array.cc#newcode47 runtime/lib/byte_array.cc:47: template<typename T> Sorry, this is not what I meant. ...
8 years ago (2012-11-30 00:23:25 UTC) #5
Cutch
Everything is fixed except the location of the template. See my note. https://codereview.chromium.org/11414211/diff/2003/runtime/lib/byte_array.cc File runtime/lib/byte_array.cc ...
8 years ago (2012-11-30 04:09:54 UTC) #6
cshapiro
almost there, just minor stuff https://codereview.chromium.org/11414211/diff/2003/runtime/lib/byte_array.cc File runtime/lib/byte_array.cc (right): https://codereview.chromium.org/11414211/diff/2003/runtime/lib/byte_array.cc#newcode47 runtime/lib/byte_array.cc:47: template<typename T> Adding the ...
8 years ago (2012-11-30 18:02:15 UTC) #7
Cutch
https://codereview.chromium.org/11414211/diff/7011/runtime/lib/byte_array.cc File runtime/lib/byte_array.cc (right): https://codereview.chromium.org/11414211/diff/7011/runtime/lib/byte_array.cc#newcode49 runtime/lib/byte_array.cc:49: intptr_t size = n*sizeof(T); // NOLINT On 2012/11/30 18:02:16, ...
8 years ago (2012-11-30 18:21:43 UTC) #8
cshapiro
https://codereview.chromium.org/11414211/diff/24/runtime/lib/byte_array.cc File runtime/lib/byte_array.cc (right): https://codereview.chromium.org/11414211/diff/24/runtime/lib/byte_array.cc#newcode292 runtime/lib/byte_array.cc:292: int8_t* bytes = OS::AllocateAlignedArray<int8_t>(len, newline after the open paren ...
8 years ago (2012-11-30 18:40:26 UTC) #9
cshapiro
sorry, missed this https://codereview.chromium.org/11414211/diff/24/runtime/vm/os.h File runtime/vm/os.h (right): https://codereview.chromium.org/11414211/diff/24/runtime/vm/os.h#newcode45 runtime/vm/os.h:45: template<typename T> If you are going ...
8 years ago (2012-11-30 18:56:53 UTC) #10
Cutch
https://codereview.chromium.org/11414211/diff/24/runtime/lib/byte_array.cc File runtime/lib/byte_array.cc (right): https://codereview.chromium.org/11414211/diff/24/runtime/lib/byte_array.cc#newcode292 runtime/lib/byte_array.cc:292: int8_t* bytes = OS::AllocateAlignedArray<int8_t>(len, On 2012/11/30 18:40:26, cshapiro wrote: ...
8 years ago (2012-11-30 19:27:10 UTC) #11
cshapiro
lgtm ship it!
8 years ago (2012-11-30 19:30:39 UTC) #12
Cutch
On 2012/11/30 19:30:39, cshapiro wrote: > lgtm > > ship it! Test configurations: none_vm_debug_ia32 none_vm_release_ia32 ...
8 years ago (2012-11-30 20:34:49 UTC) #13
siva
DBC https://codereview.chromium.org/11414211/diff/5024/runtime/lib/byte_array.cc File runtime/lib/byte_array.cc (right): https://codereview.chromium.org/11414211/diff/5024/runtime/lib/byte_array.cc#newcode394 runtime/lib/byte_array.cc:394: uint16_t* bytes = OS::AllocateAlignedArray<uint16_t>( The name 'byte' here ...
8 years ago (2012-11-30 22:15:53 UTC) #14
cshapiro
https://codereview.chromium.org/11414211/diff/5024/runtime/lib/byte_array.cc File runtime/lib/byte_array.cc (right): https://codereview.chromium.org/11414211/diff/5024/runtime/lib/byte_array.cc#newcode394 runtime/lib/byte_array.cc:394: uint16_t* bytes = OS::AllocateAlignedArray<uint16_t>( The object.h class calls this ...
8 years ago (2012-11-30 22:18:11 UTC) #15
siva
https://codereview.chromium.org/11414211/diff/5024/runtime/lib/byte_array.cc File runtime/lib/byte_array.cc (right): https://codereview.chromium.org/11414211/diff/5024/runtime/lib/byte_array.cc#newcode394 runtime/lib/byte_array.cc:394: uint16_t* bytes = OS::AllocateAlignedArray<uint16_t>( Sure data is fine too. ...
8 years ago (2012-11-30 22:33:21 UTC) #16
Cutch
https://codereview.chromium.org/11414211/diff/5024/runtime/vm/os.h File runtime/vm/os.h (right): https://codereview.chromium.org/11414211/diff/5024/runtime/vm/os.h#newcode50 runtime/vm/os.h:50: } This is how the code was originally structured. ...
8 years ago (2012-11-30 22:34:27 UTC) #17
cshapiro
https://codereview.chromium.org/11414211/diff/5024/runtime/vm/os.h File runtime/vm/os.h (right): https://codereview.chromium.org/11414211/diff/5024/runtime/vm/os.h#newcode50 runtime/vm/os.h:50: } We also have code that uses new and ...
8 years ago (2012-11-30 22:35:53 UTC) #18
Ivan Posva
Also please fix your setup to include reviews@dartlang.org in the CC line. -Ivan https://codereview.chromium.org/11414211/diff/5024/runtime/lib/byte_array.cc File ...
8 years ago (2012-12-02 14:17:55 UTC) #19
Cutch
8 years ago (2012-12-02 19:14:54 UTC) #20
Message was sent while issue was closed.
https://codereview.chromium.org/11434077

On 2012/12/02 14:17:55, Ivan Posva wrote:
> Also please fix your setup to include mailto:reviews@dartlang.org in the CC
line.
> 
> -Ivan
> 
> https://codereview.chromium.org/11414211/diff/5024/runtime/lib/byte_array.cc
> File runtime/lib/byte_array.cc (right):
> 
>
https://codereview.chromium.org/11414211/diff/5024/runtime/lib/byte_array.cc#...
> runtime/lib/byte_array.cc:288: DEFINE_NATIVE_ENTRY(Int8Array_newTransferrable,
> 1) {
> The spelling transferable is generally preferred, especially since the DOM
APIs
> only use on r:
> http://dev.w3.org/html5/spec/common-dom-interfaces.html#transferable-objects
> 
> https://codereview.chromium.org/11414211/diff/5024/runtime/lib/byte_array.dart
> File runtime/lib/byte_array.dart (right):
> 
>
https://codereview.chromium.org/11414211/diff/5024/runtime/lib/byte_array.dar...
> runtime/lib/byte_array.dart:10: /* patch */ factory Int8List.transferrable(int
> length) {
> ditto

Powered by Google App Engine
This is Rietveld 408576698