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

Issue 8399010: Fixed compiler so that it passes Switch1NegativeTest.dart. (Closed)

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

Description

Fixed compiler so that it passes Switch1NegativeTest.dart. In the process of fixing SwitchFallthruTest as well, but I need to fix generated constructors in frog first. TBR Committed: https://code.google.com/p/dart/source/detail?r=840

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+1152 lines, -602 lines) Patch
M frogsh View 1 2 343 chunks +1129 lines, -600 lines 3 comments Download
M gen.dart View 1 2 2 chunks +12 lines, -0 lines 2 comments Download
M lib/corelib.dart View 1 2 1 chunk +11 lines, -1 line 2 comments Download
M tests/frog/frog.status View 1 2 1 chunk +0 lines, -1 line 1 comment Download

Messages

Total messages: 3 (0 generated)
Emily Fortuna
9 years, 1 month ago (2011-10-27 17:08:55 UTC) #1
jimhug
This is a great start, but it still needs some work - and at least ...
9 years, 1 month ago (2011-10-27 17:45:11 UTC) #2
Emily Fortuna
9 years, 1 month ago (2011-10-27 17:59:03 UTC) #3
http://codereview.chromium.org/8399010/diff/5001/frogsh
File frogsh (right):

http://codereview.chromium.org/8399010/diff/5001/frogsh#newcode2004
frogsh:2004: $throw(new FallThroughError("./leg/scanner/scanner.dart", 65))
Yeah, I've reversed this change in r843. Will make a better solution for the
next CL.

On 2011/10/27 17:45:11, jimhug wrote:
> Hopefully, this code - as well as our other similar tokenizer code below helps
> capture the need for some minimal flow analysis to keep the generated code
small
> and readable?

http://codereview.chromium.org/8399010/diff/5001/gen.dart
File gen.dart (right):

http://codereview.chromium.org/8399010/diff/5001/gen.dart#newcode1355
gen.dart:1355: stmt.visit(this);
On 2011/10/27 17:45:11, jimhug wrote:
> This needs to do some sort of minimal checking for flow here.  In particular,
we
> shouldn't be adding the throw immediately after a break of a return.

Done in the next CL.

http://codereview.chromium.org/8399010/diff/5001/lib/corelib.dart
File lib/corelib.dart (right):

http://codereview.chromium.org/8399010/diff/5001/lib/corelib.dart#newcode94
lib/corelib.dart:94: class FallThroughError {
This was left over when when I was testing the dart->js constructor issue. It
has been taken out.

On 2011/10/27 17:45:11, jimhug wrote:
> This should be causing a validation error - you can't initialize finals after
> initializers have run.  Try this version for the constructor:
> 
> const FallThroughError(this.url, this.line);

Powered by Google App Engine
This is Rietveld 408576698