Skip to content
This repository has been archived by the owner on Mar 25, 2018. It is now read-only.

Commit

Permalink
Revert of [turbofan] Fix deoptimization of boolean bit constants. (pa…
Browse files Browse the repository at this point in the history
…tchset #1 id:1 of https://codereview.chromium.org/2495243002/ )

Reason for revert:
Seems to break GC stress.

Original issue's description:
> [turbofan] Fix deoptimization of boolean bit constants.
>
> BUG=chromium:664490

TBR=bmeurer@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:664490

Review-Url: https://codereview.chromium.org/2502613002
Cr-Commit-Position: refs/heads/master@{#40961}
  • Loading branch information
jaro-sevcik authored and Commit bot committed Nov 14, 2016
1 parent 5667280 commit 1c9528c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 27 deletions.
8 changes: 1 addition & 7 deletions src/compiler/code-generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -858,18 +858,12 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation,
constant_object =
handle(reinterpret_cast<Smi*>(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 ||
Expand Down
2 changes: 0 additions & 2 deletions src/compiler/simplified-lowering.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
18 changes: 0 additions & 18 deletions test/mjsunit/compiler/regress-664490.js

This file was deleted.

0 comments on commit 1c9528c

Please sign in to comment.