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

Issue 10100001: Refactoring if block-information. (Closed)

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

Description

Refactoring if block-information. Generalizes block information handling and adds (yet unused) info blocks for if and logical-and/or. Committed: https://code.google.com/p/dart/source/detail?r=6630

Patch Set 1 #

Total comments: 18

Patch Set 2 : merge to tip of tree #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+335 lines, -282 lines) Patch
M lib/compiler/implementation/native_handler.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M lib/compiler/implementation/ssa/builder.dart View 1 2 22 chunks +66 lines, -55 lines 0 comments Download
M lib/compiler/implementation/ssa/codegen.dart View 1 2 11 chunks +126 lines, -118 lines 0 comments Download
M lib/compiler/implementation/ssa/nodes.dart View 1 2 9 chunks +137 lines, -107 lines 0 comments Download
M lib/compiler/implementation/ssa/optimize.dart View 1 1 chunk +2 lines, -1 line 0 comments Download
M tests/utils/utils.status View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Lasse Reichstein Nielsen
8 years, 8 months ago (2012-04-16 11:46:58 UTC) #1
floitsch
LGTM. https://chromiumcodereview.appspot.com/10100001/diff/1/lib/compiler/implementation/ssa/codegen.dart File lib/compiler/implementation/ssa/codegen.dart (right): https://chromiumcodereview.appspot.com/10100001/diff/1/lib/compiler/implementation/ssa/codegen.dart#newcode417 lib/compiler/implementation/ssa/codegen.dart:417: if (isCondition(condition)) { I would prefer bailing out ...
8 years, 8 months ago (2012-04-16 13:26:07 UTC) #2
ngeoffray
DBC https://chromiumcodereview.appspot.com/10100001/diff/1/lib/compiler/implementation/ssa/builder.dart File lib/compiler/implementation/ssa/builder.dart (right): https://chromiumcodereview.appspot.com/10100001/diff/1/lib/compiler/implementation/ssa/builder.dart#newcode1376 lib/compiler/implementation/ssa/builder.dart:1376: visitIf(If node) { You can remove the five ...
8 years, 8 months ago (2012-04-17 07:44:20 UTC) #3
Lasse Reichstein Nielsen
8 years, 8 months ago (2012-04-17 12:58:22 UTC) #4
https://chromiumcodereview.appspot.com/10100001/diff/1/lib/compiler/implement...
File lib/compiler/implementation/ssa/builder.dart (right):

https://chromiumcodereview.appspot.com/10100001/diff/1/lib/compiler/implement...
lib/compiler/implementation/ssa/builder.dart:1376: visitIf(If node) {
Well spotted.

https://chromiumcodereview.appspot.com/10100001/diff/1/lib/compiler/implement...
lib/compiler/implementation/ssa/builder.dart:2726: // Don't actually bother
testing the expressions.
Reworded.

https://chromiumcodereview.appspot.com/10100001/diff/1/lib/compiler/implement...
File lib/compiler/implementation/ssa/codegen.dart (right):

https://chromiumcodereview.appspot.com/10100001/diff/1/lib/compiler/implement...
lib/compiler/implementation/ssa/codegen.dart:417: if (isCondition(condition)) {
On 2012/04/16 13:26:07, floitsch wrote:
> I would prefer bailing out here.
> 
> if (!isCondition(condition)) return false;
> if (info.type == HLoopInformation.DO_WHILE_LOOP) return false;

Done.

https://chromiumcodereview.appspot.com/10100001/diff/1/lib/compiler/implement...
lib/compiler/implementation/ssa/codegen.dart:418: switch (info.type) {
On 2012/04/16 13:26:07, floitsch wrote:
> I would prefer 'kind' instead of 'type'.

Done.

https://chromiumcodereview.appspot.com/10100001/diff/1/lib/compiler/implement...
lib/compiler/implementation/ssa/codegen.dart:420: case
HLoopInformation.FOR_IN_LOOP: {
It can have an update block that isn't just phis.
And an initialization part, that I want to put in the for-structure eventually.
But true, the difference isn't big.

https://chromiumcodereview.appspot.com/10100001/diff/1/lib/compiler/implement...
lib/compiler/implementation/ssa/codegen.dart:492: // Currently unhandled.
It's an empty case, so it's joined with the following default.
Comments are not significant.

https://chromiumcodereview.appspot.com/10100001/diff/1/lib/compiler/implement...
lib/compiler/implementation/ssa/codegen.dart:493: default:
Probably, yes. I'll make it an internal error, and just return false from
do-while.

https://chromiumcodereview.appspot.com/10100001/diff/1/lib/compiler/implement...
lib/compiler/implementation/ssa/codegen.dart:496: if (success) {
I'll keep it here, but without the if (I'll return false immediately when I bail
out).

https://chromiumcodereview.appspot.com/10100001/diff/1/lib/compiler/implement...
lib/compiler/implementation/ssa/codegen.dart:626: // Even if our special
handling didn't succeed, loop blocks
On 2012/04/16 13:26:07, floitsch wrote:
> If our special handling didn't succeed, we have to emit a generic version.
There
> is hence still special handling for loop-blocks.

Done.

Powered by Google App Engine
This is Rietveld 408576698