Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(314)

Side by Side Diff: src/compiler/js-typed-lowering.cc

Issue 1743433002: Revert of [compiler] Drop the CompareNilIC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/change-lowering.cc ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/compilation-dependencies.h" 6 #include "src/compilation-dependencies.h"
7 #include "src/compiler/access-builder.h" 7 #include "src/compiler/access-builder.h"
8 #include "src/compiler/js-graph.h" 8 #include "src/compiler/js-graph.h"
9 #include "src/compiler/js-typed-lowering.h" 9 #include "src/compiler/js-typed-lowering.h"
10 #include "src/compiler/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 invert); 526 invert);
527 } 527 }
528 if (r.BothInputsAre(Type::Boolean())) { 528 if (r.BothInputsAre(Type::Boolean())) {
529 return r.ChangeToPureOperator(simplified()->ReferenceEqual(Type::Boolean()), 529 return r.ChangeToPureOperator(simplified()->ReferenceEqual(Type::Boolean()),
530 invert); 530 invert);
531 } 531 }
532 if (r.BothInputsAre(Type::Receiver())) { 532 if (r.BothInputsAre(Type::Receiver())) {
533 return r.ChangeToPureOperator( 533 return r.ChangeToPureOperator(
534 simplified()->ReferenceEqual(Type::Receiver()), invert); 534 simplified()->ReferenceEqual(Type::Receiver()), invert);
535 } 535 }
536 if (r.OneInputIs(Type::Undetectable())) { 536 if (r.OneInputIs(Type::NullOrUndefined())) {
537 RelaxEffectsAndControls(node); 537 Callable const callable = CodeFactory::CompareNilIC(isolate(), kNullValue);
538 node->RemoveInput(r.LeftInputIs(Type::Undetectable()) ? 0 : 1); 538 CallDescriptor const* const desc = Linkage::GetStubCallDescriptor(
539 node->TrimInputCount(1); 539 isolate(), graph()->zone(), callable.descriptor(), 0,
540 NodeProperties::ChangeOp(node, simplified()->ObjectIsUndetectable()); 540 CallDescriptor::kNeedsFrameState, node->op()->properties());
541 node->RemoveInput(r.LeftInputIs(Type::NullOrUndefined()) ? 0 : 1);
542 node->InsertInput(graph()->zone(), 0,
543 jsgraph()->HeapConstant(callable.code()));
544 NodeProperties::ChangeOp(node, common()->Call(desc));
541 if (invert) { 545 if (invert) {
542 // Insert an boolean not to invert the value. 546 // Insert an boolean not to invert the value.
543 Node* value = graph()->NewNode(simplified()->BooleanNot(), node); 547 Node* value = graph()->NewNode(simplified()->BooleanNot(), node);
544 node->ReplaceUses(value); 548 node->ReplaceUses(value);
545 // Note: ReplaceUses() smashes all uses, so smash it back here. 549 // Note: ReplaceUses() smashes all uses, so smash it back here.
546 value->ReplaceInput(0, node); 550 value->ReplaceInput(0, node);
547 return Replace(value); 551 return Replace(value);
548 } 552 }
549 return Changed(node); 553 return Changed(node);
550 } 554 }
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1755 } 1759 }
1756 1760
1757 1761
1758 CompilationDependencies* JSTypedLowering::dependencies() const { 1762 CompilationDependencies* JSTypedLowering::dependencies() const {
1759 return dependencies_; 1763 return dependencies_;
1760 } 1764 }
1761 1765
1762 } // namespace compiler 1766 } // namespace compiler
1763 } // namespace internal 1767 } // namespace internal
1764 } // namespace v8 1768 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/change-lowering.cc ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698