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

Issue 11568044: Add DoubleToSmi optimistically, preventing boxing/unboxing of doubles and propagate smi-nessof the … (Closed)

Created:
8 years ago by srdjan
Modified:
8 years ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Add DoubleToSmi optimistically, preventing boxing/unboxing of doubles and propagate smi-nessof the result. Committed: https://code.google.com/p/dart/source/detail?r=16272

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 17

Patch Set 4 : #

Patch Set 5 : #

Total comments: 2

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+150 lines, -6 lines) Patch
M runtime/vm/code_generator.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 2 3 4 5 2 chunks +17 lines, -3 lines 0 comments Download
M runtime/vm/intermediate_language.h View 1 2 3 4 5 4 chunks +36 lines, -1 line 0 comments Download
M runtime/vm/intermediate_language.cc View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language_ia32.cc View 1 2 3 4 5 1 chunk +25 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language_x64.cc View 1 2 3 4 5 1 chunk +29 lines, -0 lines 0 comments Download
M runtime/vm/intrinsifier_x64.cc View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
A tests/standalone/double_to_int_test.dart View 1 2 3 4 1 chunk +34 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
srdjan
8 years ago (2012-12-14 22:08:43 UTC) #1
Vyacheslav Egorov (Google)
LGTM please ensure good test coverage. https://codereview.chromium.org/11568044/diff/6008/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/11568044/diff/6008/runtime/vm/flow_graph_optimizer.cc#newcode1211 runtime/vm/flow_graph_optimizer.cc:1211: d2i_instr = new ...
8 years ago (2012-12-17 12:53:44 UTC) #2
srdjan
Added test https://codereview.chromium.org/11568044/diff/6008/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/11568044/diff/6008/runtime/vm/flow_graph_optimizer.cc#newcode1211 runtime/vm/flow_graph_optimizer.cc:1211: d2i_instr = new DoubleToIntegerInstr(call->ArgumentAt(0)->value(), call); On 2012/12/17 ...
8 years ago (2012-12-18 00:12:47 UTC) #3
Vyacheslav Egorov (Google)
still LGTM. thanks for adding the test. https://codereview.chromium.org/11568044/diff/6008/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/11568044/diff/6008/runtime/vm/flow_graph_optimizer.cc#newcode4060 runtime/vm/flow_graph_optimizer.cc:4060: SetValue(instr, non_constant_); ...
8 years ago (2012-12-18 11:45:10 UTC) #4
srdjan
8 years ago (2012-12-18 16:29:47 UTC) #5
Thanks!

https://codereview.chromium.org/11568044/diff/6008/runtime/vm/intermediate_la...
File runtime/vm/intermediate_language.h (right):

https://codereview.chromium.org/11568044/diff/6008/runtime/vm/intermediate_la...
runtime/vm/intermediate_language.h:4023: virtual intptr_t ArgumentCount() const
{ return 1; }
On 2012/12/18 11:45:10, Vyacheslav Egorov (Google) wrote:
> On 2012/12/18 00:12:47, srdjan wrote:
> > On 2012/12/17 12:53:44, Vyacheslav Egorov (Google) wrote:
> > > I think this should be zero because this instruction does not contain a
call
> > > inside and pushargument is dropped in optimizer.
> > 
> > Done.
> 
> Actually Definition has a default implementation that returns 0 so you can
just
> remove it.

Done, thanks.

https://codereview.chromium.org/11568044/diff/19002/runtime/vm/intrinsifier_x...
File runtime/vm/intrinsifier_x64.cc (right):

https://codereview.chromium.org/11568044/diff/19002/runtime/vm/intrinsifier_x...
runtime/vm/intrinsifier_x64.cc:1395: __ movq(TMP, RAX);
On 2012/12/18 11:45:10, Vyacheslav Egorov (Google) wrote:
> I thought only Assembler could use TMP?

You are correct. Switched to using RCX instead.

Powered by Google App Engine
This is Rietveld 408576698