forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTODO
89 lines (82 loc) · 2.31 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
## rewind_recreate.py Tasks
## Questions
* What are all those weakrefs after creating a class?
* What happens when you use the special protocols? Write tests
* STORE_FAST
* RETURN_VALUE
* NEW_OBJECT
* CALL_BUILT_IN_FUNCTION
* NEW_LIST
* NEW_STRING
* STORE_ATTR
* STORE_NAME (scoped)
## Events/Instructions To Track
* maybe retry intercepting data structure mutations from inside so
that mutations from extensions will be tracked
* recursively track a dict
* recursively track a set
* test on some solved leetcode problems
* built-in function calls
* log parameters to built-in function calls (print)
* list.sort
* dict.popitem
* set.pop
* set.difference_update
* set.intersection_update
* set.symmetric_difference_update
* Problem: what if a data structure/object is modified outside of my
supervision? Such as from a native C module?
* Option 1: Have a dirty flag or version flag inside the data structure
* Option 2: track mutation events from within the data structure itself
## Done
* print
* register an object instance (done)
* Bug: recycled objects are not re-registered (done)
* track built-in functions like print (done)
* register objects as each object is encountered (done)
* lists in lists (done)
* come up with a format for printing heap objects based on id (done)
* RETURN_VALUE (done)
* STORE_NAME (done)
* classes and instances
* STORE_ATTR (done)
* String (done)
* List
* BUILD_LIST (done)
* LIST_EXTEND (fix 2 different formats of call)
* list.append (done)
* DELETE_SUBSCR (done)
* STORE_SUBSCR (done)
* list.remove (done)
* list.extend (done)
* list.insert (done)
* list.pop (done)
* list.clear (done)
* concatenation with +/* (done)
* list.reverse (done)
* LIST_APPEND (done)
* Dict
* NEW_DICT (done)
* BUILD_MAP (done)
* dict.update (done)
* dict.clear (done)
* dict.pop (done)
* dict.popitem
* DELETE_SUBSCR (done)
* STORE_SUBSCR (done)
* Set
* SET_ADD (done)
* calling constructor set() (done)
* set.add (done)
* set.update (done)
* set.discard (done)
* set.remove (done)
* set.clear (done)
* difference (-) (done)
* intersection (&) (done)
* symmetric difference (^) (done)
* union (|) (done)
* -= (done)
* &= (done)
* ^= (done)
* add elements from another set with |= (done)