Changeset 42
- Timestamp:
- 12/20/04 17:48:53
- Files:
-
- trunk/codewalk.py (modified) (3 diffs)
- trunk/old_changes.txt (modified) (2 diffs)
- trunk/storage/storeado.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/codewalk.py
r41 r42 15 15 """ 16 16 17 version = "0.3.2"18 19 changelog = """20 0.3.2 (8/8/04):21 1. After profiling, added _co_code_attrs because dir() was so slow.22 23 0.3.1 (4/29/04):24 1. Added KeywordInspector.25 2. Made LambdaDecompiler use function __name__, not repr() (early26 binding makes e.g. datetime.date into <type datetime.date>).27 3. Added safe_tuple.28 4. Added TaintableStack.maxsize to help stack calculation.29 5. Forgot to call deref_cell from visit_LOAD_DEREF! D'oh!30 6. Put visit_ methods in alpha order.31 7. Added name_index to Rewriter.32 8. Got rid of extra args to EarlyBinder.33 9. Added reduction of getattr to EarlyBinder as an option.34 10. Combined 'ands' and 'ors' into 'targets' in LambdaDecompiler.35 11. Fixed parenthesis problems in LambdaDecompiler.36 12. Added BranchTracker class.37 """38 39 todo = """40 1. Make a StackCalculator subclass of Visitor, call it in41 Rewriter.code_object to get co_stacksize.42 2. Make named_opcodes(bits), which returns names for the first code in43 each word, numbers otherwise.44 3. Rewrite dis as a Visitor.45 """46 47 17 from opcode import cmp_op, opname, opmap, HAVE_ARGUMENT 48 18 import operator … … 50 20 from types import CodeType, FunctionType 51 21 22 23 def named_opcodes(bits): 24 """Change initial numeric opcode bits to their named equivalents.""" 25 bitnums = [] 26 bits = iter(bits) 27 for x in bits: 28 bitnums.append(opname[x]) 29 if x >= HAVE_ARGUMENT: 30 try: 31 bitnums.append(bits.next()) 32 bitnums.append(bits.next()) 33 except StopIteration: 34 break 35 return bitnums 52 36 53 37 def numeric_opcodes(bits): … … 59 43 bitnums.append(x) 60 44 return bitnums 61 62 45 63 46 _deref_bytecode = numeric_opcodes(['LOAD_DEREF', 0, 0, 'RETURN_VALUE']) trunk/old_changes.txt
r41 r42 41 41 really needed until the unit is concrete). 42 42 7. Profiling: added unit._property_types for faster lookup. 43 8. After profiling, added _co_code_attrs to codewalk because dir() was so slow. 43 44 44 45 1.2.0 RC (8/5/04): … … 111 112 1. Added the COPY rule to engines.py. 112 113 114 codewalk.py 0.3.1 (4/29/04): 115 1. Added KeywordInspector. 116 2. Made LambdaDecompiler use function __name__, not repr() (early 117 binding makes e.g. datetime.date into <type datetime.date>). 118 3. Added safe_tuple. 119 4. Added TaintableStack.maxsize to help stack calculation. 120 5. Forgot to call deref_cell from visit_LOAD_DEREF! D'oh! 121 6. Put visit_ methods in alpha order. 122 7. Added name_index to Rewriter. 123 8. Got rid of extra args to EarlyBinder. 124 9. Added reduction of getattr to EarlyBinder as an option. 125 10. Combined 'ands' and 'ors' into 'targets' in LambdaDecompiler. 126 11. Fixed parenthesis problems in LambdaDecompiler. 127 12. Added BranchTracker class. 128 113 129 Prior to July 2004, Dejavu was integrated with a Python application 114 130 framework, which is now called "Cation". Development on the trunk/storage/storeado.py
r41 r42 798 798 cols = [(firstcls, k) for k in firstcls.properties()] 799 799 800 # TODO: concat multiple pairs.801 800 if len(pairs) != 1: 802 801 raise ValueError("Multiselect does not yet work on multiple pairs.")
