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

Issue 9359039: Source in most stuff. (Closed)

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

Description

Source in most stuff. Committed: https://code.google.com/p/dart/source/detail?r=4270

Patch Set 1 : changes #

Total comments: 8

Patch Set 2 : address review comments #

Patch Set 3 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -59 lines) Patch
M dart/frog/leg/compiler.dart View 1 1 chunk +8 lines, -1 line 0 comments Download
M dart/frog/leg/elements/elements.dart View 1 2 1 chunk +5 lines, -1 line 0 comments Download
M dart/frog/leg/frog_leg.dart View 1 chunk +1 line, -0 lines 0 comments Download
M dart/frog/leg/lib/core.dart View 1 2 4 chunks +33 lines, -17 lines 0 comments Download
M dart/frog/leg/lib/coreimpl.dart View 1 chunk +12 lines, -0 lines 0 comments Download
M dart/frog/leg/lib/js_helper.dart View 1 1 chunk +0 lines, -2 lines 0 comments Download
M dart/frog/leg/scanner/listener.dart View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M dart/frog/leg/scanner/scanner_task.dart View 1 2 chunks +15 lines, -3 lines 0 comments Download
M dart/tests/co19/co19-leg.status View 1 2 7 chunks +34 lines, -26 lines 0 comments Download
M dart/tests/language/language-leg.status View 1 2 8 chunks +15 lines, -7 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
ahe
8 years, 10 months ago (2012-02-14 16:43:51 UTC) #1
kasperl
LGTM! https://chromiumcodereview.appspot.com/9359039/diff/3001/dart/frog/leg/elements/elements.dart File dart/frog/leg/elements/elements.dart (right): https://chromiumcodereview.appspot.com/9359039/diff/3001/dart/frog/leg/elements/elements.dart#newcode326 dart/frog/leg/elements/elements.dart:326: Type type = compiler.types.lookup(name); Would it be cleaner ...
8 years, 10 months ago (2012-02-15 09:22:29 UTC) #2
ahe
Hi Kasper, Thank you for your comments. Cheers, Peter https://chromiumcodereview.appspot.com/9359039/diff/3001/dart/frog/leg/elements/elements.dart File dart/frog/leg/elements/elements.dart (right): https://chromiumcodereview.appspot.com/9359039/diff/3001/dart/frog/leg/elements/elements.dart#newcode326 dart/frog/leg/elements/elements.dart:326: ...
8 years, 10 months ago (2012-02-15 09:46:55 UTC) #3
ngeoffray
LGTM! https://chromiumcodereview.appspot.com/9359039/diff/3001/dart/frog/leg/scanner/scanner_task.dart File dart/frog/leg/scanner/scanner_task.dart (right): https://chromiumcodereview.appspot.com/9359039/diff/3001/dart/frog/leg/scanner/scanner_task.dart#newcode42 dart/frog/leg/scanner/scanner_task.dart:42: for (ScriptTag tag in imports.toLink()) { Maybe add ...
8 years, 10 months ago (2012-02-15 09:53:03 UTC) #4
kasperl
https://chromiumcodereview.appspot.com/9359039/diff/3001/dart/frog/leg/elements/elements.dart File dart/frog/leg/elements/elements.dart (right): https://chromiumcodereview.appspot.com/9359039/diff/3001/dart/frog/leg/elements/elements.dart#newcode326 dart/frog/leg/elements/elements.dart:326: Type type = compiler.types.lookup(name); On 2012/02/15 09:46:55, ahe wrote: ...
8 years, 10 months ago (2012-02-15 10:01:29 UTC) #5
ahe
8 years, 10 months ago (2012-02-15 15:08:41 UTC) #6
Hi Nicolas and Kasper,

Thank you for your comments.

Cheers,
Peter

https://chromiumcodereview.appspot.com/9359039/diff/3001/dart/frog/leg/elemen...
File dart/frog/leg/elements/elements.dart (right):

https://chromiumcodereview.appspot.com/9359039/diff/3001/dart/frog/leg/elemen...
dart/frog/leg/elements/elements.dart:326: Type type =
compiler.types.lookup(name);
On 2012/02/15 10:01:29, kasperl wrote:
> On 2012/02/15 09:46:55, ahe wrote:
> > On 2012/02/15 09:22:30, kasperl wrote:
> > > Would it be cleaner to have a way of querying if the types contains a
> certain
> > > name and deal with that first? I'm always a bit worried when I see lookup
> > > functions that happily return null.
> > 
> > Interesting difference of opinion here: I really prefer avoiding looking up
> > something twice. Or is it the name of the method that you don't like?
> 
> Yeah, I think it would be neater with something like 
> 
> compiler.types.lookupIfAbsent(
>   name, 
>   () => compiler.types.dynamicType);
> 
> or maybe just move the logic into compiler.types.lookup. Usually I prefer
having
> something like lookup throw an error if it cannot find the thing you're
looking
> for because it is so easy to write code under that assumption.

Actually, this entire method is somewhat broken. I plan to overhaul this a some
point, but I'm not sure what to do. Karl and I had a conversation about this,
but we didn't come up with anything yet.

https://chromiumcodereview.appspot.com/9359039/diff/3001/dart/frog/leg/scanne...
File dart/frog/leg/scanner/scanner_task.dart (right):

https://chromiumcodereview.appspot.com/9359039/diff/3001/dart/frog/leg/scanne...
dart/frog/leg/scanner/scanner_task.dart:42: for (ScriptTag tag in
imports.toLink()) {
On 2012/02/15 09:53:03, ngeoffray wrote:
> Maybe add a comment on why you need to import last.

Done.

Powered by Google App Engine
This is Rietveld 408576698