| Index: src/hydrogen.cc
|
| diff --git a/src/hydrogen.cc b/src/hydrogen.cc
|
| index 358256cbf2f4fc2ddd6253a910d55013f0eb305b..3cd1036c0ebe4c96059ef8d9610db12b7442dbb9 100644
|
| --- a/src/hydrogen.cc
|
| +++ b/src/hydrogen.cc
|
| @@ -6190,6 +6190,9 @@ void HGraphBuilder::VisitSub(UnaryOperation* expr) {
|
| info = TypeInfo::Unknown();
|
| }
|
| Representation rep = ToRepresentation(info);
|
| + if (value->representation().IsDouble()) {
|
| + rep = Representation::Double();
|
| + }
|
| TraceRepresentation(expr->op(), info, instr, rep);
|
| instr->AssumeRepresentation(rep);
|
| return ast_context()->ReturnInstruction(instr, expr->id());
|
| @@ -6522,6 +6525,11 @@ HInstruction* HGraphBuilder::BuildBinaryOperation(BinaryOperation* expr,
|
| if (instr->IsBitwiseBinaryOperation() && rep.IsDouble()) {
|
| rep = Representation::Integer32();
|
| }
|
| + if (expr->op() == Token::MUL &&
|
| + (left->representation().IsDouble() ||
|
| + right->representation().IsDouble())) {
|
| + rep = Representation::Double();
|
| + }
|
| TraceRepresentation(expr->op(), info, instr, rep);
|
| instr->AssumeRepresentation(rep);
|
| return instr;
|
|
|