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

Issue 134893003: Add internal operation that converts a growable list to a fixed list. (Closed)

Created:
6 years, 10 months ago by Lasse Reichstein Nielsen
Modified:
6 years, 10 months ago
Reviewers:
floitsch, srdjan, Ivan Posva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Add internal operation that converts a growable list to a fixed list. The conversion breaks the original list, but doesn't copy data. Currently only used in List.from(Iterable). BUG= http://dartbug.com/9458 R=floitsch@google.com, iposva@google.com Committed: https://code.google.com/p/dart/source/detail?r=32896

Patch Set 1 #

Total comments: 13

Patch Set 2 : Import correct dartjs helper library #

Total comments: 2

Patch Set 3 : Rename native to STaticClass_toFixedLength #

Total comments: 12

Patch Set 4 : Make top-level patch file native. Add comment. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -10 lines) Patch
M runtime/lib/growable_array.cc View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
M runtime/lib/internal_patch.dart View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M runtime/vm/bootstrap_natives.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/bootstrap_natives.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M runtime/vm/dart_api_impl_test.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/parser.cc View 1 1 chunk +2 lines, -2 lines 1 comment Download
M sdk/lib/_internal/lib/internal_patch.dart View 1 2 chunks +8 lines, -1 line 0 comments Download
M sdk/lib/core/list.dart View 1 chunk +1 line, -6 lines 0 comments Download
M sdk/lib/internal/list.dart View 1 2 3 1 chunk +26 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
Lasse Reichstein Nielsen
6 years, 10 months ago (2014-02-05 12:51:29 UTC) #1
srdjan
DBC https://codereview.chromium.org/134893003/diff/1/runtime/lib/growable_array.cc File runtime/lib/growable_array.cc (right): https://codereview.chromium.org/134893003/diff/1/runtime/lib/growable_array.cc#newcode98 runtime/lib/growable_array.cc:98: return Array::MakeArray(array); Maybe use GET_NON_NULL_NATIVE_ARGUMENT instead of CheckedHandle. ...
6 years, 10 months ago (2014-02-05 16:39:59 UTC) #2
floitsch
LGTM. https://codereview.chromium.org/134893003/diff/1/sdk/lib/_internal/lib/internal_patch.dart File sdk/lib/_internal/lib/internal_patch.dart (right): https://codereview.chromium.org/134893003/diff/1/sdk/lib/_internal/lib/internal_patch.dart#newcode18 sdk/lib/_internal/lib/internal_patch.dart:18: JS('void', r'#.fixed$length = #', growableList, true); use the ...
6 years, 10 months ago (2014-02-06 16:38:39 UTC) #3
Ivan Posva
-Ivan https://codereview.chromium.org/134893003/diff/1/runtime/lib/growable_array.cc File runtime/lib/growable_array.cc (right): https://codereview.chromium.org/134893003/diff/1/runtime/lib/growable_array.cc#newcode98 runtime/lib/growable_array.cc:98: return Array::MakeArray(array); On 2014/02/05 16:39:59, srdjan wrote: > ...
6 years, 10 months ago (2014-02-06 16:56:59 UTC) #4
Lasse Reichstein Nielsen
https://codereview.chromium.org/134893003/diff/1/runtime/lib/internal_patch.dart File runtime/lib/internal_patch.dart (right): https://codereview.chromium.org/134893003/diff/1/runtime/lib/internal_patch.dart#newcode9 runtime/lib/internal_patch.dart:9: class _StaticClass { I had problems making the top-level ...
6 years, 10 months ago (2014-02-07 12:55:24 UTC) #5
floitsch
https://codereview.chromium.org/134893003/diff/1/runtime/lib/internal_patch.dart File runtime/lib/internal_patch.dart (right): https://codereview.chromium.org/134893003/diff/1/runtime/lib/internal_patch.dart#newcode9 runtime/lib/internal_patch.dart:9: class _StaticClass { On 2014/02/07 12:55:25, Lasse Reichstein Nielsen ...
6 years, 10 months ago (2014-02-07 15:13:13 UTC) #6
Lasse Reichstein Nielsen
https://codereview.chromium.org/134893003/diff/1/runtime/lib/growable_array.cc File runtime/lib/growable_array.cc (right): https://codereview.chromium.org/134893003/diff/1/runtime/lib/growable_array.cc#newcode98 runtime/lib/growable_array.cc:98: return Array::MakeArray(array); On 2014/02/06 16:57:00, Ivan Posva wrote: > ...
6 years, 10 months ago (2014-02-10 09:01:53 UTC) #7
Lasse Reichstein Nielsen
PTAL
6 years, 10 months ago (2014-02-10 09:18:02 UTC) #8
srdjan
https://codereview.chromium.org/134893003/diff/160001/runtime/lib/internal_patch.dart File runtime/lib/internal_patch.dart (right): https://codereview.chromium.org/134893003/diff/160001/runtime/lib/internal_patch.dart#newcode12 runtime/lib/internal_patch.dart:12: native "GrowableList_toFixedLength"; We have (mostly) standardized native names. In ...
6 years, 10 months ago (2014-02-10 10:08:15 UTC) #9
Lasse Reichstein Nielsen
https://codereview.chromium.org/134893003/diff/160001/runtime/lib/internal_patch.dart File runtime/lib/internal_patch.dart (right): https://codereview.chromium.org/134893003/diff/160001/runtime/lib/internal_patch.dart#newcode12 runtime/lib/internal_patch.dart:12: native "GrowableList_toFixedLength"; Done.
6 years, 10 months ago (2014-02-10 11:42:23 UTC) #10
floitsch
dart2js still LGTM. https://codereview.chromium.org/134893003/diff/210001/runtime/lib/growable_array.cc File runtime/lib/growable_array.cc (right): https://codereview.chromium.org/134893003/diff/210001/runtime/lib/growable_array.cc#newcode95 runtime/lib/growable_array.cc:95: DEFINE_NATIVE_ENTRY(StaticClass_toFixedLength, 1) { StaticClass_makeListFixedLength https://codereview.chromium.org/134893003/diff/210001/runtime/lib/internal_patch.dart File ...
6 years, 10 months ago (2014-02-10 13:25:49 UTC) #11
Ivan Posva
-Ivan https://codereview.chromium.org/134893003/diff/210001/runtime/lib/internal_patch.dart File runtime/lib/internal_patch.dart (right): https://codereview.chromium.org/134893003/diff/210001/runtime/lib/internal_patch.dart#newcode5 runtime/lib/internal_patch.dart:5: patch List makeListFixedLength(List growableList) I am really wondering ...
6 years, 10 months ago (2014-02-11 04:14:26 UTC) #12
Lasse Reichstein Nielsen
> I am really wondering why you have to go through a special static class ...
6 years, 10 months ago (2014-02-11 06:50:03 UTC) #13
Lasse Reichstein Nielsen
On 2014/02/11 06:50:03, Lasse Reichstein Nielsen wrote: > What is the naming protocol for natives ...
6 years, 10 months ago (2014-02-11 06:50:58 UTC) #14
Lasse Reichstein Nielsen
https://codereview.chromium.org/134893003/diff/210001/runtime/lib/growable_array.cc File runtime/lib/growable_array.cc (right): https://codereview.chromium.org/134893003/diff/210001/runtime/lib/growable_array.cc#newcode95 runtime/lib/growable_array.cc:95: DEFINE_NATIVE_ENTRY(StaticClass_toFixedLength, 1) { Now "Internal_makeListFixedLength". https://codereview.chromium.org/134893003/diff/210001/runtime/lib/internal_patch.dart File runtime/lib/internal_patch.dart (right): ...
6 years, 10 months ago (2014-02-11 07:08:47 UTC) #15
Lasse Reichstein Nielsen
https://codereview.chromium.org/134893003/diff/320001/runtime/vm/parser.cc File runtime/vm/parser.cc (right): https://codereview.chromium.org/134893003/diff/320001/runtime/vm/parser.cc#newcode5351 runtime/vm/parser.cc:5351: native_name.ToCString(), func.NumParameters()); I added this while debugging, but kept ...
6 years, 10 months ago (2014-02-11 07:10:12 UTC) #16
Lasse Reichstein Nielsen
https://codereview.chromium.org/134893003/diff/320001/runtime/vm/parser.cc File runtime/vm/parser.cc (right): https://codereview.chromium.org/134893003/diff/320001/runtime/vm/parser.cc#newcode5351 runtime/vm/parser.cc:5351: native_name.ToCString(), func.NumParameters()); I added this while debugging, but kept ...
6 years, 10 months ago (2014-02-11 07:10:13 UTC) #17
Lasse Reichstein Nielsen
@iposva,srdjan: PTAL
6 years, 10 months ago (2014-02-18 10:05:06 UTC) #18
Ivan Posva
LGTM -ip
6 years, 10 months ago (2014-02-20 01:18:30 UTC) #19
Lasse Reichstein Nielsen
6 years, 10 months ago (2014-02-21 13:15:26 UTC) #20
Message was sent while issue was closed.
Committed patchset #4 manually as r32896 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698