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

Issue 8999030: frog isolate fixes: minor changes to the isolate library + architecture.py (Closed)

Created:
9 years ago by Siggi Cherem (dart-lang)
Modified:
9 years ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

frog isolate fixes: minor changes to the isolate library + architecture.py Committed: https://code.google.com/p/dart/source/detail?r=2792

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 1

Patch Set 3 : '' #

Total comments: 9

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -29 lines) Patch
M frog/lib/isolate.dart View 1 2 3 4 chunks +20 lines, -11 lines 0 comments Download
M frog/minfrog View 1 2 3 4 5 4 chunks +14 lines, -3 lines 0 comments Download
M frog/world.dart View 1 2 3 4 5 1 chunk +12 lines, -5 lines 0 comments Download
M tests/isolate/isolate.status View 1 chunk +4 lines, -5 lines 0 comments Download
M tests/language/language.status View 1 2 3 3 chunks +2 lines, -4 lines 0 comments Download
M tools/testing/architecture.py View 2 chunks +1 line, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
Siggi Cherem (dart-lang)
http://codereview.chromium.org/8999030/diff/2001/tools/testing/architecture.py File tools/testing/architecture.py (right): http://codereview.chromium.org/8999030/diff/2001/tools/testing/architecture.py#newcode53 tools/testing/architecture.py:53: <script type="%(script_type)s" src="%(source_script)s"></script> this move was useful because isolates ...
9 years ago (2011-12-22 00:24:02 UTC) #1
mattsh
LGTM http://codereview.chromium.org/8999030/diff/3006/frog/world.dart File frog/world.dart (right): http://codereview.chromium.org/8999030/diff/3006/frog/world.dart#newcode219 frog/world.dart:219: && (!_isDomWorker(existing) || !_isIsolateWorker(named))) { is there a ...
9 years ago (2011-12-22 01:55:15 UTC) #2
Siggi Cherem (dart-lang)
http://codereview.chromium.org/8999030/diff/3006/frog/world.dart File frog/world.dart (right): http://codereview.chromium.org/8999030/diff/3006/frog/world.dart#newcode219 frog/world.dart:219: && (!_isDomWorker(existing) || !_isIsolateWorker(named))) { On 2011/12/22 01:55:15, mattsh ...
9 years ago (2011-12-22 18:51:15 UTC) #3
Jennifer Messerly
lgtm, with some suggestions http://codereview.chromium.org/8999030/diff/3006/frog/lib/isolate.dart File frog/lib/isolate.dart (right): http://codereview.chromium.org/8999030/diff/3006/frog/lib/isolate.dart#newcode173 frog/lib/isolate.dart:173: class _Worker native "*Worker" { ...
9 years ago (2011-12-22 19:49:44 UTC) #4
Siggi Cherem (dart-lang)
http://codereview.chromium.org/8999030/diff/3006/frog/world.dart File frog/world.dart (right): http://codereview.chromium.org/8999030/diff/3006/frog/world.dart#newcode235 frog/world.dart:235: _isDomWorker(Element e) { On 2011/12/22 19:49:44, John Messerly wrote: ...
9 years ago (2011-12-22 21:17:23 UTC) #5
Jennifer Messerly
On 2011/12/22 21:17:23, sigmund wrote: > http://codereview.chromium.org/8999030/diff/3006/frog/world.dart > File frog/world.dart (right): > > http://codereview.chromium.org/8999030/diff/3006/frog/world.dart#newcode235 > ...
9 years ago (2011-12-22 21:26:50 UTC) #6
Siggi Cherem (dart-lang)
9 years ago (2011-12-22 21:50:41 UTC) #7
On 2011/12/22 21:26:50, John Messerly wrote:
> On 2011/12/22 21:17:23, sigmund wrote:
> > http://codereview.chromium.org/8999030/diff/3006/frog/world.dart
> > File frog/world.dart (right):
> > 
> > http://codereview.chromium.org/8999030/diff/3006/frog/world.dart#newcode235
> > frog/world.dart:235: _isDomWorker(Element e) {
> > On 2011/12/22 19:49:44, John Messerly wrote:
> > > personally I'd put this as a getter on Element. Even though we only use it
> > from
> > > world right now: "named.isWebWorker" reads better imho (or "isWorker" --
but
> > > Worker is kind of generic, and most people are familiar with the "web
> worker"
> > > term)
> > 
> > Seems really strange to add this on Element. I don't know if this will be
the
> > only type conflict that we will ever have though. An alternative I was
> > discussing with Matt was to change the if test above to be:
> > 
> > if (!_isConflictHarmless(named, element)) {
> >   ...
> > }
> > 
> > and define here:
> > _isConflictHarmless(e1, e2) {
> >   if (e1.library != dom && e1.library != corelib) return false;
> >   if (e2.library != dom && e2.library != corelib) return false;
> >   return e1.nativeName == 'Worker' && e2.nativeName == 'Worker';
> > }
> 
> Types are Elements. You're just asking a Type if it's a Worker. We ask types
> what kind of type they are all the time (isObject, isVar, isList, ...)
> 
> I don't see why you're trying so hard to ensure that e1 is from "dom", and e2
is
> from "corelib". If it were me, I'd write that function as:
> 
> // Trust our builtin libs (dom, corelib, coreimpl) not to conflict with
> eachother
> bool _isConflictHarmless(e1, e2) => e1.library.isBuiltin &&
> e2.library.isBuiltin;
> 
> class Library {
>  ... 
>   bool get isBuiltin() => name.startsWith('dart:');
>  ...
> }
> 
> (Honestly that entire "internalError" block could go away -- it was just to
help
> debugging potential conflicts, but they're unlikely in practice. that's why I
> don't think it needs to be super precise about whitelisting Worker. If past
> experience is any guide I suspect Worker won't be the only type we'll want to
> whitelist in the long run)

After our live discussion, I went ahead and removed this specialized code and
made this internalError an info message. We basically are now assuming that
builtin libraries don't conflict with each other. If later we open 'native' more
broadly, we'll revisit this check and do something more clever.

Powered by Google App Engine
This is Rietveld 408576698