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

Issue 2790093002: Hacky streaming of VariableGet (Closed)

Created:
3 years, 8 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

Hacky streaming of VariableGet BUG=

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -12 lines) Patch
M pkg/kernel/binary.md View 2 chunks +2 lines, -0 lines 1 comment Download
M pkg/kernel/lib/ast.dart View 1 chunk +1 line, -0 lines 1 comment Download
M pkg/kernel/lib/binary/ast_from_binary.dart View 1 chunk +2 lines, -0 lines 1 comment Download
M pkg/kernel/lib/binary/ast_to_binary.dart View 11 chunks +19 lines, -7 lines 1 comment Download
M runtime/vm/kernel.h View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/kernel_binary.cc View 2 chunks +4 lines, -0 lines 0 comments Download
M runtime/vm/kernel_binary_flowgraph.h View 2 chunks +4 lines, -0 lines 0 comments Download
M runtime/vm/kernel_binary_flowgraph.cc View 3 chunks +30 lines, -4 lines 0 comments Download
M runtime/vm/kernel_to_il.h View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/kernel_to_il.cc View 2 chunks +8 lines, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 3 (1 generated)
jensj
3 years, 8 months ago (2017-04-03 08:34:00 UTC) #2
Kevin Millikin (Google)
3 years, 8 months ago (2017-04-05 08:59:57 UTC) #3
LGTM with better comments, and a better commit message.

https://codereview.chromium.org/2790093002/diff/1/pkg/kernel/binary.md
File pkg/kernel/binary.md (right):

https://codereview.chromium.org/2790093002/diff/1/pkg/kernel/binary.md#newcod...
pkg/kernel/binary.md:341: UInt variableDeclarationPosition; // Notice that this
field is temporary.
I don't think the comment belongs here.  But do say that it is the offset of the
declaration.

https://codereview.chromium.org/2790093002/diff/1/pkg/kernel/lib/ast.dart
File pkg/kernel/lib/ast.dart (right):

https://codereview.chromium.org/2790093002/diff/1/pkg/kernel/lib/ast.dart#new...
pkg/kernel/lib/ast.dart:3461: int tempOffset;
Name should be something like binaryOffset.

Comment should be something simple like // Offset of the declaration, set and
used when writing the binary.

https://codereview.chromium.org/2790093002/diff/1/pkg/kernel/lib/binary/ast_f...
File pkg/kernel/lib/binary/ast_from_binary.dart (right):

https://codereview.chromium.org/2790093002/diff/1/pkg/kernel/lib/binary/ast_f...
pkg/kernel/lib/binary/ast_from_binary.dart:640: readUInt(); // offset in binary.
Unused here.
// Offset of the declaration.

I think it's obvious that it's unused from the code.

https://codereview.chromium.org/2790093002/diff/1/pkg/kernel/lib/binary/ast_t...
File pkg/kernel/lib/binary/ast_to_binary.dart (right):

https://codereview.chromium.org/2790093002/diff/1/pkg/kernel/lib/binary/ast_t...
pkg/kernel/lib/binary/ast_to_binary.dart:905: int length = _sink.flushedLength +
_sink.length - (hasTag ? 1 : 0);
It seems better to move writing of the tag here so you have something like:

node.binaryPosition = ...;
if (hasTag) writeByte(Tag.VariableDeclaration);
writeOffset(node.fileOffset);
...

Powered by Google App Engine
This is Rietveld 408576698