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

Issue 10541173: Generate nested else if (Closed)

Created:
8 years, 6 months ago by ngeoffray
Modified:
8 years, 6 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Generate nested else if: if (a) { } else if () { } instead of: if (a) { } else { if () { } } Committed: https://code.google.com/p/dart/source/detail?r=8800

Patch Set 1 #

Total comments: 5

Patch Set 2 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -16 lines) Patch
M dart/lib/compiler/implementation/ssa/codegen.dart View 1 13 chunks +58 lines, -16 lines 2 comments Download

Messages

Total messages: 5 (0 generated)
ngeoffray
FYI: I'm sending this out even though I won't be able to commit it in ...
8 years, 6 months ago (2012-06-14 15:44:14 UTC) #1
Lasse Reichstein Nielsen
LGTM https://chromiumcodereview.appspot.com/10541173/diff/1/dart/lib/compiler/implementation/ssa/codegen.dart File dart/lib/compiler/implementation/ssa/codegen.dart (right): https://chromiumcodereview.appspot.com/10541173/diff/1/dart/lib/compiler/implementation/ssa/codegen.dart#newcode1354 dart/lib/compiler/implementation/ssa/codegen.dart:1354: : IF_STATEMENT; Maybe (later) consider whether the if-"statement" ...
8 years, 6 months ago (2012-06-15 08:31:01 UTC) #2
kasperl
Lasse, maybe you could land this for Nicolas?
8 years, 6 months ago (2012-06-18 12:04:34 UTC) #3
ngeoffray
Thanks Lasse! Submitting... https://chromiumcodereview.appspot.com/10541173/diff/1/dart/lib/compiler/implementation/ssa/codegen.dart File dart/lib/compiler/implementation/ssa/codegen.dart (right): https://chromiumcodereview.appspot.com/10541173/diff/1/dart/lib/compiler/implementation/ssa/codegen.dart#newcode1576 dart/lib/compiler/implementation/ssa/codegen.dart:1576: generatingInlineStatement = false; On 2012/06/15 08:31:01, ...
8 years, 6 months ago (2012-06-18 15:43:25 UTC) #4
Lasse Reichstein Nielsen
8 years, 6 months ago (2012-06-19 09:10:44 UTC) #5
Post-commit-comments :)

https://chromiumcodereview.appspot.com/10541173/diff/5001/dart/lib/compiler/i...
File dart/lib/compiler/implementation/ssa/codegen.dart (right):

https://chromiumcodereview.appspot.com/10541173/diff/5001/dart/lib/compiler/i...
dart/lib/compiler/implementation/ssa/codegen.dart:188: * indentation (e.g. an
'if' in an 'else if').
Thanks for the explanation.
Nitpick: "," after "e.g." :)

https://chromiumcodereview.appspot.com/10541173/diff/5001/dart/lib/compiler/i...
dart/lib/compiler/implementation/ssa/codegen.dart:2070: if
(generatingInlineStatement) {
I understand the variable now.
Maybe it could be called "skipNextIndentation" instead. That's pretty clear and
this method would be even more readable.

Powered by Google App Engine
This is Rietveld 408576698