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

Issue 2558673002: Add Kernel Isolate (Closed)

Created:
4 years ago by hausner
Modified:
4 years ago
Reviewers:
siva, kasperl
CC:
reviews_dartlang.org, turnidge, rmacnak, Cutch, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Add Kernel Isolate, second attempt To run a script with the Dart->Kernel parser, use the -dfe option: dart --dfe=runtime/tools/kernel-service.dart --packages=/src/d2/sdk/.packages foo.dart The front end expects a directory named patched_sdk in the build directory (patched_sdk should be a sibling of the directory that contains the dart executable.) Warning: using a debug build dart executable is very slow. It takes 2 minutes to run Hello World in a debug build, and about 7 seconds in a release build. BUG= R=asiva@google.com Committed: https://github.com/dart-lang/sdk/commit/f5ab173c770a8fd26de7c236937cfa3be9035da1

Patch Set 1 #

Total comments: 4

Patch Set 2 : wip #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats (+610 lines, -6 lines) Patch
M runtime/bin/loader.h View 1 chunk +3 lines, -0 lines 0 comments Download
M runtime/bin/loader.cc View 2 chunks +25 lines, -4 lines 0 comments Download
M runtime/bin/main.cc View 6 chunks +43 lines, -0 lines 0 comments Download
M runtime/include/dart_api.h View 1 chunk +21 lines, -0 lines 0 comments Download
A runtime/tools/kernel-service.dart View 1 chunk +146 lines, -0 lines 9 comments Download
M runtime/vm/dart.cc View 3 chunks +8 lines, -0 lines 0 comments Download
M runtime/vm/dart_api_impl.cc View 2 chunks +39 lines, -0 lines 0 comments Download
A runtime/vm/kernel_isolate.h View 1 chunk +57 lines, -0 lines 0 comments Download
A runtime/vm/kernel_isolate.cc View 1 1 chunk +266 lines, -0 lines 0 comments Download
M runtime/vm/service_isolate.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M runtime/vm/vm_sources.gypi View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (5 generated)
hausner
4 years ago (2016-12-06 23:45:34 UTC) #3
siva
lgtm https://codereview.chromium.org/2558673002/diff/1/runtime/vm/kernel_isolate.cc File runtime/vm/kernel_isolate.cc (right): https://codereview.chromium.org/2558673002/diff/1/runtime/vm/kernel_isolate.cc#newcode191 runtime/vm/kernel_isolate.cc:191: monitor_ = new Monitor(); might make sense to ...
4 years ago (2016-12-07 00:46:39 UTC) #4
hausner
Thank you. https://codereview.chromium.org/2558673002/diff/1/runtime/vm/kernel_isolate.cc File runtime/vm/kernel_isolate.cc (right): https://codereview.chromium.org/2558673002/diff/1/runtime/vm/kernel_isolate.cc#newcode191 runtime/vm/kernel_isolate.cc:191: monitor_ = new Monitor(); On 2016/12/07 00:46:38, ...
4 years ago (2016-12-07 17:01:29 UTC) #5
hausner
Committed patchset #2 (id:20001) manually as f5ab173c770a8fd26de7c236937cfa3be9035da1 (presubmit successful).
4 years ago (2016-12-07 17:11:22 UTC) #8
kasperl
4 years ago (2016-12-08 11:44:27 UTC) #10
Message was sent while issue was closed.
DBC

https://codereview.chromium.org/2558673002/diff/20001/runtime/tools/kernel-se...
File runtime/tools/kernel-service.dart (right):

https://codereview.chromium.org/2558673002/diff/20001/runtime/tools/kernel-se...
runtime/tools/kernel-service.dart:21: final RawReceivePort scriptLoadPort = new
RawReceivePort();
Why is this not just stored in a local variable in main?

https://codereview.chromium.org/2558673002/diff/20001/runtime/tools/kernel-se...
runtime/tools/kernel-service.dart:36: void checkSdkDirectory(String path) {
bool

https://codereview.chromium.org/2558673002/diff/20001/runtime/tools/kernel-se...
runtime/tools/kernel-service.dart:49: var buffer = [];
There is a lot of copying of the bytes produced by the BinaryPrinter happening
here and behind the scenes. Also, this buffer is a regular list which means that
we will smi-encode all the bytes.

Should we have a separate BinaryPrinter that produces the bytes in a Uint8List
directly, so we can avoid all this copying and 8x data blow up on 64-bit
platforms? The BytesBuilder class in dart:io
(https://api.dartlang.org/stable/1.21.0/dart-io/BytesBuilder-class.html) might
come in handy.

https://codereview.chromium.org/2558673002/diff/20001/runtime/tools/kernel-se...
runtime/tools/kernel-service.dart:71: 
Remove empty line.

https://codereview.chromium.org/2558673002/diff/20001/runtime/tools/kernel-se...
runtime/tools/kernel-service.dart:97: // Link program into one file, cf. --link
option in dartk
Terminate comment with .

https://codereview.chromium.org/2558673002/diff/20001/runtime/tools/kernel-se...
runtime/tools/kernel-service.dart:115: Uri patched_sdk =
Uri.parse(Platform.resolvedExecutable).resolve("patched_sdk");
Long line.

patched_sdk -> patchedSdk

https://codereview.chromium.org/2558673002/diff/20001/runtime/tools/kernel-se...
runtime/tools/kernel-service.dart:121: var msg = new List(5);
sp.send([tag, inputFileUrl, inputFileUrl, null, data]);

(unless the receiver side cannot deal with growable lists)

Why is the inputFileUrl included twice in the reply and why is there a null in
there? Maybe deserves a comment here?

https://codereview.chromium.org/2558673002/diff/20001/runtime/tools/kernel-se...
runtime/tools/kernel-service.dart:128: return;
What's the intent with this return?

https://codereview.chromium.org/2558673002/diff/20001/runtime/tools/kernel-se...
runtime/tools/kernel-service.dart:131: var msg = new List(5);
sp.send([-tag, inputFileUrl, inputFileUrl, null, e.toString()])?

Powered by Google App Engine
This is Rietveld 408576698