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

Issue 12421002: Change VM's string-buffer patch to use a Uin16Array as backing buffer. (Closed)

Created:
7 years, 9 months ago by Lasse Reichstein Nielsen
Modified:
7 years, 9 months ago
CC:
reviews_dartlang.org, floitsch
Visibility:
Public.

Description

Change VM's string-buffer patch to use a Uin16Array as backing buffer. Committed: https://code.google.com/p/dart/source/detail?r=19679

Patch Set 1 #

Total comments: 1

Patch Set 2 : Make VM code GC-safer. #

Total comments: 10

Patch Set 3 : Addressed comments, PTAL. #

Total comments: 27

Patch Set 4 : Address comments #

Patch Set 5 : Made Uint16Array.ByteAddr public and used that to get address of code units. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+268 lines, -154 lines) Patch
M runtime/lib/core_patch.dart View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M runtime/lib/string.cc View 1 2 3 4 1 chunk +23 lines, -0 lines 0 comments Download
M runtime/lib/string_buffer_patch.dart View 1 2 3 2 chunks +73 lines, -19 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/object.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/core_patch.dart View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M sdk/lib/core/string_buffer.dart View 2 chunks +4 lines, -5 lines 0 comments Download
M tests/corelib/string_buffer_test.dart View 1 chunk +161 lines, -129 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
Lasse Reichstein Nielsen
7 years, 9 months ago (2013-03-05 07:18:51 UTC) #1
floitsch
LGTM.
7 years, 9 months ago (2013-03-05 14:28:55 UTC) #2
Vyacheslav Egorov (Google)
I'd like to see that benchmark we are trying to optimize here. https://codereview.chromium.org/12421002/diff/1/runtime/lib/string.cc File runtime/lib/string.cc ...
7 years, 9 months ago (2013-03-05 14:44:32 UTC) #3
Lasse Reichstein Nielsen
Thanks for the comments. I hope I have made it GC-safe now. (The perfect solution ...
7 years, 9 months ago (2013-03-05 15:34:58 UTC) #4
srdjan
https://codereview.chromium.org/12421002/diff/6001/runtime/lib/string.cc File runtime/lib/string.cc (left): https://codereview.chromium.org/12421002/diff/6001/runtime/lib/string.cc#oldcode52 runtime/lib/string.cc:52: Why remove the line? https://codereview.chromium.org/12421002/diff/6001/runtime/lib/string.cc File runtime/lib/string.cc (right): https://codereview.chromium.org/12421002/diff/6001/runtime/lib/string.cc#newcode199 ...
7 years, 9 months ago (2013-03-05 16:02:21 UTC) #5
Lasse Reichstein Nielsen
https://codereview.chromium.org/12421002/diff/6001/runtime/lib/string.cc File runtime/lib/string.cc (left): https://codereview.chromium.org/12421002/diff/6001/runtime/lib/string.cc#oldcode52 runtime/lib/string.cc:52: That was where I originally had the new method. ...
7 years, 9 months ago (2013-03-05 16:56:56 UTC) #6
Ivan Posva
https://codereview.chromium.org/12421002/diff/6001/runtime/lib/string_buffer_patch.dart File runtime/lib/string_buffer_patch.dart (right): https://codereview.chromium.org/12421002/diff/6001/runtime/lib/string_buffer_patch.dart#newcode89 runtime/lib/string_buffer_patch.dart:89: static _Uint16Array _newBuffer(int length) native "Uint16Array_new"; On 2013/03/05 16:56:56, ...
7 years, 9 months ago (2013-03-05 17:50:55 UTC) #7
srdjan
https://codereview.chromium.org/12421002/diff/6001/runtime/lib/string_buffer_patch.dart File runtime/lib/string_buffer_patch.dart (right): https://codereview.chromium.org/12421002/diff/6001/runtime/lib/string_buffer_patch.dart#newcode81 runtime/lib/string_buffer_patch.dart:81: static String _create(List<int> buffer, int length) Also specify here ...
7 years, 9 months ago (2013-03-05 17:53:20 UTC) #8
Lasse Reichstein Nielsen
PTAL
7 years, 9 months ago (2013-03-07 09:15:20 UTC) #9
Vyacheslav Egorov (Google)
lgtm please wait until Srdjan's comments. https://codereview.chromium.org/12421002/diff/14001/runtime/lib/string.cc File runtime/lib/string.cc (right): https://codereview.chromium.org/12421002/diff/14001/runtime/lib/string.cc#newcode200 runtime/lib/string.cc:200: GET_NON_NULL_NATIVE_ARGUMENT(Uint16Array, a, arguments->NativeArgAt(0)); ...
7 years, 9 months ago (2013-03-07 13:50:52 UTC) #10
srdjan
Addional comments https://codereview.chromium.org/12421002/diff/14001/runtime/lib/string.cc File runtime/lib/string.cc (left): https://codereview.chromium.org/12421002/diff/14001/runtime/lib/string.cc#oldcode52 runtime/lib/string.cc:52: Please restore line https://codereview.chromium.org/12421002/diff/14001/runtime/lib/string.cc File runtime/lib/string.cc (right): ...
7 years, 9 months ago (2013-03-07 17:58:34 UTC) #11
Lasse Reichstein Nielsen
https://codereview.chromium.org/12421002/diff/14001/runtime/lib/string.cc File runtime/lib/string.cc (left): https://codereview.chromium.org/12421002/diff/14001/runtime/lib/string.cc#oldcode52 runtime/lib/string.cc:52: Done. *And* saving the buffer this time. https://codereview.chromium.org/12421002/diff/14001/runtime/lib/string.cc File ...
7 years, 9 months ago (2013-03-08 07:18:44 UTC) #12
Ivan Posva
https://codereview.chromium.org/12421002/diff/14001/runtime/lib/string.cc File runtime/lib/string.cc (right): https://codereview.chromium.org/12421002/diff/14001/runtime/lib/string.cc#newcode214 runtime/lib/string.cc:214: uint16_t* data_position = reinterpret_cast<uint16_t*>( On 2013/03/08 07:18:44, Lasse Reichstein ...
7 years, 9 months ago (2013-03-08 09:15:41 UTC) #13
Lasse Reichstein Nielsen
https://codereview.chromium.org/12421002/diff/14001/runtime/lib/string.cc File runtime/lib/string.cc (right): https://codereview.chromium.org/12421002/diff/14001/runtime/lib/string.cc#newcode214 runtime/lib/string.cc:214: uint16_t* data_position = reinterpret_cast<uint16_t*>( And it works with a ...
7 years, 9 months ago (2013-03-08 10:19:37 UTC) #14
Lasse Reichstein Nielsen
Committed patchset #5 manually as r19679 (presubmit successful).
7 years, 9 months ago (2013-03-08 10:22:07 UTC) #15
srdjan
7 years, 9 months ago (2013-03-08 19:05:01 UTC) #16
Message was sent while issue was closed.
lgtm

Powered by Google App Engine
This is Rietveld 408576698