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

Unified Diff: src/hydrogen.cc

Issue 132493002: [Sheriff] Revert "Templatise type representation" and "Fix Mac warnings". (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/ic.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 98622186bd60e2e16639a6dd380a36f5b7613730..929133b8fdbd44ae177081a908fd5bcb586792ba 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 = Type::Number(isolate());
+ *expected = handle(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 = Type::Intersect(
- expected_type, Type::NonNumber(isolate()), isolate());
- Handle<Type> expected_number = Type::Intersect(
- expected_type, Type::Number(isolate()), isolate());
+ 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());
// 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 = Type::Union(
- expected_number, Type::Double(isolate()), isolate());
+ *expected = handle(Type::Union(
+ expected_number, handle(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 = Type::Any(isolate());
+ left_type = handle(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 = Type::Any(isolate());
+ right_type = handle(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 = Type::Any(isolate());
+ combined_type = left_type = right_type = handle(Type::Any(), isolate());
}
Representation left_rep = Representation::FromType(left_type);
@@ -9466,7 +9466,8 @@ void HOptimizedGraphBuilder::HandleLiteralCompareNil(CompareOperation* expr,
} else {
ASSERT_EQ(Token::EQ, expr->op());
Handle<Type> type = expr->combined_type()->Is(Type::None())
- ? Type::Any(isolate_) : expr->combined_type();
+ ? handle(Type::Any(), isolate_)
+ : expr->combined_type();
HIfContinuation continuation;
BuildCompareNil(value, type, &continuation);
return ast_context()->ReturnContinuation(&continuation, expr->id());
@@ -10239,7 +10240,8 @@ 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, Type::Number(isolate()));
+ HValue* result = BuildNumberToString(
+ number, handle(Type::Number(), isolate()));
return ast_context()->ReturnValue(result);
}
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698