Commit 432790c9 authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Only check semantic axis for Type::None.

R=jarin@chromium.org
BUG=chromium:643073

Review-Url: https://codereview.chromium.org/2299903002
Cr-Commit-Position: refs/heads/master@{#39065}
parent b8dec98d
......@@ -210,7 +210,7 @@ Node* RepresentationChanger::GetTaggedSignedRepresentationFor(
}
// Select the correct X -> Tagged operator.
const Operator* op;
if (output_type->Is(Type::None())) {
if (Type::Semantic(output_type, jsgraph()->zone())->Is(Type::None())) {
// This is an impossible value; it should not be used at runtime.
// We just provide a dummy value here.
return jsgraph()->Constant(0);
......@@ -252,7 +252,7 @@ Node* RepresentationChanger::GetTaggedPointerRepresentationFor(
break;
}
// Select the correct X -> Tagged operator.
if (output_type->Is(Type::None())) {
if (Type::Semantic(output_type, jsgraph()->zone())->Is(Type::None())) {
// This is an impossible value; it should not be used at runtime.
// We just provide a dummy value here.
return jsgraph()->TheHoleConstant();
......@@ -296,7 +296,7 @@ Node* RepresentationChanger::GetTaggedRepresentationFor(
}
// Select the correct X -> Tagged operator.
const Operator* op;
if (output_type->Is(Type::None())) {
if (Type::Semantic(output_type, jsgraph()->zone())->Is(Type::None())) {
// This is an impossible value; it should not be used at runtime.
// We just provide a dummy value here.
return jsgraph()->TheHoleConstant();
......@@ -375,7 +375,7 @@ Node* RepresentationChanger::GetFloat32RepresentationFor(
}
// Select the correct X -> Float32 operator.
const Operator* op = nullptr;
if (output_type->Is(Type::None())) {
if (Type::Semantic(output_type, jsgraph()->zone())->Is(Type::None())) {
// This is an impossible value; it should not be used at runtime.
// We just provide a dummy value here.
return jsgraph()->Float32Constant(0.0f);
......@@ -445,7 +445,7 @@ Node* RepresentationChanger::GetFloat64RepresentationFor(
}
// Select the correct X -> Float64 operator.
const Operator* op = nullptr;
if (output_type->Is(Type::None())) {
if (Type::Semantic(output_type, jsgraph()->zone())->Is(Type::None())) {
// This is an impossible value; it should not be used at runtime.
// We just provide a dummy value here.
return jsgraph()->Float64Constant(0.0);
......@@ -530,7 +530,7 @@ Node* RepresentationChanger::GetWord32RepresentationFor(
// Select the correct X -> Word32 operator.
const Operator* op = nullptr;
if (output_type->Is(Type::None())) {
if (Type::Semantic(output_type, jsgraph()->zone())->Is(Type::None())) {
// This is an impossible value; it should not be used at runtime.
// We just provide a dummy value here.
return jsgraph()->Int32Constant(0);
......@@ -655,7 +655,7 @@ Node* RepresentationChanger::GetBitRepresentationFor(
}
// Select the correct X -> Bit operator.
const Operator* op;
if (output_type->Is(Type::None())) {
if (Type::Semantic(output_type, jsgraph()->zone())->Is(Type::None())) {
// This is an impossible value; it should not be used at runtime.
// We just provide a dummy value here.
return jsgraph()->Int32Constant(0);
......@@ -672,7 +672,7 @@ Node* RepresentationChanger::GetBitRepresentationFor(
Node* RepresentationChanger::GetWord64RepresentationFor(
Node* node, MachineRepresentation output_rep, Type* output_type) {
if (output_type->Is(Type::None())) {
if (Type::Semantic(output_type, jsgraph()->zone())->Is(Type::None())) {
// This is an impossible value; it should not be used at runtime.
// We just provide a dummy value here.
return jsgraph()->Int64Constant(0);
......
// Copyright 2016 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
for (i in [0,0]) {}
function foo() {
i = 0;
return i < 0;
}
%OptimizeFunctionOnNextCall(foo);
foo();
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