Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 929133b8fdbd44ae177081a908fd5bcb586792ba..98622186bd60e2e16639a6dd380a36f5b7613730 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -8772,7 +8772,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); |
} |
} |
@@ -8785,10 +8785,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. |
@@ -8799,8 +8799,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; |
} |
@@ -8862,7 +8862,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); |
@@ -8871,7 +8871,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); |
@@ -9369,7 +9369,7 @@ HControlInstruction* HOptimizedGraphBuilder::BuildCompareInstruction( |
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()); |
} |
Representation left_rep = Representation::FromType(left_type); |
@@ -9466,8 +9466,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()); |
@@ -10240,8 +10239,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); |
} |