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

Unified Diff: src/compiler/js-inlining.cc

Issue 2635243002: [turbofan] Refactor IsSame into NodeProperties. (Closed)
Patch Set: Update. Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/js-call-reducer.cc ('k') | src/compiler/node-properties.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-inlining.cc
diff --git a/src/compiler/js-inlining.cc b/src/compiler/js-inlining.cc
index 1717d4118a5070b39819ae82cb144f0a457e8178..3869a3ef9ba326ddcd6568900845dfd8cc113c56 100644
--- a/src/compiler/js-inlining.cc
+++ b/src/compiler/js-inlining.cc
@@ -278,19 +278,6 @@ Node* JSInliner::CreateTailCallerFrameState(Node* node, Node* frame_state) {
namespace {
-// TODO(turbofan): Shall we move this to the NodeProperties? Or some (untyped)
-// alias analyzer?
-bool IsSame(Node* a, Node* b) {
- if (a == b) {
- return true;
- } else if (a->opcode() == IrOpcode::kCheckHeapObject) {
- return IsSame(a->InputAt(0), b);
- } else if (b->opcode() == IrOpcode::kCheckHeapObject) {
- return IsSame(a, b->InputAt(0));
- }
- return false;
-}
-
// TODO(bmeurer): Unify this with the witness helper functions in the
// js-builtin-reducer.cc once we have a better understanding of the
// map tracking we want to do, and eventually changed the CheckMaps
@@ -305,7 +292,7 @@ bool IsSame(Node* a, Node* b) {
bool NeedsConvertReceiver(Node* receiver, Node* effect) {
for (Node* dominator = effect;;) {
if (dominator->opcode() == IrOpcode::kCheckMaps &&
- IsSame(dominator->InputAt(0), receiver)) {
+ NodeProperties::IsSame(dominator->InputAt(0), receiver)) {
// Check if all maps have the given {instance_type}.
ZoneHandleSet<Map> const& maps =
CheckMapsParametersOf(dominator->op()).maps();
« no previous file with comments | « src/compiler/js-call-reducer.cc ('k') | src/compiler/node-properties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698