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

Issue 11369259: Add one-char string table for faster String.charAt to the VM. (Closed)

Created:
8 years, 1 month ago by Florian Schneider
Modified:
8 years, 1 month ago
Reviewers:
Ivan Posva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Add one-char string table for faster String.charAt to the VM. This is used for a fast lookup when executing String.charAt. Currently it is only used in the C-runtime, but the plan is to generate optimized code for the table lookup for speeding up String.charAt. Committed: https://code.google.com/p/dart/source/detail?r=15088

Patch Set 1 #

Total comments: 11

Patch Set 2 : addressed comments #

Patch Set 3 : added characters 0x80..0xff #

Total comments: 5

Patch Set 4 : addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -15 lines) Patch
M runtime/lib/string.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/object.cc View 1 2 3 3 chunks +7 lines, -2 lines 0 comments Download
M runtime/vm/symbols.h View 1 2 3 3 chunks +12 lines, -7 lines 0 comments Download
M runtime/vm/symbols.cc View 1 2 3 5 chunks +17 lines, -5 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Florian Schneider
First attempt with only runtime support. snapshot_test.cc is already in the current VM when using ...
8 years, 1 month ago (2012-11-15 05:16:59 UTC) #1
Ivan Posva
https://codereview.chromium.org/11369259/diff/1/runtime/vm/symbols.cc File runtime/vm/symbols.cc (left): https://codereview.chromium.org/11369259/diff/1/runtime/vm/symbols.cc#oldcode121 runtime/vm/symbols.cc:121: ASSERT(isolate != Dart::vm_isolate()); If single char was handled in ...
8 years, 1 month ago (2012-11-15 09:07:10 UTC) #2
Florian Schneider
https://codereview.chromium.org/11369259/diff/1/runtime/vm/symbols.cc File runtime/vm/symbols.cc (left): https://codereview.chromium.org/11369259/diff/1/runtime/vm/symbols.cc#oldcode121 runtime/vm/symbols.cc:121: ASSERT(isolate != Dart::vm_isolate()); On 2012/11/15 09:07:10, Ivan Posva wrote: ...
8 years, 1 month ago (2012-11-15 21:54:42 UTC) #3
Ivan Posva
LGTM with comments. -Ivan https://chromiumcodereview.appspot.com/11369259/diff/9005/runtime/vm/snapshot_test.cc File runtime/vm/snapshot_test.cc (left): https://chromiumcodereview.appspot.com/11369259/diff/9005/runtime/vm/snapshot_test.cc#oldcode1843 runtime/vm/snapshot_test.cc:1843: EXPECT_EQ(root->value.as_array.values[0], element); I am not ...
8 years, 1 month ago (2012-11-17 01:30:58 UTC) #4
Florian Schneider
8 years, 1 month ago (2012-11-19 16:04:02 UTC) #5
https://chromiumcodereview.appspot.com/11369259/diff/9005/runtime/vm/snapshot...
File runtime/vm/snapshot_test.cc (left):

https://chromiumcodereview.appspot.com/11369259/diff/9005/runtime/vm/snapshot...
runtime/vm/snapshot_test.cc:1843: EXPECT_EQ(root->value.as_array.values[0],
element);
On 2012/11/17 01:30:58, Ivan Posva wrote:
> I am not clear why you needed to remove these expectations.

Done. Not needed anymore. sgjesse@ landed a fix in
http://code.google.com/p/dart/source/detail?r=15082.

https://chromiumcodereview.appspot.com/11369259/diff/9005/runtime/vm/symbols.h
File runtime/vm/symbols.h (right):

https://chromiumcodereview.appspot.com/11369259/diff/9005/runtime/vm/symbols....
runtime/vm/symbols.h:149: enum { kMaxOneByteCharCode = 0xFF };
On 2012/11/17 01:30:58, Ivan Posva wrote:
> kMaxOneCharCodeSymbol or similar. It is not related to the storage size per
se.

Done.

Powered by Google App Engine
This is Rietveld 408576698