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

Issue 2854393002: [kernel] [partial] Streaming of kernel binary without AST nodes (Closed)

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

Description

[kernel] [partial] Streaming of kernel binary without AST nodes This CL allows for streaming big parts of the binary, i.e. without using the AST nodes. It is thus a stepping-stone in getting rid of the AST nodes in the VM. Generally, all Expressions except "FunctionExpression", and all Statements except "FunctionDeclaration" can be streamed. There are currently not streamed because they create new functions, which has a pointer to an AstNode (which we don't have when streaming). Once we no longer need AstNodes at all these can be streamed as well. This is, I think, mostly a matter of streaming the ScopeBuilder as well, something that is not currently done. The way the streaming is build, one has to stream an entire subtree. That means, that if an expression (or statement), A, that is generally streamable contains an expression or a statement, B, that is not streamable, A cannot be streamed. The way this is build is by marking AstNodes as streamable or not ("cannot_stream_" field). That way we know up front whether we can stream a subtree or not. The streaming is done via "kernel_binary_flowgraph". In this file there are many obvious comments, e.g. ``` TokenPosition position = ReadPosition(); // read position. ``` This has been done in an attempt to add a comment to everything that reads from the binary to make it stand out more. All changes from kernel_to_il up to and including May 2nd 2017 should be included. R=kmillikin@google.com Committed: https://github.com/dart-lang/sdk/commit/d26558b7be153f7544eb406b5d1e5cd01fac11bb

Patch Set 1 #

Total comments: 26

Patch Set 2 : Address comments; small fixes; rebased. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5188 lines, -664 lines) Patch
M pkg/kernel/binary.md View 1 9 chunks +18 lines, -3 lines 0 comments Download
M pkg/kernel/lib/ast.dart View 1 2 chunks +6 lines, -0 lines 0 comments Download
M pkg/kernel/lib/binary/ast_from_binary.dart View 1 6 chunks +17 lines, -4 lines 0 comments Download
M pkg/kernel/lib/binary/ast_to_binary.dart View 1 18 chunks +39 lines, -10 lines 0 comments Download
M runtime/vm/kernel.h View 1 8 chunks +24 lines, -7 lines 0 comments Download
M runtime/vm/kernel_binary.h View 1 5 chunks +15 lines, -15 lines 0 comments Download
M runtime/vm/kernel_binary.cc View 1 64 chunks +250 lines, -17 lines 0 comments Download
M runtime/vm/kernel_binary_flowgraph.h View 1 4 chunks +308 lines, -26 lines 0 comments Download
M runtime/vm/kernel_binary_flowgraph.cc View 1 4 chunks +4114 lines, -326 lines 0 comments Download
M runtime/vm/kernel_reader.cc View 1 1 chunk +3 lines, -1 line 0 comments Download
M runtime/vm/kernel_to_il.h View 1 9 chunks +212 lines, -14 lines 0 comments Download
M runtime/vm/kernel_to_il.cc View 1 51 chunks +182 lines, -241 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
jensj
Note that this includes the CL https://codereview.chromium.org/2790093002/ (with comments addressed). I have made small changes ...
3 years, 7 months ago (2017-05-03 13:04:26 UTC) #2
jensj
https://codereview.chromium.org/2854393002/diff/1/runtime/vm/kernel_binary_flowgraph.cc File runtime/vm/kernel_binary_flowgraph.cc (right): https://codereview.chromium.org/2854393002/diff/1/runtime/vm/kernel_binary_flowgraph.cc#newcode89 runtime/vm/kernel_binary_flowgraph.cc:89: void StreamingDartTypeTranslator::BuildFunctionType() { BuildFunctionType and BuildSimpleFunctionType are basically the ...
3 years, 7 months ago (2017-05-04 10:13:05 UTC) #3
Kevin Millikin (Google)
LGTM when the comments below are addressed. https://codereview.chromium.org/2854393002/diff/1/pkg/kernel/binary.md File pkg/kernel/binary.md (right): https://codereview.chromium.org/2854393002/diff/1/pkg/kernel/binary.md#newcode788 pkg/kernel/binary.md:788: type FileOffsetAndExpressionPair ...
3 years, 7 months ago (2017-05-11 10:38:36 UTC) #4
jensj
Comments addressed. https://codereview.chromium.org/2854393002/diff/1/pkg/kernel/binary.md File pkg/kernel/binary.md (right): https://codereview.chromium.org/2854393002/diff/1/pkg/kernel/binary.md#newcode788 pkg/kernel/binary.md:788: type FileOffsetAndExpressionPair { On 2017/05/11 10:38:35, Kevin ...
3 years, 7 months ago (2017-05-11 12:59:25 UTC) #6
jensj
3 years, 7 months ago (2017-05-15 07:01:29 UTC) #8
Message was sent while issue was closed.
Committed patchset #2 (id:40001) manually as
d26558b7be153f7544eb406b5d1e5cd01fac11bb (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698