Show
Ignore:
Timestamp:
02/11/10 11:18:34 (7 months ago)
Author:
corni
Message:

Replace the friend-relationship between stmt and CheckMemoryManagement?.
Auto-add CheckMemoryManagement? in debug builds after each pass.
Add a pass for return; => return NULL; transformations
Add a cli argument to rphp-analyzer (--lower) which runs all existing passes in a well-defined order.
pPassManager shouldn't have a copy constructor (per comment) so remove the existing empty.
Document which phc pass has been implemented in which corresponding rphp pass.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/rphp/doc/phc-pass-notes.txt

    r977 r1034  
    1010Constant_folding: a) we don't have a match() function in rphp b) We don't call to zend php for folding constant expressions 
    1111Remove_concat_null: Our parser shouldn't create these concats, so this issue is phc specific. 
    12 Desugar: - and/or renaming to && and || happens already in our parser 
     12Desugar *implemented Desugar* : - and/or renaming to && and || happens already in our parser 
    1313                        - we don't have classes yet (no need to replace self:: and parent:: yet) 
    1414                        - same for interfaces 
    1515                        - we don't store cast types as strings but as enum, so we don't have to normalize them. 
    16                         - we already generate the same AST for return; and return NULL; 
     16                        - we need this to replace return; with return NULL; 
    1717                        - i'm unsure whether we want to transform - x to 0 - x 
    1818Split_multiple_arguments: We got a better facility to iterate over children nodes, so we don't need this imho. 
    19 Split_unset_isset: this one makes more sense, but we need a facility to return an expression list first (sth block-like) 
    20 Echo_split: we definitly want this for the reason given in Echo_split.cpp, but see S-u-i... 
    21 Early_lower_control_flow: we want this at least partially because it simplifies loop codegen later on, but we've to be 
     19Split_unset_isset *implemented Split_Builtins*: this one makes more sense, but we need a facility to return an expression list first (sth block-like) 
     20Echo_split *implemented Split_Builtins*: we definitly want this for the reason given in Echo_split.cpp, but see S-u-i... 
     21Early_lower_control_flow *implemented Early_lower_control_flow except switch and foreach!*: we want this at least partially because it simplifies loop codegen later on, but we've to be 
    2222                                                         super careful with continue. Probably the transformations by phc can be used, but we want to 
    2323                                                         sure they are optimized later if the loop body doesn't contain a continue;. 
    24 Lower_expr_flow: We want everything except the comma-seperated list transform. We need an EXPR_LIST anyways, i'd like 
     24Lower_expr_flow *implemented in Lower_Binary_Op and Lower_Conditional_Expr* and: We want everything except the comma-seperated list transform. We need an EXPR_LIST anyways, i'd like 
    2525                                        to have one which is not binary but uses a std::vector or sth like that 
    2626List_shredder: We want this one :) 
     
    2828                                 nearly everything. 
    2929Pre_post_op_shredder: makes sense, but is a bit more complex. 
    30 Switch_bin_op: should simplify codegen a bit :) 
     30Switch_bin_op *implented in Lower_Binary_Op*: should simplify codegen a bit :) 
    3131Remove_solo_exprs: because we don't have an Eval_expr facility, we can't really do this pass so easily as phc can. 
    3232                                          I'm unsure whether we want to support this or not.