Permalink
Switch branches/tags
Nothing to show
Commits on Jan 30, 2013
  1. Clean up some TODOs in hhbctranslator

    jdelong authored and sgolemon committed Jan 30, 2013
  2. Remove disabled SpillStack optimization

    jdelong authored and sgolemon committed Jan 30, 2013
    I think this isn't necessary now because we use GuardStk and
    AssertStk to get type information into the stack.  Unless I'm missing
    something, I think we shouldn't be generating any cases where we spill
    something back to right where we loaded it from anymore.  (If it turns
    out we are, we implement this then.)
  3. Optimized way to call $cont->{next,send,raise}()

    jano authored and sgolemon committed Jan 29, 2013
    Caching pointers to HPHP::VM::Func improved overall CPU time by about
    2%, simplifying invokefunc() by another 1.5%.
    
    Once asynchronous functions are natively implemented, we will be able to
    eliminate >95% of these VM reenters.
  4. Remove unused ArgDesc::genCode

    swtaarrs authored and sgolemon committed Jan 30, 2013
  5. Allow traits to be created in extensions

    ptarjan authored and sgolemon committed Jan 29, 2013
    It seems like it should exist for completness.
    I needed this for adding a trait to the fb extension but I'm
    breaking it out because I'm going a different direction with
    that diff but it seems generally useful.
  6. Fix an assert in non-debug builds

    swtaarrs authored and sgolemon committed Jan 29, 2013
    This assert assumes that it will only be enabled if
    isTransDBEnabled == true.
  7. More uses of range-for, and a couple other things.

    edwinsmith authored and sgolemon committed Jan 25, 2013
    Used range-for in more places.  A few places were accidentally
    making copies of the list before iterating over them (value assignment).
    Created an enum for DEAD, LIVE, etc.
  8. Fix building HPHPc targets

    sgolemon committed Jan 30, 2013
    Add pathing properties for folly and double-conversion
  9. Get rid of some easy inline assembly

    oyamauchi authored and sgolemon committed Jan 29, 2013
    build successfully on x64. Building hhvm on ARMv8 no longer trips
    over these things. (It still doesn't complete.) I've manuall tested the inline
    asm to get the stack pointer, and it works.
  10. Support FP arithmetic.

    kma authored and sgolemon committed Jan 28, 2013
    Relatively short drive to FP arithmetic. Const-ify a few things en route.
  11. Missed a few fixes from Jordan.

    kma authored and sgolemon committed Jan 29, 2013
  12. Combine hphp and hhvm into one executable

    sgolemon committed Jan 29, 2013
    Move hphp/main.cpp to compiler/compiler.cpp, and rename
    a few things to make it possible to link with hhvm.
    
    Modify hhvm startup to run as hphp if
    the first argument is --hphp.
Commits on Jan 29, 2013
  1. Getting started on HHIR FP support: OpEq.

    kma authored and sgolemon committed Jan 25, 2013
    While comparisons aren't very dynamically frequent, they're an
    easy place to get started on implementing FP support. Like tx64, I haven't
    bothered to teach the register allocator anything about the xmm regs; I
    just move operands from gprs to xmm0 and xmm1, and evaluate the expression.
    
    I was worried about interfering with spilling to these same registers, but
    we spill to mmx registers, which alias the legacy floating point stack.
    The XMM regs are physically distinct.
  2. Add pseudo-counters for tx64 vs. hhir instructions

    swtaarrs authored and sgolemon committed Jan 25, 2013
    The new runtime option (Eval.EnableInstructionCounts)
    combined with the new pseudo-counters instr_hhir and instr_tx64 will
    let us track how many executed hhbc instructions were translated by
    tx64 vs. hhir.
  3. Add support for embedding the repo

    markw65 authored and sgolemon committed Jan 26, 2013
    Modify hphpc so that if format contains "exe" it uses objcopy
    to put the generated repo into the hhvm binary, in a section
    named "repo".
    
    Write an sqlite vfs wrapper that allows us to open a range
    of bytes in a file as a read-only sqlite database (using the
    filename to encode the range: file:<start>:<length>).
    
    Use libelf at startup to see if there is a repo section, and
    if so enable the vfs wrapper, and add appropriate
    repo-authoritative options to the command line to use the
    repo section as the repo.
  4. Some assertions for invalid registers

    jdelong authored and sgolemon committed Jan 27, 2013
    Sometimes we have PhysRegs that are InvalidReg and try to use
    them anyway.  Right now, there's some cases where this ends up passing
    reg::noreg to an emitC* function that treats that as a special
    meaning, and you can emit machine code that didn't have the type of
    memory operand you wanted.  Assert here because PhysReg stuff is
    constexpr (cannot assert there).  Ideally it wouldn't implicitly
    convert to Reg64 and this would all be impossible, but oh well.
  5. Move jump simplifications to the Simplifier

    jdelong authored and sgolemon committed Jan 24, 2013
    It looks like these were implemented before simplifyCmp, so
    it duplicated some of the abiltiy to simplify comparisons with certain
    types of constant arguments.  This code can be simpler and in the
    simplifier.
  6. Minor tweak so genDefConst works with all ints

    jdelong authored and sgolemon committed Jan 28, 2013
    Right now it gets confused if you don't give an explicit
    argument list on many ints, if they are 32 bit or unsigned or int64_t
    vs int64, etc.
  7. Move hphp/doc -> hphp/src/doc

    jdelong authored and sgolemon committed Jan 28, 2013
    Needed for FB internal restructure.
  8. Add a runtime switch to disable dead code elimination

    edwinsmith authored and sgolemon committed Jan 23, 2013
    This fixes a few problems when DCE is disabled, however some
    tests still fail.  Fixed:
     * register allocator assigns registers to unused destination tmps
     * fixed LiveOutRegs calculation with unused results
     * removed assert from cgJmp_
     * support immediate constants in cgMov
Commits on Jan 28, 2013
  1. Fix an assert on syntax errors

    markw65 authored and sgolemon committed Jan 27, 2013
    When using hphp to compile a repo, a syntax error in an input
    file would cause an assertion to fail (DEBUG only).
    
    When I tried to add a testcase, I found that we didnt quite support
    this. We have a mode that ignores errors; but that also ignored crashes,
    so I fixed test.mk to differentiate.
    
    That revealed that hphp didnt pass through the result of invoking
    hhvm, and that hhvm returned -1 for normal exits where the
    php code had fataled.
    
    When running the tests I found that it took over an hour to run
    TestCodeRunRepoJit-Compilation, vs 4 minutes for the whole of
    TestCodeRunRepoJit a couple of weeks ago (and my machines was
    unusable for most of that hour). I dropped the parallelism
    to "number of cores" from "number of cores * 2" and the time
    dropped to a couple of seconds.
  2. Fix a bug for HHIR Print of Type::Bool, add some random byte things

    jdelong authored and sgolemon committed Jan 25, 2013
    Replace ands with movzbl.  Calling C++ for print_boolean was
    wrong because it took an int64 but we don't know that the bool was
    zero-extended yet.  Added two boolean instructions to the assembler
    (with unit tests) that I didn't ever use.
  3. Couple of small fixes

    markw65 authored and sgolemon committed Jan 25, 2013
  4. AllowedDirectories overwrites should append

    markw65 authored and sgolemon committed Jan 23, 2013
    VirtualHost.*.overwrites.AllowedDirectories would replace the
    default AllowedDirectories list, rather than of adding to it,
    while Tiers.*.overwrites.AllowedDirectories would append to the
    default AllowedDirectories list. This caused confusion, and
    errors.
    
    This makes both cases append, and also sorts and uniquifies the
    list to make checking it O(log N) rather than O(N).
  5. Fix buffer overrun, and add a check

    markw65 authored and sgolemon committed Jan 25, 2013
    We wrote 49 chars to a 48 char buffer. Under gcc-4.7.1,
    RELEASE build, this corrupted a variable in the caller, resulting
    in a crash.
  6. Rename jumps.cpp to jumpopts.cpp

    jdelong authored and sgolemon committed Jan 25, 2013
  7. Fall back to interp from the IR.

    kma authored and sgolemon committed Jan 16, 2013
    Introduce a runtime option to allow falling back to the
    interpreter, rather than to tx64. Once this is faster, we know we're
    ready to ditch tx64.
    
    Cleanups along the way:
    
      - Start macro-izing the runtime options. For tractability, I only did
        the Eval* runtime options, but the same pattern should work for other
        parts of the hdf namespace.
    
      - const SrcKey& -> SrcKey in a lot of places.
    
      - slightly iron out the handshaking between translate and
        translateTracelet.
  8. Cleaned up some load operations and added a label to LdClsCns.

    alia authored and sgolemon committed Jan 23, 2013
    Added a label to LdClsCns so that we generate better code for
    it if guardStackType refines its type.
    
    Cleaned up some of the load instructions: Removed the NR suffix from
    LdMemNR, LdPropNR, and LdRefNR. Removed unused offset parameter from
    LdMem. Improved docmentation of load instructions and described
    rationale for having labels on some of them.
    
    Renamed CheckUninit to CheckInit to make it consistent with CheckType
    (i.e., branch to label if type is not init).
  9. Check probe limit in HphpArray

    edwinsmith authored and sgolemon committed Dec 12, 2012
    Honor the MaxArrayChain runtime option by raising an error when
    HphpArray probes get too long.  Since HphpArray uses open hashing
    with quadratic probing, we use double the configured threshold,
    which is arbitrary, but based on testing, to reduce false positives.
  10. Make the fixup map unit test use gunit

    jdelong authored and sgolemon committed Jan 19, 2013
    Even before libhphp_runtime is split up it seems like we
    should at least have some kind of way to write some unit tests, when
    appropriate.
Commits on Jan 25, 2013
  1. Update round() to match PHP 5.3.0 - Add mode parameter

    sgolemon committed Jan 25, 2013
    Adds third parameter to round() function
    for alternate rounding.
Commits on Jan 24, 2013