Permalink
Commits on Sep 4, 2012
  1. Fix JRUBY-6877

    cext object.cpp and struct.cpp require including alloca.h on Solaris
    
    Patch by Clayton O'Neill.
    headius committed Sep 4, 2012
Commits on Sep 1, 2012
  1. * JRUBY-6875 JRuby should load some_path/some_file.jar.rb if some_pat…

    …h/some_file.jar is required and some_path/some_file.jar does not exist.
    
    * Added '.jar.rb' to the suffixes that should be tried for extensions
    donv committed Sep 1, 2012
Commits on Aug 31, 2012
  1. Reenable fast math operations.

    Fast math ops had been disabled some time last year to further 1.9
    compatibility, since several Fixnum operators had differing
    behavior in 1.9 mode. The compiler complexities of making both the
    1.8 and 1.9 paths optimizable were too great at the time, and also
    introduce complexity that will eventually just go away once 1.9
    logic is the only logic.
    
    In order to reenable fast operators without breaking 1.9 mode, I
    opted to remove the bifurcated "19" versions of those Fixnum
    methods that have differing logic in favor of a boolean check to
    do the same. This adds a bit of overhead to all of the operators
    in question, but allows safely enabling fast operators, greatly
    improving the performance of math (as it did before).
    
    This commit also includes a small override for RubyFixnum's
    convertToInteger(String) method, since there's no good reason
    we should have have to do a hard redispatch back to Fixnum when
    all we need is an Integer, regardless of what method is specified.
    headius committed Aug 31, 2012
  2. Merge pull request #275 from qerub/master

    Remove left-over Javadoc params from Java class generator
    headius committed Aug 31, 2012
  3. Remove passing excludes.

    headius committed Aug 31, 2012
  4. Actually fix JRUBY-6872.

    headius committed Aug 31, 2012
  5. Fix JRUBY-6872 and remaining math excludes.

    Behavior of Math.sqrt(Float::NAN) does not match MRI
    headius committed Aug 31, 2012
Commits on Aug 30, 2012
Commits on Aug 29, 2012
  1. Fixes for JRUBY-6632 and other BigDecimal issues.

    JRUBY-6632: BigDecimal.new fails when passed anything but string (Float, BigDecimal, Fixnum)
    
    Also miscellaneous fixes for missing constants, other coercion
    types, and some error handling.
    headius committed Aug 29, 2012
  2. Fix JRUBY-6868

    Exceptions thrown when running with Coverage enabled
    
    * Empty files should add an empty Integer[] array to the coverage
    data "lines" table.
    
    * Negative line numbers should be ignored.
    headius committed Aug 29, 2012
Commits on Aug 28, 2012
  1. Update to 1.8.7_370 stdlib.

    headius committed Aug 28, 2012
  2. Tweaks for #195:

    * Use ENV_JAVA so there's no dependency on 'java' library.
    * Add comment explaining our defaulting to JSE proxy properties
    * Make the same change for 1.8's net/http.
    headius committed Aug 28, 2012
  3. Merge pull request #195 from dekz/master

    Net::HTTP ignores HTTP_PROXY and http.proxyHost
    headius committed Aug 28, 2012
  4. Merge pull request #127 from arkxu/master

    toURI would cause exception when there is special char in the absolute path
    headius committed Aug 28, 2012
Commits on Aug 27, 2012
  1. Fix JRUBY-6859

    java.lang.ArrayIndexOutOfBoundsException when using --profile.api . MAX_PROFILE_METHODS too low?
    
    This was actually fixed already in the 1.7 line in aabfa79 but
    this commit adds a warning (once) and configurable property to
    bump up the max size.
    headius committed Aug 27, 2012
  2. Fix JRUBY-6860

    String#slice on strings with multibyte chars fails
    
    String#slice was missing range checks on the length that would
    prevent walking off the end in unguarded methods it called. Added
    those checks.
    headius committed Aug 27, 2012
  3. Fix JRUBY-6863

    multibyte strings after String#slice get wrong result on String#index(rindex)
    
    Patch and test by Tsuyoshi Yamane <yama.tsuyo@gmail.com>
    headius committed Aug 27, 2012
  4. Fix JRUBY-6865

    JRuby allows invalid attr_accessor (MRI raises exception)
    
    Our test for local variable names (which applies in both JRuby and
    MRI to attr names) did not check for trailing ?. I added that one
    case.
    
    Note that in MRI all of this passes through ID parsing, which has
    logic for checking the type of ID I did not attempt to sort out.
    There are other cases we probably let through that MRI does not.
    
    Test submitted to MRI via ruby/ruby#171
    headius committed Aug 27, 2012
Commits on Aug 26, 2012
Commits on Aug 22, 2012
  1. Fix JRUBY-6827

    ClassCastException with DummyDynamicScope in String#rpartition? with -X+C
    
    String#partition and rpartition need read/write of backref.
    headius committed Aug 22, 2012
  2. Fix JRUBY-6106

    JRuby 1.9 coverage library reports different results than ruby 1.9
    
    I have a basic understanding now of how MRI handles 'coverage'.
    
    Coverage support is turned on by loading the 'coverage' extension.
    This sets a global "rb_coverages" to non-nil, as a Hash.
    
    At parse time, files parsed are added to the coverages hash as
    having 'nil' for all lines. Files parsed before the 'coverage' ext
    is loaded are not added to this hash. This is the first behavioral
    difference in JRuby, since we're just adding lines to coverage for
    any file+line encountered, regardless of whether the file was
    loaded before or after 'coverage' ext loaded. See parse.y,
    "coverage" function, called from yycompile0 to set up the array
    for that file.
    
    At compile time (after parse) code lines get reset to zeros
    whenever that line would potentially trigger a "line" event in
    trace hooks. This is in compile.c in the ADD_TRACE macro.
    Essentially, compile.c adds the tracing logic as it goes only to
    the lines that should trigger a line event, and at the same time
    zeros out that line in the coverages array.
    
    The determination of a "code line" happens in compile.c in the
    iseq_compile_each function, right at the top, where it determines
    the line is a newline.
    
        if (node->flags & NODE_FL_NEWLINE) {
    	ADD_TRACE(ret, nd_line(node), RUBY_EVENT_LINE);
        }
    
    So for every actual NEWLINE node in the AST, the according line in
    the coverages array is reset to zero.
    
    Assuming our set of newline nodes matches MRI's (questionable), it
    should basically mean we just need to do the same zeroing of the
    according line when we construct a NewlineNode in our parser.
    
    The changes I made:
    
    * In ParserSupport.newline_node, call
    ParserConfiguration.coverLine with the appropriate line number
    
    * In ParserConfiguration.coverLine, maintain a growing Integer[]
    as lines are encountered. Zero the line being covered.
    
    * In Parser, at the end of parse associate the filename with that
    Integer[] only if coverage is enabled.
    
    * In CoverageData's LINE event hook, only update lines for files
    that already have an associated Integer[].
    
    This should basically mimic MRI's behavior, modulo any newline
    nodes we're missing (which is an open question).
    
    There are a few places outside newline_node where we create
    newlines. I did not add coverage calls there, because I'm unsure
    if they're intended to be visitable lines or if they're outside of
    normal executable code.
    headius committed Aug 22, 2012
  3. Convert callInit() to use the init callsite, and update some usages o…

    …f callInit to use the variant which takes a ThreadContext
    Wayne Meissner committed Aug 21, 2012
  4. Add RubyClass#getBaseCallSite(int idx) that returns a single callsite…

    … instead of the entire array
    Wayne Meissner committed Aug 21, 2012