| Index: src/compiler/js-typed-lowering.cc
|
| diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc
|
| index 34deb8e03cdcbb9cc1d86fa4c3355bf605346d1e..2b49cddd8120f676ce69058de1ca9b272f68c585 100644
|
| --- a/src/compiler/js-typed-lowering.cc
|
| +++ b/src/compiler/js-typed-lowering.cc
|
| @@ -842,63 +842,7 @@ Reduction JSTypedLowering::ReduceJSTypeOf(Node* node) {
|
| return NoChange();
|
| }
|
|
|
| -Reduction JSTypedLowering::ReduceJSEqualTypeOf(Node* node) {
|
| - Node* input;
|
| - Handle<String> type;
|
| - HeapObjectBinopMatcher m(node);
|
| - if (m.left().IsJSTypeOf() && m.right().HasValue() &&
|
| - m.right().Value()->IsString()) {
|
| - input = m.left().InputAt(0);
|
| - type = Handle<String>::cast(m.right().Value());
|
| - } else if (m.right().IsJSTypeOf() && m.left().HasValue() &&
|
| - m.left().Value()->IsString()) {
|
| - input = m.right().InputAt(0);
|
| - type = Handle<String>::cast(m.left().Value());
|
| - } else {
|
| - return NoChange();
|
| - }
|
| - Node* value;
|
| - if (String::Equals(type, factory()->boolean_string())) {
|
| - value =
|
| - graph()->NewNode(common()->Select(MachineRepresentation::kTagged),
|
| - graph()->NewNode(simplified()->ReferenceEqual(), input,
|
| - jsgraph()->TrueConstant()),
|
| - jsgraph()->TrueConstant(),
|
| - graph()->NewNode(simplified()->ReferenceEqual(), input,
|
| - jsgraph()->FalseConstant()));
|
| - } else if (String::Equals(type, factory()->function_string())) {
|
| - value = graph()->NewNode(simplified()->ObjectIsDetectableCallable(), input);
|
| - } else if (String::Equals(type, factory()->number_string())) {
|
| - value = graph()->NewNode(simplified()->ObjectIsNumber(), input);
|
| - } else if (String::Equals(type, factory()->object_string())) {
|
| - value = graph()->NewNode(
|
| - common()->Select(MachineRepresentation::kTagged),
|
| - graph()->NewNode(simplified()->ObjectIsNonCallable(), input),
|
| - jsgraph()->TrueConstant(),
|
| - graph()->NewNode(simplified()->ReferenceEqual(), input,
|
| - jsgraph()->NullConstant()));
|
| - } else if (String::Equals(type, factory()->string_string())) {
|
| - value = graph()->NewNode(simplified()->ObjectIsString(), input);
|
| - } else if (String::Equals(type, factory()->symbol_string())) {
|
| - value = graph()->NewNode(simplified()->ObjectIsSymbol(), input);
|
| - } else if (String::Equals(type, factory()->undefined_string())) {
|
| - value = graph()->NewNode(
|
| - common()->Select(MachineRepresentation::kTagged),
|
| - graph()->NewNode(simplified()->ReferenceEqual(), input,
|
| - jsgraph()->NullConstant()),
|
| - jsgraph()->FalseConstant(),
|
| - graph()->NewNode(simplified()->ObjectIsUndetectable(), input));
|
| - } else {
|
| - return NoChange();
|
| - }
|
| - ReplaceWithValue(node, value);
|
| - return Replace(value);
|
| -}
|
| -
|
| Reduction JSTypedLowering::ReduceJSEqual(Node* node) {
|
| - Reduction const reduction = ReduceJSEqualTypeOf(node);
|
| - if (reduction.Changed()) return reduction;
|
| -
|
| JSBinopReduction r(this, node);
|
|
|
| if (r.BothInputsAre(Type::UniqueName())) {
|
| @@ -961,9 +905,6 @@ Reduction JSTypedLowering::ReduceJSStrictEqual(Node* node) {
|
| }
|
| }
|
|
|
| - Reduction const reduction = ReduceJSEqualTypeOf(node);
|
| - if (reduction.Changed()) return reduction;
|
| -
|
| if (r.BothInputsAre(Type::Unique())) {
|
| return r.ChangeToPureOperator(simplified()->ReferenceEqual());
|
| }
|
|
|