return JMakeAnalysis(pcd_entries, src_to_deps)
def parse_products(self, infile, classes_dir):
self._expect_header(infile.readline(), "pcd entries")
num_pcd_entries = self.parse_num_items(infile.readline())
ret = defaultdict(list)
// Parse more efficiently than above, since we only care about
// the first two elements in the line.
After Change
def parse_products(self, lines_iter, classes_dir):
self._expect_header(next(lines_iter), b"pcd entries")
num_pcd_entries = self.parse_num_items(next(lines_iter))
ret = defaultdict(list)
// Parse more efficiently than above, since we only care about
// the first two elements in the line.
for _ in range(0, num_pcd_entries):
line = next(lines_iter)
p1 = line.find(b"\t")
clsfile = os.path.join(classes_dir, line[0:p1] + b".class")
p2 = line.find(b"\t", p1 + 1)
src = line[p1+1:p2]