| Index: runtime/vm/flow_graph_builder.cc
|
| ===================================================================
|
| --- runtime/vm/flow_graph_builder.cc (revision 35714)
|
| +++ runtime/vm/flow_graph_builder.cc (working copy)
|
| @@ -40,7 +40,6 @@
|
| DECLARE_FLAG(bool, enable_type_checks);
|
|
|
|
|
| -
|
| // TODO(srdjan): Allow compiler to add constants as they are encountered in
|
| // the compilation.
|
| const double kCommonDoubleConstants[] =
|
| @@ -54,11 +53,7 @@
|
| uword FlowGraphBuilder::FindDoubleConstant(double value) {
|
| intptr_t len = sizeof(kCommonDoubleConstants) / sizeof(double); // NOLINT
|
| for (intptr_t i = 0; i < len; i++) {
|
| - // Bitwise compare.
|
| - const int64_t* a = reinterpret_cast<const int64_t*>(&value);
|
| - const int64_t* b =
|
| - reinterpret_cast<const int64_t*>(&kCommonDoubleConstants[i]);
|
| - if (*a == *b) {
|
| + if (Utils::DoublesBitEqual(value, kCommonDoubleConstants[i])) {
|
| return reinterpret_cast<uword>(&kCommonDoubleConstants[i]);
|
| }
|
| }
|
|
|