Making MightHaveChildren() always return true regardless for our own data formatters
This is meant to optimize performance for common most-often-not-empty container classes
llvm-svn: 169759
pass
def has_children(self):
- logger = lldb.formatters.Logger.Logger()
- if self.count == None:
- self.update ()
- try:
- next_val = self.next.GetValueAsUnsigned(0)
- prev_val = self.prev.GetValueAsUnsigned(0)
- if next_val == 0 or prev_val == 0:
- return False
- if next_val == self.node_address:
- return False
- # skip all the advanced logic to detect the exact count of children
- # in the interest of speed from this point on, we MIGHT have children
- # our loop detection logic will still make nothing show up :)
- return True
- except:
- return False
- if self.count == 0:
- return False
return True
class StdVectorSynthProvider:
def has_children(self):
- return self.num_children() > 0
+ return True
class StdMapSynthProvider:
return x;
def has_children(self):
- return self.num_children() > 0
+ return True
_map_capping_size = 255
_list_capping_size = 255
pass
def has_children(self):
- # retrieving the count is quick enough on a std::vector
- return self.num_children() > 0
+ return True
# Just an example: the actual summary is produced by a summary string: size=${svar%#}
def stdvector_SummaryProvider(valobj,dict):
pass
def has_children(self):
- logger = lldb.formatters.Logger.Logger()
- if self.count == None:
- self.update()
- try:
- next_val = self.head.GetValueAsUnsigned(0)
- prev_val = self.tail.GetValueAsUnsigned(0)
- if next_val == 0 or prev_val == 0:
- return False
- if next_val == self.node_address:
- return False
- # skip all the advanced logic to detect the exact count of children
- # in the interest of speed from this point on, we MIGHT have children
- # our loop detection logic will still make nothing show up :)
- return True
- except:
- return 0;
- if self.count == 0:
- return False
return True
return 0;
def has_children(self):
- return self.num_children_impl() > 0
+ return True
def get_data_type(self):
logger = lldb.formatters.Logger.Logger()
return min(self.count, _deque_capping_size)
def has_children(self):
- if self.cont is None:
- self.update()
- return self.count > 0
+ return True
def get_child_index(self,name):
logger = lldb.formatters.Logger.Logger()
bool
lldb_private::formatters::NSArrayMSyntheticFrontEnd::MightHaveChildren ()
{
- if (!m_data_32 && !m_data_64)
- Update ();
- return CalculateNumChildren();
+ return true;
}
static uint32_t
bool
lldb_private::formatters::NSArrayISyntheticFrontEnd::MightHaveChildren ()
{
- if (!m_data_ptr)
- Update ();
- return CalculateNumChildren();
+ return true;
}
lldb::ValueObjectSP
bool
lldb_private::formatters::NSArrayCodeRunningSyntheticFrontEnd::MightHaveChildren ()
{
- return CalculateNumChildren() > 0;
+ return true;
}
uint32_t
bool
lldb_private::formatters::NSDictionaryCodeRunningSyntheticFrontEnd::MightHaveChildren ()
{
- return CalculateNumChildren() > 0;
+ return true;
}
uint32_t
bool
lldb_private::formatters::NSDictionaryISyntheticFrontEnd::MightHaveChildren ()
{
- if (!m_data_32 && !m_data_64)
- Update ();
- return CalculateNumChildren();
+ return true;
}
lldb::ValueObjectSP
bool
lldb_private::formatters::NSDictionaryMSyntheticFrontEnd::MightHaveChildren ()
{
- if (!m_data_32 && !m_data_64)
- Update ();
- return CalculateNumChildren();
+ return true;
}
lldb::ValueObjectSP