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

Issue 10544024: Implement constant switch as JS switch. (Closed)

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

Description

Implement constant switch as JS switch. This introduces a block-structure for constant switches. Non-constant switches still use the old if-else-if implementation. Committed: https://code.google.com/p/dart/source/detail?r=8331

Patch Set 1 #

Total comments: 22

Patch Set 2 : Addressed review comments. Added to Tracer. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+261 lines, -12 lines) Patch
M lib/compiler/implementation/ssa/builder.dart View 1 3 chunks +136 lines, -3 lines 0 comments Download
M lib/compiler/implementation/ssa/codegen.dart View 1 3 chunks +55 lines, -7 lines 0 comments Download
M lib/compiler/implementation/ssa/nodes.dart View 1 6 chunks +54 lines, -1 line 0 comments Download
M lib/compiler/implementation/ssa/tracer.dart View 1 1 chunk +16 lines, -0 lines 0 comments Download
M tests/language/language_dart2js.status View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
Lasse Reichstein Nielsen
https://chromiumcodereview.appspot.com/10544024/diff/1/tests/language/language_dart2js.status File tests/language/language_dart2js.status (left): https://chromiumcodereview.appspot.com/10544024/diff/1/tests/language/language_dart2js.status#oldcode66 tests/language/language_dart2js.status:66: label_test: Fail # switch cases are not implemented They ...
8 years, 6 months ago (2012-06-06 08:50:45 UTC) #1
Lasse Reichstein Nielsen
https://chromiumcodereview.appspot.com/10544024/diff/1/lib/compiler/implementation/ssa/builder.dart File lib/compiler/implementation/ssa/builder.dart (right): https://chromiumcodereview.appspot.com/10544024/diff/1/lib/compiler/implementation/ssa/builder.dart#newcode3013 lib/compiler/implementation/ssa/builder.dart:3013: // TODO(ngeoffray): Handle switch-instruction in bailout code. I hope ...
8 years, 6 months ago (2012-06-06 09:29:31 UTC) #2
floitsch
LGTM. https://chromiumcodereview.appspot.com/10544024/diff/1/lib/compiler/implementation/ssa/builder.dart File lib/compiler/implementation/ssa/builder.dart (right): https://chromiumcodereview.appspot.com/10544024/diff/1/lib/compiler/implementation/ssa/builder.dart#newcode3032 lib/compiler/implementation/ssa/builder.dart:3032: for (Iterator<Node> iterator = node.cases.iterator(); iterator.hasNext();) { I ...
8 years, 6 months ago (2012-06-06 11:50:26 UTC) #3
ngeoffray
LGTM https://chromiumcodereview.appspot.com/10544024/diff/1/lib/compiler/implementation/ssa/builder.dart File lib/compiler/implementation/ssa/builder.dart (right): https://chromiumcodereview.appspot.com/10544024/diff/1/lib/compiler/implementation/ssa/builder.dart#newcode3058 lib/compiler/implementation/ssa/builder.dart:3058: compiler.reportWarning(node, 'Missing break at end of switch case'); ...
8 years, 6 months ago (2012-06-06 12:03:46 UTC) #4
Lasse Reichstein Nielsen
https://chromiumcodereview.appspot.com/10544024/diff/1/lib/compiler/implementation/ssa/builder.dart File lib/compiler/implementation/ssa/builder.dart (right): https://chromiumcodereview.appspot.com/10544024/diff/1/lib/compiler/implementation/ssa/builder.dart#newcode3032 lib/compiler/implementation/ssa/builder.dart:3032: for (Iterator<Node> iterator = node.cases.iterator(); iterator.hasNext();) { On 2012/06/06 ...
8 years, 6 months ago (2012-06-06 13:01:21 UTC) #5
floitsch
https://chromiumcodereview.appspot.com/10544024/diff/1/lib/compiler/implementation/ssa/builder.dart File lib/compiler/implementation/ssa/builder.dart (right): https://chromiumcodereview.appspot.com/10544024/diff/1/lib/compiler/implementation/ssa/builder.dart#newcode3037 lib/compiler/implementation/ssa/builder.dart:3037: if (labelOrCase is CaseMatch) { On 2012/06/06 13:01:21, Lasse ...
8 years, 6 months ago (2012-06-06 14:32:00 UTC) #6
Lasse Reichstein Nielsen
8 years, 6 months ago (2012-06-07 12:03:05 UTC) #7
http://codereview.chromium.org/10544024/diff/1/lib/compiler/implementation/ss...
File lib/compiler/implementation/ssa/builder.dart (right):

http://codereview.chromium.org/10544024/diff/1/lib/compiler/implementation/ss...
lib/compiler/implementation/ssa/builder.dart:3037: if (labelOrCase is CaseMatch)
{
True, there is. Let's not make the assumption in more than one place.

Powered by Google App Engine
This is Rietveld 408576698