| 1359 | |
| 1360 | |
| 1361 | class String(HeapObject): |
| 1362 | def LengthOffset(self): |
| 1363 | # First word after the map is the hash, the second is the length. |
| 1364 | return self.heap.TaggedPointerSize() * 2 |
| 1365 | |
| 1366 | def __init__(self, heap, map, address): |
| 1367 | HeapObject.__init__(self, heap, map, address) |
| 1368 | self.length = self.Uint32Field(self.LengthOffset()) |
| 1369 | |
| 1370 | def GetChars(self): |
| 1371 | return "?string?" |
| 1372 | |
| 1373 | def Print(self, p): |
| 1374 | p.Print(str(self)) |
| 1375 | |
| 1376 | def __str__(self): |
| 1377 | return "\"%s\"" % self.GetChars() |
| 1378 | |
| 1379 | |
| 1380 | class SeqString(String): |
no outgoing calls
searching dependent graphs…