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

Issue 8567010: Dynamically dispatch getters and setters on dynamically-typed variables. (Closed)

Created:
9 years, 1 month ago by nweiz
Modified:
9 years, 1 month ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Dynamically dispatch getters and setters on dynamically-typed variables. This breaks MethodBindingTest, but only because first-class methods aren't really supported by Frog in the first place. The fundamental issue is that Frog doesn't know to compile a property-syntax getter for a method (e.g. "get$methodName"). Teaching it to do so is outside the scope of this change. This would technically fix ConstObjectsAreImmutableTest, but only because it causes what used to be "a.x = 499" to become "a.set$x(499)", which raises an error not because a is const but because A doesn't have a "set$x" method. Thus this change adds a type declaration to the test so it continues to use "a.x = 499". Committed: https://code.google.com/p/dart/source/detail?r=1641

Patch Set 1 #

Total comments: 10

Patch Set 2 : Code review changes, frogsh #

Unified diffs Side-by-side diffs Delta from patch set Stats (+886 lines, -523 lines) Patch
M frog/frogsh View 1 306 chunks +830 lines, -491 lines 0 comments Download
M frog/member.dart View 1 4 chunks +48 lines, -29 lines 0 comments Download
M tests/language/language.status View 1 chunk +1 line, -0 lines 0 comments Download
M tests/language/src/ConstObjectsAreImmutableTest.dart View 1 1 chunk +7 lines, -3 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
nweiz
9 years, 1 month ago (2011-11-14 21:43:31 UTC) #1
nweiz
http://codereview.chromium.org/8567010/diff/1/frog/member.dart File frog/member.dart (right): http://codereview.chromium.org/8567010/diff/1/frog/member.dart#newcode1402 frog/member.dart:1402: targets.forEach((m) => m._get(context, node, target, isDynamic: true)); This line ...
9 years, 1 month ago (2011-11-15 00:04:08 UTC) #2
Jennifer Messerly
http://codereview.chromium.org/8567010/diff/1/frog/member.dart File frog/member.dart (right): http://codereview.chromium.org/8567010/diff/1/frog/member.dart#newcode1402 frog/member.dart:1402: targets.forEach((m) => m._get(context, node, target, isDynamic: true)); On 2011/11/15 ...
9 years, 1 month ago (2011-11-15 04:44:34 UTC) #3
nweiz
http://codereview.chromium.org/8567010/diff/1/frog/member.dart File frog/member.dart (right): http://codereview.chromium.org/8567010/diff/1/frog/member.dart#newcode1402 frog/member.dart:1402: targets.forEach((m) => m._get(context, node, target, isDynamic: true)); On 2011/11/15 ...
9 years, 1 month ago (2011-11-15 20:59:25 UTC) #4
Jennifer Messerly
9 years, 1 month ago (2011-11-16 23:42:35 UTC) #5
lgtm

http://codereview.chromium.org/8567010/diff/1/frog/member.dart
File frog/member.dart (right):

http://codereview.chromium.org/8567010/diff/1/frog/member.dart#newcode1402
frog/member.dart:1402: targets.forEach((m) => m._get(context, node, target,
isDynamic: true));
On 2011/11/15 20:59:25, nweiz wrote:
> On 2011/11/15 04:44:34, John Messerly wrote:
> > On 2011/11/15 00:04:08, nweiz wrote:
> > > This line seems to be slowing down the compilation by about two orders of
> > > magnitude when using the release build of the VM and frogc.dart. This
> slowdown
> > > doesn't occur on Node with frog.dart, and I'm at a bit of a loss as to why
> > it's
> > > happening. Could it be something relating to the VM's memory limit?
> > 
> > Sounds like it. I'd try passing: --new_gen_heap_size=64
> 
> Increasing the heap size seems to do the trick. Is it safe to commit with the
> slowdown for the default heap size? Should I increase the heap size in
> presubmit.py?

Yes, definitely increase it there too. Maybe frog.py as well.

Powered by Google App Engine
This is Rietveld 408576698