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

Issue 22991007: Cleanup conversion insertion in unboxed -> unboxed case. (Closed)

Created:
7 years, 4 months ago by Cutch
Modified:
7 years, 4 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Cleanup conversion insertion in unboxed -> unboxed case. R=srdjan@google.com Committed: https://code.google.com/p/dart/source/detail?r=26281

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -8 lines) Patch
M runtime/vm/flow_graph_optimizer.cc View 1 chunk +37 lines, -8 lines 1 comment Download

Messages

Total messages: 4 (0 generated)
Cutch
Cleaning up https://codereview.chromium.org/22859007/
7 years, 4 months ago (2013-08-16 16:06:24 UTC) #1
srdjan
lgtm
7 years, 4 months ago (2013-08-16 16:20:31 UTC) #2
Cutch
Committed patchset #1 manually as r26281 (presubmit successful).
7 years, 4 months ago (2013-08-16 16:53:36 UTC) #3
Florian Schneider
7 years, 4 months ago (2013-08-21 08:38:51 UTC) #4
Message was sent while issue was closed.
LGTM. Thanks for fixing this.

https://codereview.chromium.org/22991007/diff/1/runtime/vm/flow_graph_optimiz...
File runtime/vm/flow_graph_optimizer.cc (right):

https://codereview.chromium.org/22991007/diff/1/runtime/vm/flow_graph_optimiz...
runtime/vm/flow_graph_optimizer.cc:428: BoxIntegerInstr* boxed = new
BoxIntegerInstr(use->CopyWithType());
You could share the three lines below instead of duplicating them in all if-else
statements:

if (from == kUnboxedDouble) {
  boxed = new BoxDoubleInstr(use->CopyWithType());
} else if (from == kUnboxedUint32x4) {
  boxed = new BoxUint32x4Instr(use->CopyWithType());
} else if (...) {

} else if (...) {

} else {
  UNREACHABLE();
}
use->BindTo(boxed);
InsertBefore(insert_before, boxed, NULL, Definition::kValue);
to_value = new Value(boxed)

if (to == kUnboxedDouble) {

// ...

Powered by Google App Engine
This is Rietveld 408576698