Commit fc71f7fd authored by rossberg@chromium.org's avatar rossberg@chromium.org

Fix inaccurate type condition in Hydrogen

R=bmeurer@chromium.org
BUG=chromium:412210
LOG=Y

Review URL: https://codereview.chromium.org/550453003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 4a5001dd
......@@ -10253,7 +10253,7 @@ HValue* HGraphBuilder::BuildBinaryOperation(
right_type->Maybe(Type::String()) ||
right_type->Maybe(Type::Receiver()));
if (left_type->Is(Type::None())) {
if (!left_type->IsInhabited()) {
Add<HDeoptimize>("Insufficient type feedback for LHS of binary operation",
Deoptimizer::SOFT);
// TODO(rossberg): we should be able to get rid of non-continuous
......@@ -10264,7 +10264,7 @@ HValue* HGraphBuilder::BuildBinaryOperation(
left_rep = Representation::FromType(left_type);
}
if (right_type->Is(Type::None())) {
if (!right_type->IsInhabited()) {
Add<HDeoptimize>("Insufficient type feedback for RHS of binary operation",
Deoptimizer::SOFT);
right_type = Type::Any(zone());
......@@ -10761,7 +10761,7 @@ HControlInstruction* HOptimizedGraphBuilder::BuildCompareInstruction(
BailoutId bailout_id) {
// Cases handled below depend on collected type feedback. They should
// soft deoptimize when there is no type feedback.
if (combined_type->Is(Type::None())) {
if (!combined_type->IsInhabited()) {
Add<HDeoptimize>("Insufficient type feedback for combined type "
"of binary operation",
Deoptimizer::SOFT);
......
// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
function f(x) {
return (x ? "" >> 0 : "") + /a/;
};
%OptimizeFunctionOnNextCall(f);
f();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment