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

Issue 2852943003: Move the Kernel string offsets into the VM's heap. (Closed)

Created:
3 years, 7 months ago by Kevin Millikin (Google)
Modified:
3 years, 7 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Move the Kernel string offsets into the VM's heap. Copy the Kernel string offsets into a uint32 array in the VM's heap. This avoids allocating small string objects with new and avoids having a table of the canonical strings. Instead of an offset and a size, strings are now represented as indexes into the string table in the heap. The start offset of string N is found at byte offset N*4 because it is a uint32, and the end offset is found at byte offset (N+1)*4. The strings themselves are just integer indexes instead of pointers. In the stream flow graph builder, string access is all random access. R=jensj@google.com, vegorov@google.com Committed: https://github.com/dart-lang/sdk/commit/865e0669b2320688eaa7bf23b06aee780e094076

Patch Set 1 #

Total comments: 2

Patch Set 2 : Incorporate review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+273 lines, -336 lines) Patch
M runtime/vm/bootstrap.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/bootstrap_nocore.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/kernel.h View 1 26 chunks +58 lines, -104 lines 0 comments Download
M runtime/vm/kernel.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M runtime/vm/kernel_binary.h View 3 chunks +29 lines, -4 lines 0 comments Download
M runtime/vm/kernel_binary.cc View 17 chunks +40 lines, -70 lines 0 comments Download
M runtime/vm/kernel_binary_flowgraph.h View 5 chunks +0 lines, -21 lines 0 comments Download
M runtime/vm/kernel_binary_flowgraph.cc View 6 chunks +8 lines, -49 lines 0 comments Download
M runtime/vm/kernel_reader.h View 2 chunks +4 lines, -4 lines 0 comments Download
M runtime/vm/kernel_reader.cc View 5 chunks +30 lines, -20 lines 0 comments Download
M runtime/vm/kernel_to_il.h View 1 4 chunks +16 lines, -9 lines 0 comments Download
M runtime/vm/kernel_to_il.cc View 1 16 chunks +62 lines, -42 lines 0 comments Download
M runtime/vm/object.h View 1 chunk +9 lines, -2 lines 0 comments Download
M runtime/vm/object.cc View 1 chunk +7 lines, -2 lines 0 comments Download
M runtime/vm/raw_object.h View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 7 (2 generated)
Kevin Millikin (Google)
3 years, 7 months ago (2017-05-01 21:06:22 UTC) #2
jensj
lgtm
3 years, 7 months ago (2017-05-02 07:26:25 UTC) #3
Vyacheslav Egorov (Google)
LGTM https://codereview.chromium.org/2852943003/diff/1/runtime/vm/kernel_to_il.cc File runtime/vm/kernel_to_il.cc (right): https://codereview.chromium.org/2852943003/diff/1/runtime/vm/kernel_to_il.cc#newcode1068 runtime/vm/kernel_to_il.cc:1068: return string_offsets_.GetUint32((string_index + 1) << 2) - StringOffset(string_index ...
3 years, 7 months ago (2017-05-02 12:48:34 UTC) #4
Kevin Millikin (Google)
Committed patchset #2 (id:20001) manually as 865e0669b2320688eaa7bf23b06aee780e094076 (presubmit successful).
3 years, 7 months ago (2017-05-02 15:36:07 UTC) #6
Kevin Millikin (Google)
3 years, 7 months ago (2017-05-03 00:07:47 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/2852943003/diff/1/runtime/vm/kernel_to_il.cc
File runtime/vm/kernel_to_il.cc (right):

https://codereview.chromium.org/2852943003/diff/1/runtime/vm/kernel_to_il.cc#...
runtime/vm/kernel_to_il.cc:1068: return string_offsets_.GetUint32((string_index
+ 1) << 2) -
On 2017/05/02 12:48:34, Vyacheslav Egorov (Google) wrote:
> StringOffset(string_index + 1) - StringOffset(string_index);

Thanks for spotting this.

Powered by Google App Engine
This is Rietveld 408576698