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

Issue 8577003: Convert most of the javascript isolate code into Dart, inject JS code only when (Closed)

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

Description

Convert most of the javascript isolate code into Dart, inject JS code only when isolates are used by the application. This brings 'hello world' down to 1.2k Committed: https://code.google.com/p/dart/source/detail?r=1581

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 34
Unified diffs Side-by-side diffs Delta from patch set Stats (+638 lines, -1089 lines) Patch
M frog/corejs.dart View 2 chunks +47 lines, -0 lines 0 comments Download
M frog/frogsh View 10 chunks +39 lines, -501 lines 1 comment Download
M frog/gen.dart View 2 chunks +11 lines, -1 line 0 comments Download
M frog/lib/corelib_impl.dart View 1 chunk +0 lines, -1 line 0 comments Download
M frog/lib/isolate.dart View 1 2 7 chunks +518 lines, -91 lines 25 comments Download
D frog/lib/isolate.js View 1 chunk +0 lines, -492 lines 1 comment Download
M frog/lib/isolate_serialization.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M frog/value.dart View 2 chunks +20 lines, -0 lines 7 comments Download
M tests/co19/co19-frog.status View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
Siggi Cherem (dart-lang)
there is still lots of clean up that we can do, but I thought this ...
9 years, 1 month ago (2011-11-16 17:36:26 UTC) #1
jimhug
LGTM! Do you have a number for how the size of the trivial isolate sample/isolate ...
9 years, 1 month ago (2011-11-16 18:00:45 UTC) #2
Siggi Cherem (dart-lang)
On 2011/11/16 18:00:45, jimhug wrote: > LGTM! > > Do you have a number for ...
9 years, 1 month ago (2011-11-16 18:15:35 UTC) #3
mattsh
Very nice. Some comments below. http://codereview.chromium.org/8577003/diff/3010/frog/lib/isolate.dart File frog/lib/isolate.dart (right): http://codereview.chromium.org/8577003/diff/3010/frog/lib/isolate.dart#newcode21 frog/lib/isolate.dart:21: * (e.g. hello world), ...
9 years, 1 month ago (2011-11-16 19:09:17 UTC) #4
Siggi Cherem (dart-lang)
thanks for the comments. I'm addressing many of them in a follow up CL. I'm ...
9 years, 1 month ago (2011-11-17 02:03:04 UTC) #5
Jennifer Messerly
http://codereview.chromium.org/8577003/diff/3010/frog/lib/isolate.dart File frog/lib/isolate.dart (right): http://codereview.chromium.org/8577003/diff/3010/frog/lib/isolate.dart#newcode78 frog/lib/isolate.dart:78: bool get useWorkers() => supportsWorkers; a lot of these ...
9 years, 1 month ago (2011-11-17 02:28:11 UTC) #6
Siggi Cherem (dart-lang)
http://codereview.chromium.org/8577003/diff/3010/frog/lib/isolate.dart File frog/lib/isolate.dart (right): http://codereview.chromium.org/8577003/diff/3010/frog/lib/isolate.dart#newcode78 frog/lib/isolate.dart:78: bool get useWorkers() => supportsWorkers; On 2011/11/17 02:28:11, John ...
9 years, 1 month ago (2011-11-17 16:50:06 UTC) #7
Jennifer Messerly
9 years, 1 month ago (2011-11-17 19:18:03 UTC) #8
http://codereview.chromium.org/8577003/diff/3010/frog/value.dart
File frog/value.dart (right):

http://codereview.chromium.org/8577003/diff/3010/frog/value.dart#newcode308
frog/value.dart:308: world.gen.corejs.useWrap0 = true;
On 2011/11/17 16:50:11, sigmund wrote:
> On 2011/11/17 02:28:11, John Messerly wrote:
> > should this also set useIsolates to true? Or you could end up emitting a
call
> to
> > $wrap_call$1, but not emitting the function, if I'm reading it right
> 
> In this case no, we don't want to mark useIsolates=true to avoid introducing
the
> isolate code only because you use a callback in the dom. 
> 
> Instead, corejs.dart generates code whenever useWrap0 is true. If
> useIsolates=false then the $wrap_call$0 body is just the identity function.

My bad. I didn't read corejs.dart carefully enough. I really like the approach
you took with this!

Powered by Google App Engine
This is Rietveld 408576698