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

Issue 10837070: Remove old isolate API and update all code in the repository to use (Closed)

Created:
8 years, 4 months ago by Mads Ager (google)
Modified:
8 years, 4 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Remove old isolate API and update all code in the repository to use the new API. R=kasperl@google.com,sigmund@google.com,turnidge@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=10210

Patch Set 1 #

Patch Set 2 : Fix namespace comment. #

Total comments: 23

Patch Set 3 : Address review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1486 lines, -2973 lines) Patch
M lib/isolate/dart2js/isolateimpl.dart View 9 chunks +15 lines, -106 lines 0 comments Download
M lib/isolate/isolate_api.dart View 2 chunks +1 line, -96 lines 0 comments Download
M lib/isolate/isolate_compiler.dart View 1 chunk +0 lines, -6 lines 0 comments Download
M runtime/lib/isolate.cc View 1 2 7 chunks +8 lines, -215 lines 0 comments Download
M runtime/lib/isolate.dart View 2 chunks +1 line, -17 lines 0 comments Download
M runtime/vm/bootstrap_natives.h View 1 chunk +0 lines, -1 line 0 comments Download
M runtime/vm/dart_api_impl_test.cc View 1 2 1 chunk +13 lines, -17 lines 0 comments Download
M runtime/vm/isolate_test.cc View 1 2 2 chunks +5 lines, -11 lines 0 comments Download
M runtime/vm/snapshot_test.dart View 6 chunks +238 lines, -610 lines 0 comments Download
M samples/chat/README View 1 chunk +1 line, -1 line 0 comments Download
M samples/chat/chat_server.dart View 1 chunk +2 lines, -1 line 0 comments Download
M samples/chat/chat_server_lib.dart View 1 2 4 chunks +72 lines, -69 lines 0 comments Download
M samples/dartcombat/player.dart View 1 2 2 chunks +13 lines, -9 lines 0 comments Download
M samples/dartcombat/setup.dart View 3 chunks +5 lines, -9 lines 0 comments Download
M samples/dartcombat/state.dart View 1 2 3 chunks +7 lines, -11 lines 0 comments Download
M samples/tests/samples/chat/chat_server_test.dart View 1 2 3 chunks +191 lines, -193 lines 0 comments Download
M tests/co19/co19-compiler.status View 1 chunk +21 lines, -0 lines 0 comments Download
D tests/co19/co19-frog.status View 1 chunk +0 lines, -6 lines 0 comments Download
M tests/co19/co19-leg.status View 1 chunk +20 lines, -0 lines 0 comments Download
M tests/co19/co19-runtime.status View 1 chunk +20 lines, -0 lines 0 comments Download
M tests/co19/test_config.dart View 1 chunk +0 lines, -1 line 0 comments Download
M tests/html/isolates_test.dart View 1 chunk +26 lines, -34 lines 0 comments Download
M tests/html/js_interop_4_test.dart View 2 chunks +6 lines, -11 lines 0 comments Download
A + tests/isolate/compute_this_script_browser_test.dart View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
D tests/isolate/constructor_test.dart View 1 chunk +0 lines, -30 lines 0 comments Download
M tests/isolate/count_test.dart View 2 chunks +29 lines, -36 lines 0 comments Download
M tests/isolate/cross_isolate_message_test.dart View 2 chunks +35 lines, -46 lines 0 comments Download
M tests/isolate/isolate.status View 1 2 3 chunks +20 lines, -22 lines 0 comments Download
M tests/isolate/isolate2_negative_test.dart View 2 chunks +4 lines, -10 lines 0 comments Download
M tests/isolate/isolate3_negative_test.dart View 3 chunks +8 lines, -14 lines 0 comments Download
M tests/isolate/isolate_complex_messages_test.dart View 2 chunks +53 lines, -59 lines 0 comments Download
M tests/isolate/isolate_import_negative_test.dart View 2 chunks +3 lines, -7 lines 0 comments Download
M tests/isolate/isolate_negative_test.dart View 2 chunks +8 lines, -13 lines 0 comments Download
M tests/isolate/mandel_isolate_test.dart View 2 chunks +35 lines, -46 lines 0 comments Download
M tests/isolate/message2_test.dart View 2 chunks +20 lines, -25 lines 0 comments Download
M tests/isolate/message_test.dart View 2 chunks +56 lines, -63 lines 0 comments Download
M tests/isolate/mint_maker_test.dart View 2 chunks +10 lines, -15 lines 0 comments Download
D tests/isolate/mixed2_test.dart View 1 chunk +0 lines, -133 lines 0 comments Download
D tests/isolate/mixed_test.dart View 1 chunk +0 lines, -48 lines 0 comments Download
M tests/isolate/nested_spawn2_test.dart View 3 chunks +31 lines, -41 lines 0 comments Download
M tests/isolate/nested_spawn_test.dart View 2 chunks +19 lines, -29 lines 0 comments Download
M tests/isolate/request_reply_test.dart View 2 chunks +15 lines, -23 lines 0 comments Download
A + tests/isolate/spawn_function_custom_class_test.dart View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
A + tests/isolate/spawn_function_negative_test.dart View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
A + tests/isolate/spawn_function_test.dart View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/isolate/spawn_test.dart View 1 2 1 chunk +0 lines, -32 lines 0 comments Download
A + tests/isolate/spawn_uri_child_isolate.dart View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
A + tests/isolate/spawn_uri_negative_test.dart View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
A + tests/isolate/spawn_uri_test.dart View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
A + tests/isolate/spawn_uri_vm_negative_test.dart View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
A + tests/isolate/spawn_uri_vm_test.dart View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
D tests/isolate/static_state_test.dart View 1 chunk +0 lines, -48 lines 0 comments Download
A + tests/isolate/unresolved_ports_negative_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
A + tests/isolate/unresolved_ports_test.dart View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
D tests/isolate/v2_compute_this_script_browser_test.dart View 1 2 1 chunk +0 lines, -37 lines 0 comments Download
M tests/isolate/v2_spawn_function_custom_class_test.dart View 1 2 1 chunk +0 lines, -38 lines 0 comments Download
D tests/isolate/v2_spawn_function_negative_test.dart View 1 2 1 chunk +0 lines, -25 lines 0 comments Download
D tests/isolate/v2_spawn_function_test.dart View 1 2 1 chunk +0 lines, -25 lines 0 comments Download
D tests/isolate/v2_spawn_uri_child_isolate.dart View 1 2 1 chunk +0 lines, -11 lines 0 comments Download
D tests/isolate/v2_spawn_uri_negative_test.dart View 1 2 1 chunk +0 lines, -25 lines 0 comments Download
D tests/isolate/v2_spawn_uri_test.dart View 1 2 1 chunk +0 lines, -25 lines 0 comments Download
D tests/isolate/v2_spawn_uri_vm_negative_test.dart View 1 2 1 chunk +0 lines, -24 lines 0 comments Download
D tests/isolate/v2_spawn_uri_vm_test.dart View 1 2 1 chunk +0 lines, -24 lines 0 comments Download
D tests/isolate/v2_unresolved_ports_negative_test.dart View 1 2 1 chunk +0 lines, -47 lines 0 comments Download
D tests/isolate/v2_unresolved_ports_test.dart View 1 2 1 chunk +0 lines, -53 lines 0 comments Download
M tests/language/typed_message_test.dart View 2 chunks +23 lines, -44 lines 0 comments Download
M tests/standalone/io/echo_server_stream_test.dart View 1 2 2 chunks +8 lines, -4 lines 0 comments Download
M tests/standalone/io/echo_server_test.dart View 1 2 2 chunks +8 lines, -4 lines 0 comments Download
M tests/standalone/io/http_advanced_test.dart View 1 2 4 chunks +29 lines, -24 lines 0 comments Download
M tests/standalone/io/http_basic_test.dart View 1 2 4 chunks +29 lines, -24 lines 0 comments Download
M tests/standalone/io/http_read_test.dart View 1 2 3 chunks +28 lines, -24 lines 0 comments Download
M tests/standalone/io/socket_close_test.dart View 1 2 2 chunks +133 lines, -133 lines 0 comments Download
M tests/standalone/io/socket_many_connections_test.dart View 1 2 2 chunks +8 lines, -4 lines 0 comments Download
M tests/standalone/io/socket_stream_close_test.dart View 1 2 2 chunks +148 lines, -147 lines 0 comments Download
M tests/standalone/io/stream_pipe_test.dart View 1 2 2 chunks +8 lines, -4 lines 0 comments Download
M tests/standalone/io/testing_server.dart View 3 chunks +18 lines, -23 lines 0 comments Download
M tools/testing/dart/test_suite.dart View 2 chunks +29 lines, -34 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Mads Ager (google)
Kasper, could you check the dart2js part. Todd, could you check the vm part. Siggi, ...
8 years, 4 months ago (2012-08-02 12:51:54 UTC) #1
Mads Ager (google)
https://chromiumcodereview.appspot.com/10837070/diff/3001/runtime/vm/isolate_test.cc File runtime/vm/isolate_test.cc (left): https://chromiumcodereview.appspot.com/10837070/diff/3001/runtime/vm/isolate_test.cc#oldcode25 runtime/vm/isolate_test.cc:25: TEST_CASE(IsolateSpawn) { Looking at this test more with the ...
8 years, 4 months ago (2012-08-02 15:04:20 UTC) #2
Siggi Cherem (dart-lang)
so nice to see this :) Thanks Mads! generally lgtm, just a couple comments. https://chromiumcodereview.appspot.com/10837070/diff/3001/runtime/vm/snapshot_test.dart ...
8 years, 4 months ago (2012-08-02 16:43:35 UTC) #3
turnidge
lgtm, one comment. VM changes seem pretty straightforward. Once you resolve the one remaining issue ...
8 years, 4 months ago (2012-08-02 17:54:47 UTC) #4
kasperl
LGTM. This is huge leap forward! https://chromiumcodereview.appspot.com/10837070/diff/3001/samples/chat/chat_server_lib.dart File samples/chat/chat_server_lib.dart (right): https://chromiumcodereview.appspot.com/10837070/diff/3001/samples/chat/chat_server_lib.dart#newcode13 samples/chat/chat_server_lib.dart:13: port.receive((message, replyTo) { ...
8 years, 4 months ago (2012-08-03 05:20:27 UTC) #5
Mads Ager (google)
8 years, 4 months ago (2012-08-03 05:51:35 UTC) #6
Thanks for the comments!

https://chromiumcodereview.appspot.com/10837070/diff/3001/runtime/vm/isolate_...
File runtime/vm/isolate_test.cc (left):

https://chromiumcodereview.appspot.com/10837070/diff/3001/runtime/vm/isolate_...
runtime/vm/isolate_test.cc:25: TEST_CASE(IsolateSpawn) {
On 2012/08/02 15:04:20, Mads Ager wrote:
> Looking at this test more with the help of Ivan it turns out that this test
> should be updated to use the new API. It crashes if you do that with:
> 
> Running test: IsolateSpawn
> runtime/lib/isolate.cc:503: error: expected: callback != NULL
> 
> So, in the new API we are missing a check that the isolate creation callback
is
> set. Tomorrow morning, I'll add this test back and fix the missing callback
> check.

Done. Reintroduced. Added the test for a NULL callback and used EXPECT_ERROR to
test that it is the right exception being thrown. Updated the comment for the
test as well.

https://chromiumcodereview.appspot.com/10837070/diff/3001/runtime/vm/snapshot...
File runtime/vm/snapshot_test.dart (right):

https://chromiumcodereview.appspot.com/10837070/diff/3001/runtime/vm/snapshot...
runtime/vm/snapshot_test.dart:1182: // THE REST OF THIS FILE COULD BE
AUTOGENERATED
On 2012/08/02 16:43:35, sigmund wrote:
> I used to edit this file by hand, for future reference, how do I auto
regenerate
> it?

I edited it my hand as well. :( As far as I can tell, the comment just says that
in principle the rest of the file *could* be auto generated. But I can't see
anything in the repo to do that so this was manual work.

https://chromiumcodereview.appspot.com/10837070/diff/3001/samples/chat/chat_s...
File samples/chat/chat_server_lib.dart (right):

https://chromiumcodereview.appspot.com/10837070/diff/3001/samples/chat/chat_s...
samples/chat/chat_server_lib.dart:13: port.receive((message, replyTo) {
On 2012/08/03 05:20:27, kasperl wrote:
> port.receive(server.dispatch)?

D'oh! Done for all of them.

https://chromiumcodereview.appspot.com/10837070/diff/3001/samples/dartcombat/...
File samples/dartcombat/player.dart (left):

https://chromiumcodereview.appspot.com/10837070/diff/3001/samples/dartcombat/...
samples/dartcombat/player.dart:36: final Future<SendPort> portToPlayer;
On 2012/08/02 16:43:35, sigmund wrote:
> another note - we tried to make spawnFunction return a port directly, but that
> needs to be fixed, I added a bug for it (http://dartbug.com/4329)

Thanks for filing that bug Siggi. Based on your comments in the bug report I
agree that we should go back to Future<SendPort> here.

https://chromiumcodereview.appspot.com/10837070/diff/3001/samples/dartcombat/...
File samples/dartcombat/player.dart (right):

https://chromiumcodereview.appspot.com/10837070/diff/3001/samples/dartcombat/...
samples/dartcombat/player.dart:38: PlayerImpl() : portToPlayer =
spawnFunction(spawnPlayer);
On 2012/08/02 16:43:35, sigmund wrote:
> FYI - this will break once dart2js bug is fixed, this should be
> spawnFunctionInDOM (which doesn't exist yet, http://dartbug.com/3050)

Thanks Siggi! I'll add a comment that the players need access to the DOM and
that something like spawnFunctionInDOM is needed.

I think I got this working as well as it did before these changes. However, the
game is not really working. It doesn't work at all in Dartium (because the
isolates don't have DOM access). With dart2js some of it is working, but the
'shooting' part is not really working.

https://chromiumcodereview.appspot.com/10837070/diff/3001/tests/isolate/mixed...
File tests/isolate/mixed2_test.dart (left):

https://chromiumcodereview.appspot.com/10837070/diff/3001/tests/isolate/mixed...
tests/isolate/mixed2_test.dart:7: #library('Mixed2Test');
On 2012/08/02 16:43:35, sigmund wrote:
> eventually this might come back to life once we have DOM vs non-DOM isolates
in
> place. maybe file a bug for it?

I'll file a bug when I can. dartbug.com is down right now.

https://chromiumcodereview.appspot.com/10837070/diff/3001/tests/isolate/spawn...
File tests/isolate/spawn_test.dart (right):

https://chromiumcodereview.appspot.com/10837070/diff/3001/tests/isolate/spawn...
tests/isolate/spawn_test.dart:5: #library("SpawnTest");
On 2012/08/02 16:43:35, sigmund wrote:
> this test might be redundant with v2_spawn_function_test.dart. If we want to
> keep it, we should rename this file to spawn_function_test.dart, since 'spawn'
> alone is not descriptive enough anymore.
> 
> 
> Related to this. I think we should remove the 'v2_' prefix from all the other
> isolate test files.

I have removed this test. It is redundant with the other spawn_function test. I
have removed the v2 prefixes.

Powered by Google App Engine
This is Rietveld 408576698