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

Issue 9618053: Introduce the TYPEDEF element, and use it in order to catch passing closures to the DOM. I make the… (Closed)

Created:
8 years, 9 months ago by ngeoffray
Modified:
8 years, 9 months ago
Reviewers:
ahe, kasperl
CC:
reviews_dartlang.org, floitsch, karlklose, Lasse Reichstein Nielsen
Visibility:
Public.

Description

Introduce the TYPEDEF element, and use it in order to catch passing closures to the DOM. I make the assumption that the dom/html libraries will be sufficiently typed. Committed: https://code.google.com/p/dart/source/detail?r=5078

Patch Set 1 #

Total comments: 4

Patch Set 2 : #

Patch Set 3 : #

Total comments: 6

Patch Set 4 : #

Total comments: 1

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+127 lines, -19 lines) Patch
M frog/leg/elements/elements.dart View 1 2 3 4 4 chunks +26 lines, -4 lines 0 comments Download
M frog/leg/lib/js_helper.dart View 1 2 3 4 2 chunks +34 lines, -6 lines 0 comments Download
M frog/leg/native_handler.dart View 1 chunk +12 lines, -1 line 0 comments Download
M frog/leg/resolver.dart View 1 2 3 4 2 chunks +7 lines, -4 lines 0 comments Download
M frog/leg/scanner/listener.dart View 1 chunk +1 line, -0 lines 0 comments Download
M frog/leg/ssa/builder.dart View 1 chunk +4 lines, -0 lines 0 comments Download
M frog/leg/ssa/codegen.dart View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
A frog/tests/native/src/NativeWrappingFunctionFrogTest.dart View 1 2 3 1 chunk +39 lines, -0 lines 0 comments Download
M tests/co19/co19-leg.status View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M tests/language/language-leg.status View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
ngeoffray
New CL for handling closures passed to the DOM.
8 years, 9 months ago (2012-03-07 10:07:10 UTC) #1
kasperl
LGTM. Do you have any tests for this new code? https://chromiumcodereview.appspot.com/9618053/diff/4001/frog/leg/elements/elements.dart File frog/leg/elements/elements.dart (right): https://chromiumcodereview.appspot.com/9618053/diff/4001/frog/leg/elements/elements.dart#newcode72 ...
8 years, 9 months ago (2012-03-07 10:25:58 UTC) #2
ahe
LGTM https://chromiumcodereview.appspot.com/9618053/diff/1/frog/leg/elements/elements.dart File frog/leg/elements/elements.dart (right): https://chromiumcodereview.appspot.com/9618053/diff/1/frog/leg/elements/elements.dart#newcode344 frog/leg/elements/elements.dart:344: const EmptyLink<Type>(), Add a TODO explaining that the ...
8 years, 9 months ago (2012-03-07 10:37:54 UTC) #3
ngeoffray
8 years, 9 months ago (2012-03-07 10:43:48 UTC) #4
Thanks Peter and Kasper for the comments. I also added back the test.

https://chromiumcodereview.appspot.com/9618053/diff/1/frog/leg/elements/eleme...
File frog/leg/elements/elements.dart (right):

https://chromiumcodereview.appspot.com/9618053/diff/1/frog/leg/elements/eleme...
frog/leg/elements/elements.dart:344: const EmptyLink<Type>(),
On 2012/03/07 10:37:54, ahe wrote:
> Add a TODO explaining that the argument types is wrong.

Done.

https://chromiumcodereview.appspot.com/9618053/diff/1/frog/leg/lib/js_helper....
File frog/leg/lib/js_helper.dart (right):

https://chromiumcodereview.appspot.com/9618053/diff/1/frog/leg/lib/js_helper....
frog/leg/lib/js_helper.dart:1312: convertDartClosureToJS(closure) {
On 2012/03/07 10:37:54, ahe wrote:
> Document this.

Done.

https://chromiumcodereview.appspot.com/9618053/diff/4001/frog/leg/elements/el...
File frog/leg/elements/elements.dart (right):

https://chromiumcodereview.appspot.com/9618053/diff/4001/frog/leg/elements/el...
frog/leg/elements/elements.dart:72: bool isClassOrInterfaceOrAlias() {
On 2012/03/07 10:25:59, kasperl wrote:
> isClassOrInterfaceOrTypedef? Maybe we should have a term for that. I know
Peter
> do not like isType but maybe something like introducesTypeName?

Peter prefered Alias, that was fine by me, but now, 2 rights make 1 wrong :)

Peter told me he had a plan for cleaning this, so I'll leave it to
isClassOrInterfaceOrTypedef.

https://chromiumcodereview.appspot.com/9618053/diff/4001/frog/leg/elements/el...
frog/leg/elements/elements.dart:340: if (element.kind === ElementKind.TYPEDEF) {
On 2012/03/07 10:25:59, kasperl wrote:
> isTypedef()

Done.

https://chromiumcodereview.appspot.com/9618053/diff/4001/frog/leg/elements/el...
frog/leg/elements/elements.dart:347: if (element.kind === ElementKind.CLASS) {
On 2012/03/07 10:25:59, kasperl wrote:
> isClass()

Done.

Powered by Google App Engine
This is Rietveld 408576698