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

Issue 9110027: Some cleanups to Frog to avoid looking up its builtin types too much (Closed)

Created:
8 years, 11 months ago by Jennifer Messerly
Modified:
8 years, 11 months ago
Reviewers:
jimhug
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Small performance improvement: avoid looking up builtin types too much by tracking them, particularly ones in coreimpl like NumImplementation. I also did a few refactorings: * Tried to tame the "nativeName" stuff to keep the code paths from forking too much * Removed the bad code duplication between needsConversion and convertTo in Value (they had gone out of sync again!) * Simplified the function wrapping code & made it clear it's about isolates. The code still checks for DOM, but conceptually it's part of our isolate impl. If we had a different way to tag native function types (e.g. perhaps the "native" keyword, if it's allowed in that position?) we could remove the DOM check there. Committed: https://code.google.com/p/dart/source/detail?r=3057

Patch Set 1 #

Patch Set 2 : updated #

Total comments: 1

Patch Set 3 : removed dead files #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+282 lines, -291 lines) Patch
M client/dom/dom_frog.dart View 1 1 chunk +0 lines, -1 line 0 comments Download
D client/dom/dom_frog.js View 1 2 1 chunk +0 lines, -7 lines 0 comments Download
M client/dom/frog/dom_frog.dart View 1 1 chunk +0 lines, -1 line 0 comments Download
D client/dom/frog/dom_frog.js View 1 2 1 chunk +0 lines, -7 lines 0 comments Download
M frog/corejs.dart View 1 3 chunks +10 lines, -4 lines 0 comments Download
M frog/element.dart View 1 chunk +1 line, -1 line 0 comments Download
M frog/gen.dart View 14 chunks +18 lines, -20 lines 0 comments Download
M frog/library.dart View 1 2 chunks +4 lines, -1 line 0 comments Download
M frog/member.dart View 7 chunks +16 lines, -21 lines 2 comments Download
M frog/minfrog View 1 42 chunks +129 lines, -128 lines 0 comments Download
M frog/type.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M frog/value.dart View 1 8 chunks +55 lines, -68 lines 0 comments Download
M frog/var_member.dart View 1 chunk +2 lines, -3 lines 0 comments Download
M frog/world.dart View 1 7 chunks +36 lines, -21 lines 0 comments Download
M utils/apidoc/html_diff.dart View 5 chunks +9 lines, -6 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Jennifer Messerly
tbr http://codereview.chromium.org/9110027/diff/2001/utils/apidoc/html_diff.dart File utils/apidoc/html_diff.dart (right): http://codereview.chromium.org/9110027/diff/2001/utils/apidoc/html_diff.dart#newcode39 utils/apidoc/html_diff.dart:39: for (var type in diff.dom.types.getValues()) { I was ...
8 years, 11 months ago (2012-01-06 21:36:29 UTC) #1
jimhug
LGTM! Nice cleanups. My only question is about the TODOs that you added "we shouldn't ...
8 years, 11 months ago (2012-01-11 19:09:53 UTC) #2
Jennifer Messerly
8 years, 11 months ago (2012-01-11 19:22:11 UTC) #3
On 2012/01/11 19:09:53, jimhug wrote:
> LGTM!
> 
> Nice cleanups.  My only question is about the TODOs that you added "we
shouldn't
> be special casing DOM anymore".  I agree that that is a nice ideal to shoot
for;
> however, it would not trouble me a bit if we still had some special case
support
> in the compiler for DOM by the time of a 1.0 ship - given that dart is a web
dev
> language after all.

Totally agree :). I'd be nice if the DOM differences are captured in the
metadata somehow, i.e. like what we did for "hidden prototypes", rather than
making behavior different if the lib happens to be called "dart:dom".
(especially since node.js often has the same issues). But I agree we might not
get there, and I wouldn't feel too bad if we still have library == "dart:dom"
checks.

> 
> http://codereview.chromium.org/9110027/diff/4004/frog/member.dart
> File frog/member.dart (right):
> 
> http://codereview.chromium.org/9110027/diff/4004/frog/member.dart#newcode1074
> frog/member.dart:1074: // TODO(jmesserly): using the "node" here feels really
> hacky
> Yes!
> On 2012/01/06 21:36:29, John Messerly wrote:
> > one cleanup I'd like to do:
> > 
> > if we're in visitNewExpression and we get back the constructor, don't just
> call
> > "invoke" on the MethodMember. Instead call invokeConstructor (which should
be
> > called "construct") directly, and add a parameter to it saying whether its a
> > "const" or "new". 
> > 
> > Most of the reasons that "node" gets passed around instead of "span" is
> because
> > of this problem.

Powered by Google App Engine
This is Rietveld 408576698