V8 Project
v8::internal::compiler::anonymous_namespace{value-numbering-reducer.cc} Namespace Reference

Functions

size_t HashCode (Node *node)
 
bool Equals (Node *a, Node *b)
 

Function Documentation

◆ Equals()

bool v8::internal::compiler::anonymous_namespace{value-numbering-reducer.cc}::Equals ( Node *  a,
Node *  b 
)

Definition at line 18 of file value-numbering-reducer.cc.

18  {
19  DCHECK_NOT_NULL(a);
20  DCHECK_NOT_NULL(b);
21  DCHECK_NOT_NULL(a->op());
22  DCHECK_NOT_NULL(b->op());
23  if (!a->op()->Equals(b->op())) return false;
24  if (a->InputCount() != b->InputCount()) return false;
25  for (int j = 0; j < a->InputCount(); ++j) {
26  DCHECK_NOT_NULL(a->InputAt(j));
27  DCHECK_NOT_NULL(b->InputAt(j));
28  if (a->InputAt(j)->id() != b->InputAt(j)->id()) return false;
29  }
30  return true;
31 }
#define DCHECK_NOT_NULL(p)
Definition: logging.h:213

References DCHECK_NOT_NULL.

Referenced by v8::internal::FINAL< kOperandKind, kNumCachedOperands >::CanBeReplacedWith(), v8::internal::CallInterfaceDescriptorData::Initialize(), and v8::internal::Runtime_GetScriptFromScriptName().

+ Here is the caller graph for this function:

◆ HashCode()

size_t v8::internal::compiler::anonymous_namespace{value-numbering-reducer.cc}::HashCode ( Node *  node)

Definition at line 15 of file value-numbering-reducer.cc.

15 { return node->op()->HashCode(); }