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

Issue 8330023: Simplify isolate startup, push isolate init onto the prototype. (Closed)

Created:
9 years, 2 months ago by John Lenz
Modified:
9 years, 2 months ago
Reviewers:
floitsch
CC:
reviews_dartlang.org, kasperl
Visibility:
Public.

Description

Simplify isolate startup, push isolate init onto the prototype. Also correct the initialization of class non-static fields.

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -28 lines) Patch
M compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java View 5 chunks +11 lines, -18 lines 3 comments Download
M compiler/lib/implementation/isolate.js View 3 chunks +1 line, -10 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
John Lenz
9 years, 2 months ago (2011-10-18 16:12:24 UTC) #1
John Lenz
On 2011/10/18 16:12:24, John Lenz wrote: This one is also going to wait until we ...
9 years, 2 months ago (2011-10-18 16:13:10 UTC) #2
floitsch
FYI. Currently no data is shared between isolates. I'm not sure we actually need this, ...
9 years, 2 months ago (2011-10-21 22:57:53 UTC) #3
John Lenz
9 years, 2 months ago (2011-10-24 16:28:30 UTC) #4
On 2011/10/21 22:57:53, floitsch wrote:
> FYI.
> Currently no data is shared between isolates.

If you are saying, there is no shared state, then yes that is correct. And there
is still no shared state after this change.  However, the entire code base is
"shared data"

 I'm not sure we actually need
> this, and this change would move statics to the Isolate's prototype. I added
> Kasper for his opinion on this.
> 
> If we want to have full performance keeping some fields in the prototype of
the
> class is probably not a good idea either. The objects will have different
hidden
> classes, and thus be less optimized (@Kasper: correct me if I'm wrong).
> 
>
http://codereview.chromium.org/8330023/diff/1/compiler/java/com/google/dart/c...
> File
> compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java
> (left):
> 
>
http://codereview.chromium.org/8330023/diff/1/compiler/java/com/google/dart/c...
>
compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java:1595:
> fieldName = AstUtil.newNameRef(new JsThisRef(), getJsName(element));
> was this correct?

This was adding values to the global "this".  It was not corrected when the
value moved from the getter (with a proper this) to the isolate state.  These
should never have been moved as they are instance state not global(aka isolate)
state.

> 
>
http://codereview.chromium.org/8330023/diff/1/compiler/java/com/google/dart/c...
> File
> compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java
> (right):
> 
>
http://codereview.chromium.org/8330023/diff/1/compiler/java/com/google/dart/c...
>
compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java:1587:
> JsExpression qualifier =
> AstUtil.newNameRef(getJsName(element.getEnclosingElement()).makeRef(),
> "prototype");
> 100 chars
> 
>
http://codereview.chromium.org/8330023/diff/1/compiler/java/com/google/dart/c...
>
compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java:1588:
> fieldName = AstUtil.newNameRef(qualifier, getJsName(element));
> Afaics fieldName is only used if defer == true, which means that the complete
> 'else' branch is currently unused.

Powered by Google App Engine
This is Rietveld 408576698