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

Issue 9835007: Typecheck constructor calls. I'm pretty sure about the call to (Closed)

Created:
8 years, 9 months ago by polux
Modified:
8 years, 8 months ago
Reviewers:
ahe, karlklose
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Typecheck constructor calls. Committed: https://code.google.com/p/dart/source/detail?r=6040

Patch Set 1 #

Total comments: 12

Patch Set 2 : take peter's commments into account #

Total comments: 4

Patch Set 3 : make sure we don't return before typechecking the arguments #

Total comments: 4

Patch Set 4 : fix lookupMethodType #

Total comments: 4

Patch Set 5 : Peter's comments #

Total comments: 4

Patch Set 6 : fix logic #

Patch Set 7 : Peter's comments #

Patch Set 8 : Trailing space #

Patch Set 9 : Add tests to TypeCheckerTest #

Total comments: 4

Patch Set 10 : Karl's comments #

Patch Set 11 : trailing whitespace #

Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -53 lines) Patch
M frog/tests/leg/src/TypeCheckerTest.dart View 1 2 3 4 5 6 7 8 9 10 3 chunks +34 lines, -0 lines 0 comments Download
M lib/compiler/implementation/typechecker.dart View 1 2 3 4 5 6 7 8 9 10 4 chunks +53 lines, -53 lines 0 comments Download
A tests/language/src/CallNonMethodFieldTest.dart View 1 2 3 4 5 6 1 chunk +23 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
polux
8 years, 9 months ago (2012-03-22 14:09:58 UTC) #1
ahe
I have some suggestions for how to simplify this. https://chromiumcodereview.appspot.com/9835007/diff/1/frog/leg/typechecker.dart File frog/leg/typechecker.dart (right): https://chromiumcodereview.appspot.com/9835007/diff/1/frog/leg/typechecker.dart#newcode376 frog/leg/typechecker.dart:376: ...
8 years, 9 months ago (2012-03-22 14:46:23 UTC) #2
polux
https://chromiumcodereview.appspot.com/9835007/diff/1/frog/leg/typechecker.dart File frog/leg/typechecker.dart (right): https://chromiumcodereview.appspot.com/9835007/diff/1/frog/leg/typechecker.dart#newcode376 frog/leg/typechecker.dart:376: void checkArgumentTypes(Node sendOrNew, Link<Node> argumentNodes, I could as well ...
8 years, 9 months ago (2012-03-22 15:08:26 UTC) #3
polux
https://chromiumcodereview.appspot.com/9835007/diff/1/frog/leg/typechecker.dart File frog/leg/typechecker.dart (right): https://chromiumcodereview.appspot.com/9835007/diff/1/frog/leg/typechecker.dart#newcode376 frog/leg/typechecker.dart:376: void checkArgumentTypes(Node sendOrNew, Link<Node> argumentNodes, On 2012/03/22 15:08:26, polux ...
8 years, 9 months ago (2012-03-22 15:36:47 UTC) #4
ahe
LGTM provided you address the returns. Please also wait for Karl's comments. https://chromiumcodereview.appspot.com/9835007/diff/2002/frog/leg/typechecker.dart File frog/leg/typechecker.dart ...
8 years, 9 months ago (2012-03-22 15:48:03 UTC) #5
ahe
8 years, 9 months ago (2012-03-22 15:51:29 UTC) #6
polux
https://chromiumcodereview.appspot.com/9835007/diff/2002/frog/leg/typechecker.dart File frog/leg/typechecker.dart (right): https://chromiumcodereview.appspot.com/9835007/diff/2002/frog/leg/typechecker.dart#newcode437 frog/leg/typechecker.dart:437: if (receiverType === types.dynamicType) return types.dynamicType; On 2012/03/22 15:48:03, ...
8 years, 9 months ago (2012-03-22 16:25:39 UTC) #7
ahe
Still LGTM, but let's wait for Karl. https://chromiumcodereview.appspot.com/9835007/diff/5002/frog/leg/typechecker.dart File frog/leg/typechecker.dart (right): https://chromiumcodereview.appspot.com/9835007/diff/5002/frog/leg/typechecker.dart#newcode450 frog/leg/typechecker.dart:450: fail(node, 'can ...
8 years, 9 months ago (2012-03-22 16:31:01 UTC) #8
ahe
http://codereview.chromium.org/9835007/diff/5002/frog/leg/typechecker.dart File frog/leg/typechecker.dart (right): http://codereview.chromium.org/9835007/diff/5002/frog/leg/typechecker.dart#newcode350 frog/leg/typechecker.dart:350: if (member !== null) return computeType(member); This is broken. ...
8 years, 9 months ago (2012-03-22 17:52:16 UTC) #9
polux
Fixed lookupMethodType so that it always complains when we lookup a non method and always ...
8 years, 9 months ago (2012-03-22 18:44:16 UTC) #10
ahe
https://chromiumcodereview.appspot.com/9835007/diff/7001/frog/leg/typechecker.dart File frog/leg/typechecker.dart (right): https://chromiumcodereview.appspot.com/9835007/diff/7001/frog/leg/typechecker.dart#newcode355 frog/leg/typechecker.dart:355: [classElement.name, name]); Once you have reported a warning, please ...
8 years, 9 months ago (2012-03-22 18:48:37 UTC) #11
polux
https://chromiumcodereview.appspot.com/9835007/diff/7001/frog/leg/typechecker.dart File frog/leg/typechecker.dart (right): https://chromiumcodereview.appspot.com/9835007/diff/7001/frog/leg/typechecker.dart#newcode355 frog/leg/typechecker.dart:355: [classElement.name, name]); On 2012/03/22 18:48:37, ahe wrote: > Once ...
8 years, 9 months ago (2012-03-22 20:56:48 UTC) #12
ahe
LGTM if Karl approves. https://chromiumcodereview.appspot.com/9835007/diff/5/frog/leg/typechecker.dart File frog/leg/typechecker.dart (right): https://chromiumcodereview.appspot.com/9835007/diff/5/frog/leg/typechecker.dart#newcode352 frog/leg/typechecker.dart:352: if (member !== null) { ...
8 years, 9 months ago (2012-03-22 21:04:59 UTC) #13
polux
https://chromiumcodereview.appspot.com/9835007/diff/5/frog/leg/typechecker.dart File frog/leg/typechecker.dart (right): https://chromiumcodereview.appspot.com/9835007/diff/5/frog/leg/typechecker.dart#newcode352 frog/leg/typechecker.dart:352: if (member !== null) { Ah sorry, I totally ...
8 years, 9 months ago (2012-03-22 21:30:57 UTC) #14
ahe
SLGTM
8 years, 9 months ago (2012-03-22 21:32:03 UTC) #15
karlklose
LGTM. The test case looks to me like it belonged in TypeAnalyzerTest. Is there currently ...
8 years, 9 months ago (2012-03-23 17:05:27 UTC) #16
polux
On 2012/03/23 17:05:27, karlklose wrote: > LGTM. > > The test case looks to me ...
8 years, 9 months ago (2012-03-26 09:24:33 UTC) #17
ahe
On 2012/03/26 09:24:33, polux wrote: > On 2012/03/23 17:05:27, karlklose wrote: > > LGTM. > ...
8 years, 9 months ago (2012-03-26 09:28:38 UTC) #18
polux
Added tests to TypeCheckerTest. Because the other files have been moved by https://chromiumcodereview.appspot.com/9873021/ it looks ...
8 years, 8 months ago (2012-03-29 16:44:42 UTC) #19
karlklose
Still LGTM. Thanks for the tests. https://chromiumcodereview.appspot.com/9835007/diff/10001/frog/tests/leg/src/TypeCheckerTest.dart File frog/tests/leg/src/TypeCheckerTest.dart (right): https://chromiumcodereview.appspot.com/9835007/diff/10001/frog/tests/leg/src/TypeCheckerTest.dart#newcode144 frog/tests/leg/src/TypeCheckerTest.dart:144: analyze("new C1();", I ...
8 years, 8 months ago (2012-03-30 08:55:31 UTC) #20
polux
On 2012/03/30 08:55:31, karlklose wrote: > Still LGTM. Thanks for the tests. > > https://chromiumcodereview.appspot.com/9835007/diff/10001/frog/tests/leg/src/TypeCheckerTest.dart ...
8 years, 8 months ago (2012-03-30 09:01:01 UTC) #21
polux
8 years, 8 months ago (2012-03-30 09:01:28 UTC) #22
https://chromiumcodereview.appspot.com/9835007/diff/10001/frog/tests/leg/src/...
File frog/tests/leg/src/TypeCheckerTest.dart (right):

https://chromiumcodereview.appspot.com/9835007/diff/10001/frog/tests/leg/src/...
frog/tests/leg/src/TypeCheckerTest.dart:144: analyze("new C1();",
Done, I thought the layout of the other methods was like that on purpose.
On 2012/03/30 08:55:31, karlklose wrote:
> I think most of these would fit on one line (also in
> testConstructorInvocationArgumentTypes and testMethodInvocationArgumentCount).

https://chromiumcodereview.appspot.com/9835007/diff/10001/frog/tests/leg/src/...
frog/tests/leg/src/TypeCheckerTest.dart:152: analyze("new C1();",
On 2012/03/30 08:55:31, karlklose wrote:
> new C1() -> new C2() (also in l. 154 and 156).

Thanks for catching that.

> Please also add a positive test
> like in line 144.

Actually, I kind of did but before my comment and with C1... what a mess. Done.

Powered by Google App Engine
This is Rietveld 408576698