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

Issue 10386107: Implement spawnUri from dart:isolate. This function allows us to (Closed)

Created:
8 years, 7 months ago by turnidge
Modified:
6 years, 6 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Implement spawnUri from dart:isolate. This function allows us to launch an isolate running a different script. Finally. Reviewers: This isn't as hard to review as it looks. Dive right in! Siggi: Take a look at my test status file changes and make sure I'm excluding the right stuff. Much of the churn in the CL comes from moving ownership of the import_map. It used to be set per-library and is now set per-isolate. This caused a lot of superficial diffs. DART EMBEDDING API CHANGES: - Dart_IsolateCreateCallback now takes a script_uri and main argument instead of a name_prefix argument. The script_uri argument allows the callback to launch different scripts. The main argument is used in creating the isolate debug name. - Dart_CreateIsolate now takes script_uri and main arguments. These are used to build the isolate's debug name. - Dart_LibraryTagHandler, Dart_LoadScript, and Dart_LoadLibrary no longer take an import_map. - Added Dart_SetImportMap. - Added Dart_RootLibrary to provide access to the root library for the current isolate. OTHER STUFF Add a couple of tests for spawnUri -- the existing tests assume that scripts end in a .js suffix which isn't going to work out for us. Changed how the debug name for isolates get built a bit. Refactored bin/main.cc a bit. Fixed some problems with error handling while creating isolates. Minor refactoring in builtin.dart to always pass is_windows rather than relying on it being squirreled away. Committed: https://code.google.com/p/dart/source/detail?r=7756

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 6

Patch Set 7 : #

Total comments: 1

Patch Set 8 : #

Patch Set 9 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+616 lines, -350 lines) Patch
M runtime/bin/builtin.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -2 lines 0 comments Download
M runtime/bin/builtin.dart View 1 2 3 4 5 6 7 4 chunks +10 lines, -10 lines 0 comments Download
M runtime/bin/dartutils.h View 1 2 3 4 5 6 7 1 chunk +1 line, -2 lines 0 comments Download
M runtime/bin/dartutils.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -3 lines 0 comments Download
M runtime/bin/gen_snapshot.cc View 1 2 3 4 5 6 7 4 chunks +5 lines, -11 lines 0 comments Download
M runtime/bin/main.cc View 1 2 3 4 5 6 7 15 chunks +121 lines, -60 lines 0 comments Download
M runtime/include/dart_api.h View 1 2 3 4 5 6 7 6 chunks +82 lines, -22 lines 0 comments Download
M runtime/lib/isolate.cc View 1 2 3 4 5 6 7 9 chunks +173 lines, -81 lines 0 comments Download
M runtime/lib/isolate.dart View 1 2 3 4 5 6 7 1 chunk +1 line, -4 lines 0 comments Download
M runtime/vm/benchmark_test.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/benchmark_test.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -2 lines 0 comments Download
M runtime/vm/bootstrap_natives.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/dart_api_impl.cc View 1 2 3 4 5 6 7 8 chunks +60 lines, -18 lines 0 comments Download
M runtime/vm/dart_api_impl_test.cc View 1 2 3 4 5 6 7 26 chunks +63 lines, -76 lines 0 comments Download
M runtime/vm/object.h View 1 2 3 4 5 6 7 2 chunks +0 lines, -3 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 4 5 6 7 3 chunks +0 lines, -23 lines 0 comments Download
M runtime/vm/object_store.h View 1 2 3 4 5 6 7 2 chunks +6 lines, -0 lines 0 comments Download
M runtime/vm/object_store.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/parser.h View 1 2 3 4 5 6 7 1 chunk +1 line, -2 lines 0 comments Download
M runtime/vm/parser.cc View 1 2 3 4 5 6 7 6 chunks +20 lines, -15 lines 0 comments Download
M runtime/vm/raw_object.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M runtime/vm/snapshot_test.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -3 lines 0 comments Download
M runtime/vm/unit_test.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -3 lines 0 comments Download
M runtime/vm/unit_test.cc View 1 2 3 4 5 6 7 4 chunks +6 lines, -7 lines 0 comments Download
M tests/isolate/isolate.status View 1 2 3 4 5 6 7 2 chunks +7 lines, -1 line 0 comments Download
A tests/isolate/v2_spawn_uri_vm_negative_test.dart View 1 chunk +24 lines, -0 lines 0 comments Download
A tests/isolate/v2_spawn_uri_vm_test.dart View 1 chunk +24 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Siggi Cherem (dart-lang)
https://chromiumcodereview.appspot.com/10386107/diff/3038/tests/isolate/isolate.status File tests/isolate/isolate.status (right): https://chromiumcodereview.appspot.com/10386107/diff/3038/tests/isolate/isolate.status#newcode16 tests/isolate/isolate.status:16: v2_spawn_uri_vm_test: Fail # not implemented here and below the ...
8 years, 7 months ago (2012-05-14 22:08:38 UTC) #1
turnidge
Hi guys, This is the new CL for my spawnUri change. Not sure what happened... ...
8 years, 7 months ago (2012-05-14 22:18:31 UTC) #2
Ivan Posva
LGTM with comments. -Ivan https://chromiumcodereview.appspot.com/10386107/diff/3038/runtime/lib/isolate.cc File runtime/lib/isolate.cc (right): https://chromiumcodereview.appspot.com/10386107/diff/3038/runtime/lib/isolate.cc#newcode502 runtime/lib/isolate.cc:502: ASSERT(callback); I am pretty sure ...
8 years, 7 months ago (2012-05-15 00:04:46 UTC) #3
turnidge
Ivan, Addressed these two comments plus the comment from the older CL. I factored out ...
8 years, 7 months ago (2012-05-15 17:47:38 UTC) #4
Anton Muhin
8 years, 7 months ago (2012-05-15 19:06:43 UTC) #5
LGTM.

Please, let me know when you're about to launch it so I can adjust bindings.

https://chromiumcodereview.appspot.com/10386107/diff/5064/runtime/lib/isolate.cc
File runtime/lib/isolate.cc (right):

https://chromiumcodereview.appspot.com/10386107/diff/5064/runtime/lib/isolate...
runtime/lib/isolate.cc:276: const char* root_script =
GetRootScriptUri(preserved_isolate);
root_script_uri?

Powered by Google App Engine
This is Rietveld 408576698