Switch branches/tags
Commits on Mar 29, 2013
  1. Support unreleased LLVM 3.3 using svn trunk

    LLVM 3.3 is still not released. So, note that LLVM's API may change further and
    break buidling Rubinius with LLVM 3.3.
    committed Mar 28, 2013
  2. Merge pull request #2244 from ryoqun/dibuilder-memory-leak

    Plug memory leaks of DIBuilder
    dbussink committed Mar 29, 2013
  3. Plug memory leaks of DIBuilder

    Checked with LLVM 3.0, 3.1, 3.2, 3.3
    committed Mar 28, 2013
Commits on Mar 28, 2013
  1. Use set inflated header helper where appropriate

    We can use the set_inflated_header method in these two places instead of
    writing the same code manually.
    dbussink committed Mar 28, 2013
  2. Use inflation functions consistently

    We don't pass down the objectmemory to other similar methods, so don't
    do it for this one either. Also move find_index to the header so it can
    be inlined in places where it's used.
    dbussink committed Mar 28, 2013
  3. Make error message more explicit about what the problem is

    Apparently it still wasn't clear what the issue was, given we still got
    issues opened on this problem. Make it even more explicit so people
    hopefully read it all now and know how to solve it.
    dbussink committed Mar 28, 2013
  4. Switch to LLVM 3.2 as the default for prebuilts

    There are now prebuilt LLVM images for OS X 10.6, 10.7, 10.8 and Linux
    versions based on GCC 4.1, 4.2, 4.3, 4.4, 4.5, 4.6 and 4.7, both for
    i686 and x86_64 architectures. This should cover most of the systems
    that people use.
    dbussink committed Mar 28, 2013
  5. Fix building for LLVM from source

    Also removes old unused debugging tasks and uses system() like Daedalus
    dbussink committed Mar 28, 2013
  6. Don't include llvm/Module.h twice

    committed Mar 28, 2013
Commits on Mar 27, 2013
  1. Increase default IOBuffer size to 32k

    Results in another significant performance increase for, since
    it has to flush the buffer fewer times.
    dbussink committed Mar 27, 2013
  2. Introduce ByteArray::create_dirty and use where safe

    This allocates a ByteArray without zero'ing all the memory. This is for
    example useful when used in String::create, where the memory will be
    overwritten anyway. Other cases are where ByteArray used as backing
    store for Bignum and Regexp.
    dbussink committed Mar 27, 2013
  3. Use a larger stack buffer when filling IOBuffer

    Increases performance of reading IO, for example for
    dbussink committed Mar 27, 2013
  4. Clear all allocated bytes in ByteArray::create

    This makes sure there are no non zero bytes in the resulting memory,
    which could result in information leakage for example that people would
    not expect.
    dbussink committed Mar 27, 2013
  5. Ensure that the saved TZ is actually 0 terminated

    Valgrind caught this by marking it as an uninitialized jump, because
    strcmp was used later on.
    dbussink committed Mar 27, 2013
  6. Remove unneeded OnStack in VariableScope

    The original problem was not due to the variable not being marked
    OnStack, but because of another initialization ordering issue. This was
    added during debugging, but should have been removed before committing
    the code.
    dbussink committed Mar 27, 2013
  7. Merge pull request #2232 from YorickPeterse/master

    Fix for retrieving UnboundMethod parameters
    dbussink committed Mar 27, 2013
  8. Use a general reference check, not only cTrue

    There shouldn't be any other immediates set than cTrue, but using a
    reference check is a better match for the needed behavior and would
    prevent a crash if anyone manages to set another immediate.
    dbussink committed Mar 27, 2013
  9. Merge pull request #2239 from ryoqun/finalizer-gc-crash

    Fix Crash with ObjectSpace.define_finalizer(obj)
    committed Mar 27, 2013
Commits on Mar 26, 2013
  1. Merge pull request #2238 from stouset/getbyte-gets-bytes-not-chars

    StringIO#getbyte should work in terms of bytes rather than characters
    carlosgaldino committed Mar 26, 2013
  2. Fix Crash with ObjectSpace.define_finalizer(obj)

    This code produces a crash:
        class Foo
          def __finalize__
        foo =
    When run:
        CRASH: A fatal error has occurred.
    ObjectSpace.define_finalizer stores cTrue as a finalizer placeholder in this
    case. And when GC runs, it doesn't consider there may be immediates and
    dereferences that cTrue. Thereby, a crash is waiting for you. :p
    committed Mar 26, 2013
  3. Define getbyte in terms of bytes

    stouset committed Mar 26, 2013
  4. Add failing specs for issue #2215

    stouset committed Mar 26, 2013
  5. Don't return before waking up condition

    Fixes #2220
    dbussink committed Mar 26, 2013
  6. Don't setup GC state around waiting for JIT requests in sync mode

    The JIT thread itself managed the GC state of LLVMState, so we shouldn't
    interfere with that logic from the compile_soon logic that actually gets
    executed by another thread.
    Fixes #2226
    dbussink committed Mar 26, 2013
  7. Make StringIO operations byte based

    StringIO works like an IO object and basically operates on strings as
    them being byte arrays without encodings. This fixes a bunch of test
    failures on Nokogiri as well, which uses a StringIO internally and got
    results back with the wrong encoding.
    Also fixes #2163 because the wrong encoding came out, because the
    encoding aware methods used in StringIO before would change the encoding
    if a ASCII-8BIT string was written to the StringIO. With this change,
    they retain the original encoding, so things come out in the right
    encoding from Nokogiri.
    dbussink committed Mar 26, 2013
  8. Prevent having to search twice when adding handle to slow handle set

    This uses the return value of the insert to determine if the value was
    already in the set or not, so we only reference it if it was newly
    dbussink committed Mar 26, 2013
  9. Use std::set since it never invalidates on insert()

    When flushing handles, it can happen that new handles are added to the
    set. This mainly happens for cases where we flush an RArray handle,
    because that also gets handles for all elements in the array.
    std::tr1::unordered_set doesn't give the insert guarantees we need,
    Iterator validity
    On most cases, all iterators in the container remain valid after the
    insertion. The only exception being when the growth of the container
    forces a rehash. In this case, all iterators in the container are
    So if a rehash is forced, all iterators are invalid. This means we have
    undefined behavior that can result for example in crashes (which was
    happening in the Nokogiri test suite for example).
    std::set explicitly states it doesn't affect iterator validity, so it
    doesn't suffer from this problem. The downside is less performant
    insert() but there isn't really another option without redoing this
    dbussink committed Mar 26, 2013
  10. Merge pull request #2235 from ryoqun/valgrind-error-hits

    Set hits to 0 for inline block's JITMethodInfo
    dbussink committed Mar 26, 2013
  11. Set hits to 0 for inline block's JITMethodInfo

    This fixes the following valgrind error:
        ==13303== Thread 4:
        ==13303== Conditional jump or move depends on uninitialised value(s)
        ==13303==    at 0x7826ED: rubinius::Inliner::inline_for_class(rubinius::Class*, int) (inline.cpp:159)
        ==13303==    by 0x782312: rubinius::Inliner::consider_mono() (inline.cpp:35)
        ==13303==    by 0x7A9EFE: rubinius::JITVisit::visit_send_stack(unsigned long, unsigned long) (jit_visit.hpp:1481)
        ==13303==    by 0x7A1CD6: rubinius::VisitInstructions<rubinius::JITVisit>::dispatch(int) (jit_visit.hpp:1565)
        ==13303==    by 0x7A1426: rubinius::jit::Walker::call(rubinius::OpcodeIterator&) (jit_builder.cpp:554)
        ==13303==    by 0x7A11B4: void rubinius::jit::ControlFlowWalker::run<rubinius::jit::Walker>(rubinius::jit::Walker&) (control_flow.hpp:49)
        ==13303==    by 0x79FB30: rubinius::jit::Builder::generate_body() (jit_builder.cpp:591)
        ==13303==    by 0x788576: rubinius::Inliner::emit_inline_block(rubinius::JITInlineBlock*, llvm::Value*) (inline.cpp:648)
        ==13303==    by 0x78809A: rubinius::Inliner::inline_block(rubinius::JITInlineBlock*, llvm::Value*) (inline.cpp:284)
        ==13303==    by 0x7AD231: rubinius::JITVisit::visit_yield_stack(unsigned long) (jit_visit.hpp:2709)
        ==13303==    by 0x7A1E55: rubinius::VisitInstructions<rubinius::JITVisit>::dispatch(int) (instruction_visitors.hpp:62)
        ==13303==    by 0x7A1426: rubinius::jit::Walker::call(rubinius::OpcodeIterator&) (jit_builder.cpp:554)
    This valgrind error is introduced by this commit:
        Don't inline calls for not often called methods
    committed Mar 25, 2013