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

Issue 8478025: Restore r1383: Fix method resolution to warn about things that don't exist on the declared type. (Closed)

Created:
9 years, 1 month ago by Jennifer Messerly
Modified:
9 years, 1 month ago
Reviewers:
jimhug, Kasper Lund, kasperl
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Restore r1383: Fix method resolution to warn about things that don't exist on the declared type. Only change from previous rev is fixed co19 status file. There are some new failures in "negative" tests, but they're now failing for the right reason instead of failing because Frog generated incorrect code. They're passing (i.e. throwing the right runtime type error) if I pass --enable_type_checks. So we just need to get that hooked up somehow. Committed: https://code.google.com/p/dart/source/detail?r=1389

Patch Set 1 #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+525 lines, -412 lines) Patch
M frog/frogsh View 94 chunks +282 lines, -235 lines 0 comments Download
M frog/gen.dart View 6 chunks +54 lines, -45 lines 0 comments Download
M frog/lib/corelib.dart View 1 chunk +1 line, -1 line 0 comments Download
M frog/library.dart View 3 chunks +3 lines, -3 lines 1 comment Download
M frog/member.dart View 13 chunks +48 lines, -30 lines 0 comments Download
M frog/tree.dart View 1 chunk +1 line, -0 lines 1 comment Download
M frog/type.dart View 10 chunks +65 lines, -44 lines 2 comments Download
M frog/utils.dart View 1 chunk +1 line, -1 line 1 comment Download
M frog/value.dart View 6 chunks +52 lines, -38 lines 1 comment Download
M frog/world.dart View 1 chunk +14 lines, -14 lines 1 comment Download
M tests/co19/co19-frog.status View 2 chunks +4 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
Jennifer Messerly
submitted tbr. looks like it's passing this time. Original CR here: http://codereview.chromium.org/8497064/ Only difference is ...
9 years, 1 month ago (2011-11-10 10:23:48 UTC) #1
kasperl
The co19-status file changes LGTM!
9 years, 1 month ago (2011-11-10 11:47:23 UTC) #2
jimhug
9 years, 1 month ago (2011-11-10 15:47:21 UTC) #3
LGTM!

Most of the required type changes feel like a good thing and make the code
"better".  The types required inside the body of an if (x is C) still feel like
noise and just cheer on the dynamic half of my personality that feels this whole
static type thing just gets in the way.

http://codereview.chromium.org/8478025/diff/1/frog/library.dart
File frog/library.dart (right):

http://codereview.chromium.org/8478025/diff/1/frog/library.dart#newcode14
frog/library.dart:14: Map<String, DefinedType> types;
FYI: Reading this CL is making me wonder if DefinedType is the world's best
name...  It felt like a good choice when it was used much less often.

http://codereview.chromium.org/8478025/diff/1/frog/tree.dart
File frog/tree.dart (right):

http://codereview.chromium.org/8478025/diff/1/frog/tree.dart#newcode30
frog/tree.dart:30: String get nativeType() => null;
This puzzled me for a while - even though I wrote the original property that
this is <whatever the opposite of overrides is>..  Even with the explicit return
type of String, I kept trying to understand why we'd be putting a [Type] member
on something in the AST.  TODO - This should be renamed to nativeTypeName to
avoid future confusion.

http://codereview.chromium.org/8478025/diff/1/frog/type.dart
File frog/type.dart (right):

http://codereview.chromium.org/8478025/diff/1/frog/type.dart#newcode46
frog/type.dart:46: abstract addDirectSubtype(Type type);
Another of those cool vs. weird things - but I'm also going to claim that I
think its cool how this type is gradually morphing into its full abstract form.

http://codereview.chromium.org/8478025/diff/1/frog/type.dart#newcode744
frog/type.dart:744: TypeDefinition typeDef = definition;
Can we at least add a TODO here?  TODO: Fix the compiler so it stops yelling at
me when I do such easy to analyze things.

http://codereview.chromium.org/8478025/diff/1/frog/utils.dart
File frog/utils.dart (right):

http://codereview.chromium.org/8478025/diff/1/frog/utils.dart#newcode55
frog/utils.dart:55: List keys = map.getKeys();
Huh?  Was this change actually needed?

http://codereview.chromium.org/8478025/diff/1/frog/value.dart
File frog/value.dart (right):

http://codereview.chromium.org/8478025/diff/1/frog/value.dart#newcode464
frog/value.dart:464: // downcasts to use; can we make that cleaner? (search for
".dynamic")
I'm working on this in a complex multi-part set of carefully staged fixes to
Value <smile>.  Seriously, I am working on this and you should get the first of
several incremental CLs for this later today.

http://codereview.chromium.org/8478025/diff/1/frog/world.dart
File frog/world.dart (right):

http://codereview.chromium.org/8478025/diff/1/frog/world.dart#newcode87
frog/world.dart:87: DefinedType varType;
FYI: This is both cool and a little bit weird to see this combination of changes
to fix the type system - and then to fix type issues in frog caught by the fixes
to the type system...  For now, I'm thinking the cool factor wins.

Powered by Google App Engine
This is Rietveld 408576698