(self)
| 202 | return self.start <= i < self.end |
| 203 | |
| 204 | def _buildStartCache(self) -> None: |
| 205 | if self._instStarts is None: |
| 206 | # build the instruction start cache |
| 207 | if self.view is None: |
| 208 | raise Exception("Attempting to buildStartCache when BinaryView for BasicBlock is None") |
| 209 | self._instStarts = [] |
| 210 | self._instLengths = [] |
| 211 | start = self.start |
| 212 | while start < self.end: |
| 213 | length = self.view.get_instruction_length(start, self.arch) |
| 214 | if length == 0: # invalid instruction. avoid infinite loop |
| 215 | break |
| 216 | self._instLengths.append(length) |
| 217 | self._instStarts.append(start) |
| 218 | start += length |
| 219 | |
| 220 | def _create_instance(self, handle: core.BNBasicBlockHandle) -> 'BasicBlock': |
| 221 | """Internal method used to instantiate child instances""" |
no test coverage detected