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

Side by Side Diff: runtime/vm/flow_graph_optimizer.cc

Issue 12334080: For Doubl erounding call C-function instead of attempting to inline it. Fixes issue 8760. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/assembler_x64_test.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/flow_graph_optimizer.h" 5 #include "vm/flow_graph_optimizer.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/cha.h" 8 #include "vm/cha.h"
9 #include "vm/flow_graph_builder.h" 9 #include "vm/flow_graph_builder.h"
10 #include "vm/flow_graph_compiler.h" 10 #include "vm/flow_graph_compiler.h"
(...skipping 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after
1580 d2i_instr = new DoubleToIntegerInstr(new Value(input), call); 1580 d2i_instr = new DoubleToIntegerInstr(new Value(input), call);
1581 } else { 1581 } else {
1582 // Optimistically assume result fits into Smi. 1582 // Optimistically assume result fits into Smi.
1583 d2i_instr = new DoubleToSmiInstr(new Value(input), call); 1583 d2i_instr = new DoubleToSmiInstr(new Value(input), call);
1584 } 1584 }
1585 ReplaceCall(call, d2i_instr); 1585 ReplaceCall(call, d2i_instr);
1586 return true; 1586 return true;
1587 } 1587 }
1588 case MethodRecognizer::kDoubleMod: 1588 case MethodRecognizer::kDoubleMod:
1589 case MethodRecognizer::kDoublePow: 1589 case MethodRecognizer::kDoublePow:
1590 case MethodRecognizer::kDoubleRound:
1590 ReplaceWithMathCFunction(call, recognized_kind); 1591 ReplaceWithMathCFunction(call, recognized_kind);
1591 return true; 1592 return true;
1592 case MethodRecognizer::kDoubleTruncate: 1593 case MethodRecognizer::kDoubleTruncate:
1593 case MethodRecognizer::kDoubleRound:
1594 case MethodRecognizer::kDoubleFloor: 1594 case MethodRecognizer::kDoubleFloor:
1595 case MethodRecognizer::kDoubleCeil: 1595 case MethodRecognizer::kDoubleCeil:
1596 if (!CPUFeatures::double_truncate_round_supported()) { 1596 if (!CPUFeatures::double_truncate_round_supported()) {
1597 ReplaceWithMathCFunction(call, recognized_kind); 1597 ReplaceWithMathCFunction(call, recognized_kind);
1598 } else { 1598 } else {
1599 AddReceiverCheck(call); 1599 AddReceiverCheck(call);
1600 DoubleToDoubleInstr* d2d_instr = 1600 DoubleToDoubleInstr* d2d_instr =
1601 new DoubleToDoubleInstr(new Value(call->ArgumentAt(0)), 1601 new DoubleToDoubleInstr(new Value(call->ArgumentAt(0)),
1602 call, 1602 call,
1603 recognized_kind); 1603 recognized_kind);
(...skipping 2773 matching lines...) Expand 10 before | Expand all | Expand 10 after
4377 4377
4378 if (FLAG_trace_constant_propagation) { 4378 if (FLAG_trace_constant_propagation) {
4379 OS::Print("\n==== After constant propagation ====\n"); 4379 OS::Print("\n==== After constant propagation ====\n");
4380 FlowGraphPrinter printer(*graph_); 4380 FlowGraphPrinter printer(*graph_);
4381 printer.PrintBlocks(); 4381 printer.PrintBlocks();
4382 } 4382 }
4383 } 4383 }
4384 4384
4385 4385
4386 } // namespace dart 4386 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64_test.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698