MCPcopy Index your code
hub / github.com/nodejs/node / TransitionArray

Class TransitionArray

deps/v8/tools/grokdump.py:1588–1623  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1586
1587
1588class TransitionArray(object):
1589 def __init__(self, array):
1590 self.array = array
1591
1592 def IsSimpleTransition(self):
1593 return self.array.length <= 2
1594
1595 def Length(self):
1596 # SimpleTransition cases
1597 if self.IsSimpleTransition():
1598 return self.array.length - 1
1599 return (self.array.length - 3) // 2
1600
1601 def Print(self, p):
1602 length = self.Length()
1603 array = self.array
1604
1605 p.Print("Transitions(%08x, length=%d)" % (array.address, length))
1606 p.Print("[backpointer] %s" % (array.Get(0)))
1607 if self.IsSimpleTransition():
1608 if length == 1:
1609 p.Print("[simple target] %s" % (array.Get(1)))
1610 return
1611
1612 elements = array.Get(1)
1613 if elements is not None:
1614 p.Print("[elements ] %s" % (elements))
1615
1616 prototype = array.Get(2)
1617 if prototype is not None:
1618 p.Print("[prototype ] %s" % (prototype))
1619
1620 for di in range(length):
1621 i = 3 + di * 2
1622 p.Print("[%i] symbol: %s" % (di, array.Get(i + 0)))
1623 p.Print("[%i] target: %s" % (di, array.Get(i + 1)))
1624
1625
1626class JSFunction(HeapObject):

Callers 2

PrintMethod · 0.85
do_do_transMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected