diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc index 4327c7e6a3a3..852aa16e3197 100644 --- a/src/compiler/code-generator.cc +++ b/src/compiler/code-generator.cc @@ -858,18 +858,12 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation, constant_object = handle(reinterpret_cast(constant.ToInt32()), isolate()); DCHECK(constant_object->IsSmi()); - } else if (type.representation() == MachineRepresentation::kBit) { - if (constant.ToInt32() == 0) { - constant_object = isolate()->factory()->false_value(); - } else { - DCHECK_EQ(1, constant.ToInt32()); - constant_object = isolate()->factory()->true_value(); - } } else { // TODO(jarin,bmeurer): We currently pass in raw pointers to the // JSFunction::entry here. We should really consider fixing this. DCHECK(type == MachineType::Int32() || type == MachineType::Uint32() || + type.representation() == MachineRepresentation::kBit || type.representation() == MachineRepresentation::kWord32 || type.representation() == MachineRepresentation::kNone); DCHECK(type.representation() != MachineRepresentation::kNone || diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc index a1cd46749617..a2b67db13bf0 100644 --- a/src/compiler/simplified-lowering.cc +++ b/src/compiler/simplified-lowering.cc @@ -1030,8 +1030,6 @@ class RepresentationSelector { MachineRepresentation::kWord32 || machine_type.semantic() == MachineSemantic::kInt32 || machine_type.semantic() == MachineSemantic::kUint32); - DCHECK(machine_type.representation() != MachineRepresentation::kBit || - input_type->Is(Type::Boolean())); (*types)[i] = machine_type; } } diff --git a/test/mjsunit/compiler/regress-664490.js b/test/mjsunit/compiler/regress-664490.js deleted file mode 100644 index 94094c736297..000000000000 --- a/test/mjsunit/compiler/regress-664490.js +++ /dev/null @@ -1,18 +0,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 - -var foo = function(msg) {}; - -foo = function (value) { - assertEquals(false, value); -} - -function f() { - foo(undefined == 0); -} - -%OptimizeFunctionOnNextCall(f); -f();