Permalink
Switch branches/tags
Nothing to show
Commits on Sep 1, 2012
Commits on Aug 31, 2012
  1. prolog: handle $o->data[...] correctly, generate right use/4 fact

    aryx committed Aug 30, 2012
    Summary:
    The set of patterns recognized in database_prolog_php.ml to generate
    prolog facts from a PHP AST was not recognizing array member access.
    Code like $o->fld and $o->fld[...] generates different kinds of
    AST in ast_php.ml (one with ObjAccessSimple and the other
    ObjAccess(... (ObjProp (OarrayAccess (OName ...)). This
    patch adds a pattern for OName.
    
    The right fix is to use ast_php_simple.ml and not ast_php.ml as the
    basis of the prolog fact generation, but a quick fix is this patch.
    
    Test Plan:
    unit test included
    $ make test
    also
    $ ~pad/bin/pphp use_member.php
    ...
    use(('TestSimpleMember','getShortName'), 'data', field, read).
    ...
    use(('TestSimpleMember','getAllLocalizedNames'), 'data', field, read).
    
    Reviewers: pieter
    
    Reviewed By: pieter
    
    CC: pdimov
    
    Differential Revision: https://phabricator.fb.com/D563180
Commits on Aug 30, 2012
  1. Merge branch 'strmap_intmap'

    aryx committed Aug 30, 2012
  2. pfff: support for strmap/intmap

    aryx committed Aug 28, 2012
    Summary:
    Alok wanted that. The proper fix would be to have
    an enumerated type so what can have ArrayLong ... | Strmap ... | Intmap ...
    but we're not sure this extension will be there in a few weeks
    and adding new constructors in ast_php.ml is painful because you
    have to update the visitor (visitor_php.ml), the dumper (meta_ast_php.ml),
    etc.
    
    Another patch will add support in cmf for strmap/intmap.
    
    Test Plan:
    $ ~/pfff/pfff -parse_php ~/pfff/tests/php/semantic/strmap.php
    now parse.
    $ ~/pfff/pfff -dump_php ~/pfff/tests/php/semantic/strmap.php
    
    Reviewers: amenghra, julienv, pieter
    
    Reviewed By: amenghra
    
    CC: andrewparoski
    
    Differential Revision: https://phabricator.fb.com/D560008
    
    Task ID: 1253842
Commits on Aug 29, 2012
  1. * lang_php/analyze/checker/check_variables_php.ml: comment

    Yoann Padioleau committed Aug 29, 2012
Commits on Aug 28, 2012
  1. codemap: factorize code in highlight_php to use kfunc_def, and fix hi…

    aryx committed Aug 28, 2012
    …ghlight
    
    of closures
  2. * visual/Visual.tex.nw:

    Yoann Padioleau committed Aug 28, 2012
Commits on Aug 20, 2012
  1. scheck: fix on @(list(...)) false positive

    aryx committed Aug 20, 2012
    Summary:
    The simple AST builder had a bug on the @ sign. He didn't
    generate an AST for the argument of @ which led to
    some false positives in scheck and cmf.
    
    Test Plan:
    unit test included
    $ ./scheck -test
    
    Reviewers: pieter, julienv
    
    Reviewed By: pieter
    
    CC: bikash
    
    Differential Revision: https://phabricator.fb.com/D553646
  2. * project.el:

    aryx committed Aug 20, 2012
  3. * tests/php/scheck/functions.php:

    aryx committed Aug 20, 2012
  4. Merge branch 'builtins_yield_etc'

    aryx committed Aug 20, 2012
  5. cmf: define __builtin__yield, __builtin__clone, etc

    aryx committed Aug 17, 2012
    Summary:
    I've recently pushed a new variable checker (UseOfUndefinedVariable,
    UnusedVariable) in cmf which is using a new AST (ast_php_simple.ml). This
    AST unsugar certain builtins like yield in regular function calls
    like __builtin__yield (which simplifies some analysis). Those
    new special functions must then be defined somewhere otherwise
    one can get some UndefinedFunction error in cmf or unnecessary calls to
    'git grep __builtin__yield'.
    
    Test Plan:
    unit test included
    $ cd pfff; ./scheck -test
    also
    $ cmf --verbose --bugs -r www/flib/core
    does not generate calls to 'git grep __builtin__yield'
    
    Reviewers: pieter, mroch
    
    Reviewed By: pieter
    
    CC: julienv
    
    Differential Revision: https://phabricator.fb.com/D552411
Commits on Aug 18, 2012
  1. * tests/php/scheck/arrays.php:

    aryx committed Aug 18, 2012
  2. * tests/php/scheck/functions.php:

    aryx committed Aug 18, 2012
Commits on Aug 17, 2012
  1. * lang_php/analyze/foundation/ast_php_simple_build.ml: remove some us…

    aryx committed Aug 17, 2012
    …e of
    
    fakeInfo for some builtins, grab a token around
  2. * tests/php/scheck/arrays.php:

    aryx committed Aug 17, 2012