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

Issue 584843003: Allow sending static/top-level functions through ports and as isolate (Closed)

Created:
6 years, 3 months ago by Lasse Reichstein Nielsen
Modified:
6 years, 3 months ago
Reviewers:
floitsch
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Allow sending static/top-level functions through ports and as isolate initialization messages. BUG= http://dartbug.com/20992 R=floitsch@google.com Committed: https://code.google.com/p/dart/source/detail?r=40535

Patch Set 1 #

Total comments: 8

Patch Set 2 : Address comments. Update status files. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+221 lines, -3 lines) Patch
M sdk/lib/_internal/compiler/js_lib/isolate_helper.dart View 9 chunks +32 lines, -0 lines 0 comments Download
A tests/isolate/function_send_test.dart View 1 1 chunk +184 lines, -0 lines 0 comments Download
M tests/isolate/illegal_msg_function_test.dart View 1 2 chunks +1 line, -3 lines 0 comments Download
M tests/isolate/isolate.status View 1 2 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (1 generated)
Lasse Reichstein Nielsen
6 years, 3 months ago (2014-09-19 12:50:13 UTC) #2
floitsch
LGTM. https://codereview.chromium.org/584843003/diff/1/tests/isolate/function_send_test.dart File tests/isolate/function_send_test.dart (right): https://codereview.chromium.org/584843003/diff/1/tests/isolate/function_send_test.dart#newcode11 tests/isolate/function_send_test.dart:11: void mkToplevelFunc() => (p, m) { p.send(m); }; ...
6 years, 3 months ago (2014-09-19 19:52:46 UTC) #3
Lasse Reichstein Nielsen
Committed patchset #2 (id:20001) manually as 40535 (presubmit successful).
6 years, 3 months ago (2014-09-22 08:29:54 UTC) #4
Lasse Reichstein Nielsen
https://codereview.chromium.org/584843003/diff/1/tests/isolate/function_send_test.dart File tests/isolate/function_send_test.dart (right): https://codereview.chromium.org/584843003/diff/1/tests/isolate/function_send_test.dart#newcode11 tests/isolate/function_send_test.dart:11: void mkToplevelFunc() => (p, m) { p.send(m); }; I'll ...
6 years, 3 months ago (2014-09-23 07:25:08 UTC) #5
Lasse Reichstein Nielsen
6 years, 3 months ago (2014-09-23 07:25:08 UTC) #6
Message was sent while issue was closed.
https://codereview.chromium.org/584843003/diff/1/tests/isolate/function_send_...
File tests/isolate/function_send_test.dart (right):

https://codereview.chromium.org/584843003/diff/1/tests/isolate/function_send_...
tests/isolate/function_send_test.dart:11: void mkToplevelFunc() => (p, m) {
p.send(m); };
I'll go for createFuncToplevel.

https://codereview.chromium.org/584843003/diff/1/tests/isolate/function_send_...
tests/isolate/function_send_test.dart:46: // Actually allowed. Identical in VM,
different, but still static, in dart2js.
I can't say whether it should be allowed or not, and the spec isn't helping.
I would have expected it to not work, but it turns out that it does.

I'll make the test match the current behavior and just make a comment saying
that it's unknown whether toplevel.call is equal to or identical to toplevel,
and whether it should be sendable if not identical.

https://codereview.chromium.org/584843003/diff/1/tests/isolate/function_send_...
tests/isolate/function_send_test.dart:51: //testSendable("callable object", new
Callable());    /// 01: ok
Again I can't decide on whether it should be one or the other, and since the VM
will likely allow sending any object, including callable objects, and dart2js
will not, there is no clear answer.

https://codereview.chromium.org/584843003/diff/1/tests/isolate/function_send_...
tests/isolate/function_send_test.dart:52: testUnsendable("callable object", new
Callable());    /// 02: ok
This one is test*Un*sendablem the one above is testSendable.

Neither is a hard requirement, so I'll just leave it out until the time when we
actually define what can be sent to which other isolates.

Powered by Google App Engine
This is Rietveld 408576698