Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 8dbecac1191d49440fd755860a559cd71b75e2a5..26bb191a9be556e0340feaff02f1383e1495da26 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -8692,7 +8692,7 @@ HValue* HGraphBuilder::TruncateToNumber(HValue* value, Handle<Type>* expected) { |
HConstant* constant = HConstant::cast(value); |
Maybe<HConstant*> number = constant->CopyToTruncatedNumber(zone()); |
if (number.has_value) { |
- *expected = handle(Type::Number(), isolate()); |
+ *expected = Type::Number(isolate()); |
return AddInstruction(number.value); |
} |
} |
@@ -8705,10 +8705,10 @@ HValue* HGraphBuilder::TruncateToNumber(HValue* value, Handle<Type>* expected) { |
Handle<Type> expected_type = *expected; |
// Separate the number type from the rest. |
- Handle<Type> expected_obj = handle(Type::Intersect( |
- expected_type, handle(Type::NonNumber(), isolate())), isolate()); |
- Handle<Type> expected_number = handle(Type::Intersect( |
- expected_type, handle(Type::Number(), isolate())), isolate()); |
+ Handle<Type> expected_obj = Type::Intersect( |
+ expected_type, Type::NonNumber(isolate()), isolate()); |
+ Handle<Type> expected_number = Type::Intersect( |
+ expected_type, Type::Number(isolate()), isolate()); |
// We expect to get a number. |
// (We need to check first, since Type::None->Is(Type::Any()) == true. |
@@ -8719,8 +8719,8 @@ HValue* HGraphBuilder::TruncateToNumber(HValue* value, Handle<Type>* expected) { |
if (expected_obj->Is(Type::Undefined())) { |
// This is already done by HChange. |
- *expected = handle(Type::Union( |
- expected_number, handle(Type::Double(), isolate())), isolate()); |
+ *expected = Type::Union( |
+ expected_number, Type::Double(isolate()), isolate()); |
return value; |
} |
@@ -8773,7 +8773,7 @@ HValue* HGraphBuilder::BuildBinaryOperation( |
Deoptimizer::SOFT); |
// TODO(rossberg): we should be able to get rid of non-continuous |
// defaults. |
- left_type = handle(Type::Any(), isolate()); |
+ left_type = Type::Any(isolate()); |
} else { |
if (!maybe_string_add) left = TruncateToNumber(left, &left_type); |
left_rep = Representation::FromType(left_type); |
@@ -8782,7 +8782,7 @@ HValue* HGraphBuilder::BuildBinaryOperation( |
if (right_type->Is(Type::None())) { |
Add<HDeoptimize>("Insufficient type feedback for RHS of binary operation", |
Deoptimizer::SOFT); |
- right_type = handle(Type::Any(), isolate()); |
+ right_type = Type::Any(isolate()); |
} else { |
if (!maybe_string_add) right = TruncateToNumber(right, &right_type); |
right_rep = Representation::FromType(right_type); |
@@ -9224,7 +9224,7 @@ void HOptimizedGraphBuilder::VisitCompareOperation(CompareOperation* expr) { |
Add<HDeoptimize>("Insufficient type feedback for combined type " |
"of binary operation", |
Deoptimizer::SOFT); |
- combined_type = left_type = right_type = handle(Type::Any(), isolate()); |
+ combined_type = left_type = right_type = Type::Any(isolate()); |
} |
if (combined_type->Is(Type::Receiver())) { |
@@ -9314,8 +9314,7 @@ void HOptimizedGraphBuilder::HandleLiteralCompareNil(CompareOperation* expr, |
} else { |
ASSERT_EQ(Token::EQ, expr->op()); |
Handle<Type> type = expr->combined_type()->Is(Type::None()) |
- ? handle(Type::Any(), isolate_) |
- : expr->combined_type(); |
+ ? Type::Any(isolate_) : expr->combined_type(); |
HIfContinuation continuation; |
BuildCompareNil(value, type, &continuation); |
return ast_context()->ReturnContinuation(&continuation, expr->id()); |
@@ -10085,8 +10084,7 @@ void HOptimizedGraphBuilder::GenerateNumberToString(CallRuntime* call) { |
ASSERT_EQ(1, call->arguments()->length()); |
CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
HValue* number = Pop(); |
- HValue* result = BuildNumberToString( |
- number, handle(Type::Number(), isolate())); |
+ HValue* result = BuildNumberToString(number, Type::Number(isolate())); |
return ast_context()->ReturnValue(result); |
} |