-
Notifications
You must be signed in to change notification settings - Fork 2
Object slicing #162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Object slicing #162
Conversation
acheshkov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, measure a performance on a benchmark before and after this PR separately for block and CC slicings, @KuYaki
| block = manager.get_statements_in_range(Point(4, 0), Point(4, 10000)) | ||
| extension = manager.get_statements_in_range(Point(2, 0), Point(2, 10000)) | ||
| self.assertFalse(filter_anti_dependence(extension.difference(block), block, manager)) | ||
| self.assertTrue(filter_anti_dependence(extension.difference(block), block, manager)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why has it changed?
| for r in ProgramSlice(code.split("\n")).from_statements(name_to_extension['rest']).ranges_compact | ||
| ] | ||
| self.assertEqual([(3, 3), (6, 8)], _range_rest) | ||
| self.assertEqual([(2, 3), (6, 8)], _range_rest) # TODO: check if it is correct. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please to do it
| block = manager.get_statements_in_range(Point(6, 0), Point(9, 10000)) | ||
| incoming_variables = get_incoming_variables(block, manager) | ||
| self.assertEqual(set(incoming_variables.keys()), {'opt', 'a'}) | ||
| self.assertEqual({'opt', 'a'}, set(incoming_variables.keys())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you swap?
Added Object type for variables.