| Index: src/compiler/representation-change.cc
|
| diff --git a/src/compiler/representation-change.cc b/src/compiler/representation-change.cc
|
| index 0c19a12f1b854ec6844f69d2f0b9892c0cb1db24..5e900ed4ea76ccc7affa7c77bb9b134a45b3d14c 100644
|
| --- a/src/compiler/representation-change.cc
|
| +++ b/src/compiler/representation-change.cc
|
| @@ -542,78 +542,6 @@ Node* RepresentationChanger::GetWord64RepresentationFor(
|
| MachineRepresentation::kWord64);
|
| }
|
|
|
| -Node* RepresentationChanger::GetCheckedWord32RepresentationFor(
|
| - Node* node, MachineRepresentation output_rep, Type* output_type,
|
| - Node* use_node, Truncation truncation, TypeCheckKind check) {
|
| - // TODO(jarin) Eagerly fold constants (or insert hard deopt if the constant
|
| - // does not pass the check).
|
| -
|
| - // If the input is already Signed32 in Word32 representation, we do not
|
| - // have to do anything. (We could fold this into the big if below, but
|
| - // it feels nicer to have the shortcut return first).
|
| - if (output_rep == MachineRepresentation::kWord32 ||
|
| - output_type->Is(Type::Signed32())) {
|
| - return node;
|
| - }
|
| -
|
| - // Select the correct X -> Word32 operator.
|
| - const Operator* op = nullptr;
|
| - if (output_rep == MachineRepresentation::kNone) {
|
| - // We should only use kNone representation if the type is empty.
|
| - CHECK(!output_type->IsInhabited());
|
| - op = machine()->ImpossibleToWord32();
|
| - } else if (output_rep == MachineRepresentation::kWord32) {
|
| - if (output_type->Is(Type::Unsigned32())) {
|
| - op = simplified()->CheckedUint32ToInt32();
|
| - }
|
| - } else if (output_rep == MachineRepresentation::kBit) {
|
| - return node; // Sloppy comparison -> word32
|
| - } else if (output_rep == MachineRepresentation::kFloat64) {
|
| - if (output_type->Is(Type::Unsigned32())) {
|
| - op = machine()->ChangeFloat64ToUint32();
|
| - } else if (output_type->Is(Type::Signed32())) {
|
| - op = machine()->ChangeFloat64ToInt32();
|
| - } else if (truncation.IsUsedAsWord32()) {
|
| - op = machine()->TruncateFloat64ToWord32();
|
| - } else if (check == TypeCheckKind::kSigned32) {
|
| - op = simplified()->CheckedFloat64ToInt32();
|
| - }
|
| - } else if (output_rep == MachineRepresentation::kFloat32) {
|
| - node = InsertChangeFloat32ToFloat64(node); // float32 -> float64 -> int32
|
| - if (output_type->Is(Type::Unsigned32())) {
|
| - op = machine()->ChangeFloat64ToUint32();
|
| - } else if (output_type->Is(Type::Signed32())) {
|
| - op = machine()->ChangeFloat64ToInt32();
|
| - } else if (truncation.IsUsedAsWord32()) {
|
| - op = machine()->TruncateFloat64ToWord32();
|
| - } else if (check == TypeCheckKind::kSigned32) {
|
| - op = simplified()->CheckedFloat64ToInt32();
|
| - }
|
| - } else if (output_rep == MachineRepresentation::kTagged) {
|
| - if (output_type->Is(Type::TaggedSigned())) {
|
| - op = simplified()->ChangeTaggedSignedToInt32();
|
| - } else if (output_type->Is(Type::Unsigned32())) {
|
| - op = simplified()->ChangeTaggedToUint32();
|
| - } else if (output_type->Is(Type::Signed32())) {
|
| - op = simplified()->ChangeTaggedToInt32();
|
| - } else if (truncation.IsUsedAsWord32()) {
|
| - op = simplified()->TruncateTaggedToWord32();
|
| - } else if (check == TypeCheckKind::kSigned32) {
|
| - op = simplified()->CheckedTaggedToInt32();
|
| - }
|
| - }
|
| - if (op == nullptr) {
|
| - return TypeError(node, output_rep, output_type,
|
| - MachineRepresentation::kWord32);
|
| - }
|
| - if (op->ControlInputCount() > 0) {
|
| - // If the operator can deoptimize (which means it has control
|
| - // input), we need to connect it to the effect and control chains.
|
| - UNIMPLEMENTED();
|
| - }
|
| - return jsgraph()->graph()->NewNode(op, node);
|
| -}
|
| -
|
| const Operator* RepresentationChanger::Int32OperatorFor(
|
| IrOpcode::Value opcode) {
|
| switch (opcode) {
|
|
|