• svenpanne@chromium.org's avatar
    Unify the handling of comparinsons against null and undefined. · cf63503c
    svenpanne@chromium.org authored
    Although this patch is not small, most parts of it are rather mechanical:
    
     * First of all, the concept of a 'nil-like' value is introduced, which can be
       null or undefined. They are treated symmetrically regarding comparisons, so
       it makes sense to handle them in a uniform manner. It is a mystery why
       JavaScript defines two of those beasts, when even *one* is a design wart...
    
     * Extended and renamed a few things which now handle undefined in addition to
       null.
    
     * Made the parts of the full code generator and the hydrogen generation which
       deal with comparisons a bit more similar regarding their handling of special
       cases.
    
     * Refactored the syntactical detection of special cases for comparisons,
       hopefully making them a bit more readable and less copy-n-paste-oriented.
       Things like this should really be a one-liner in any sane programming
       language... :-P
    
     * Cut down the length of the argument lists of a few functions to something
       less insane, making them more easily understandable locally. This involves
       minor code duplication, but this was a good tradeoff and can be remedied
       later if necessary.
    
     * Replaced some boolean arguments with more readable enums.
    
     * Fixed a TODO: Values which are definitely a Smi or unboxed can never be equal
       to null or undefined.
    Review URL: http://codereview.chromium.org/7918012
    
    git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9323 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
    cf63503c
Name
Last commit
Last update
..
assembler-ia32-inl.h Loading commit data...
assembler-ia32.cc Loading commit data...
assembler-ia32.h Loading commit data...
builtins-ia32.cc Loading commit data...
code-stubs-ia32.cc Loading commit data...
code-stubs-ia32.h Loading commit data...
codegen-ia32.cc Loading commit data...
codegen-ia32.h Loading commit data...
cpu-ia32.cc Loading commit data...
debug-ia32.cc Loading commit data...
deoptimizer-ia32.cc Loading commit data...
disasm-ia32.cc Loading commit data...
frames-ia32.cc Loading commit data...
frames-ia32.h Loading commit data...
full-codegen-ia32.cc Loading commit data...
ic-ia32.cc Loading commit data...
lithium-codegen-ia32.cc Loading commit data...
lithium-codegen-ia32.h Loading commit data...
lithium-gap-resolver-ia32.cc Loading commit data...
lithium-gap-resolver-ia32.h Loading commit data...
lithium-ia32.cc Loading commit data...
lithium-ia32.h Loading commit data...
macro-assembler-ia32.cc Loading commit data...
macro-assembler-ia32.h Loading commit data...
regexp-macro-assembler-ia32.cc Loading commit data...
regexp-macro-assembler-ia32.h Loading commit data...
simulator-ia32.cc Loading commit data...
simulator-ia32.h Loading commit data...
stub-cache-ia32.cc Loading commit data...