Contact: fumanchu@aminus.org

Log in as guest/dejavu to create tickets

I think I've seen this ORM somewhere before...

Changeset 42

Show
Ignore:
Timestamp:
12/20/04 17:48:53
Author:
fumanchu
Message:

1. New named_opcodes(bits) in codewalk.
2. Moved old codewalk history to old_changes.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/codewalk.py

    r41 r42  
    1515""" 
    1616 
    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() (early 
    26         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 in 
    41     Rewriter.code_object to get co_stacksize. 
    42 2. Make named_opcodes(bits), which returns names for the first code in 
    43     each word, numbers otherwise. 
    44 3. Rewrite dis as a Visitor. 
    45 """ 
    46  
    4717from opcode import cmp_op, opname, opmap, HAVE_ARGUMENT 
    4818import operator 
     
    5020from types import CodeType, FunctionType 
    5121 
     22 
     23def 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 
    5236 
    5337def numeric_opcodes(bits): 
     
    5943        bitnums.append(x) 
    6044    return bitnums 
    61  
    6245 
    6346_deref_bytecode = numeric_opcodes(['LOAD_DEREF', 0, 0, 'RETURN_VALUE']) 
  • trunk/old_changes.txt

    r41 r42  
    4141        really needed until the unit is concrete). 
    4242    7. Profiling: added unit._property_types for faster lookup. 
     43    8. After profiling, added _co_code_attrs to codewalk because dir() was so slow. 
    4344 
    44451.2.0 RC (8/5/04): 
     
    111112    1. Added the COPY rule to engines.py. 
    112113 
     114codewalk.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 
    113129Prior to July 2004, Dejavu was integrated with a Python application 
    114130framework, which is now called "Cation". Development on the 
  • trunk/storage/storeado.py

    r41 r42  
    798798        cols = [(firstcls, k) for k in firstcls.properties()] 
    799799         
    800         # TODO: concat multiple pairs. 
    801800        if len(pairs) != 1: 
    802801            raise ValueError("Multiselect does not yet work on multiple pairs.")