Permalink
Switch branches/tags
Commits on Nov 7, 2013
  1. Remove Cext support.

    headius committed Nov 7, 2013
  2. Eliminate LoadService19.

    headius committed Nov 7, 2013
Commits on Nov 6, 2013
Commits on Nov 5, 2013
  1. Turn off ObjectProxyCache for 9k.

    headius committed Nov 5, 2013
    ObjectProxyCache names a weak map used by JRuby to attempt to use
    the same wrapper for a given Java object every time it enters Ruby
    space. This was also intended to guarantee that the instance vars
    and singleton class associated with a Java object would be
    preserved even if the Java object left Ruby and came back.
    
    In practice, the cache added significant overhead to all callouts
    to Java, since each call returning a non-coercible object must
    trigger a proxy wrapper search. It also did not guarantee that
    ivars and singletons would be preserved if the Java object left
    Ruby space, since the cache must be weak. It only guaranteed that
    the same Java object re-entering Ruby without any chance for the
    proxy wrapper to go away would get the same proxy wrapper.
    
    In JRuby 1.7 we began to deprecate the ObjectProxyCache, adding
    a mechanism to opt-in rather than imposing that overhead on all
    Java types called from Ruby. This commit proceeds from that
    deprecation to disable ObjectProxyCache by default.
  2. Centrally prep args for calls/yields

    dmarcotte committed Nov 5, 2013
    Refactor to ensure at the BlockBody level that args are properly prepped
    for calls and yields (arity checking for lambdas, arity trimming
    for other blocks).  This doesn't guarantee all calling codepaths are
    covered (an irresponsible override of some of BlockBody's methods can
    get around it), but definitely moves in the right direction.
    
    This lets us delete some ad-hoc prepping we were doing, and fills some
    gaps where args should have been prepped but were not (so, for instance,
    we can untag the Enumerable#any test now that its block args are being
    treated correctly).
  3. Merge with 1.7

    enebo committed Nov 5, 2013
Commits on Nov 4, 2013
  1. Remove vestigial RubyParserPool. Next possible re-use scenario would …

    enebo committed Nov 4, 2013
    …be to put Parser instance on TC
  2. Minimum to remove 1.9 parser

    enebo committed Nov 4, 2013
  3. Huzzah...Annotation for marking which methods are acceptable to be us…

    enebo committed Nov 4, 2013
    …ed by Java native extensions...now to start annotating those methods...
  4. Merge pull request #1200 from dmarcotte/arg-arrays

    enebo committed Nov 4, 2013
    Do not wrap arg arrays in RubyArrays prematurely
Commits on Nov 3, 2013
  1. Do not wrap arg arrays in RubyArrays prematurely

    dmarcotte committed Oct 22, 2013
    This refactor makes it easier for deeper calls to determine exactly
    what their args looks like (when transformed into a RubyArray too soon,
    it was hard for yielders to tell if you have multiple args,
    or one array arg)
    
    This lets us clean up a few places which were adding extra logic to deal
    with that ambiguity, and positions us to start applying
    RubyProc.prepareProcArgs more centrally (all proc calls need that logic
    applied, but it is currently not enforced in some places)
Commits on Nov 2, 2013
  1. Merge pull request #1028 from prathamesh-sonpatki/rename-vertex-for

    enebo committed Nov 2, 2013
    change vertexFor to findOrCreateVertexFor
  2. [IR] Work around incorrect scope depths in AST local var nodes

    subbuss committed Nov 2, 2013
    * AST doesn't seem to be implementing shadowing properly and
      sometimes has the wrong depths which screws up variable access.
    
      Check scope depths for 'a' in the closure in the following snippet:
          "a = 1; foo(1) { |(a)| a }"
      In "(a)", it is 0 (correct), but in the body, it is 1 (incorrect)
    
    * So, we implement shadowing in IRClosure by searching for an
      existing local var from depth 0 and upwards and setting
      scopeDepth to not what AST gives us but based on where we
      found the variable.
    
    * We could either decide to leave this shadowing implementation in
      place or rely on AST (in which case this has to be fixed in
      the AST node).
    
    * This patch fixes the output for this snippet and eliminates
      mspec failures for spec/ruby/language/block_spec.rb
    
    def foo(x); yield x; end
    a = 5
    puts foo(2) { |(a)| a }
Commits on Nov 1, 2013
  1. [IR] Bug fix in ensure handling for Unrescuable exceptions

    subbuss committed Nov 1, 2013
    * Adding back missing Label instructions in a couple cases
      that were missing them -- bug introduced in c73cc11 and
      patches that modified break and non-local return handling.
    
    * We currently build IR wherein we effectively require ensure
      exceptions to go through any intervening rescue block. This
      works great for regular exceptions. However, the interpreter
      had a bypass for Unrescuable and attempted to jump to the
      ensure block directly. However, this bypass breaks down in
      certain nested region scenarios. This bug was exposed by the
      break/non-local-return handling changes made in c73cc11 and
      related patches and is demonstrated by the following snippet:
    -----------------------------------------------------------------
    def foo
      loop do
        if true
          return 2
        end
    
        break 1
      end
    end
    
    puts foo
    -----------------------------------------------------------------
    BB [1:LBL_6]
    BB [2:LBL_7]
    	%self = recv_self
    	check_arity(0, 0, -1)
    	%block(0:0) = recv_closure
    	thread_poll
    	line_num(1)
    BB [4:LBL_0]
    	%v_0 = call(FUNCTIONAL, 'loop', %self, [], &Closure _CLOSURE_1[-:1])
    	jump LBL_1
    BB [5:LBL_2]
    	%v_1 = recv_exception
    	%v_0 = runtime_helper(handlePropagatedBreak, [%v_1])
    BB [6:LBL_1]
    	return(%v_0)
    BB [7:LBL_5]
    	%v_0 = recv_exception [no-typecheck]
    	%v_1 = runtime_helper(handleNonlocalReturn, [%v_0])
    	return(%v_1)
    BB [9:LBL_8]
    
    ------ Rescue block map ------
    BB 2 --> BB 7
    BB 5 --> BB 7
    BB 4 --> BB 5
    
    ------ Ensure block map ------
    BB 5 --> BB 7
    
    -----------------------------------------------------------------
    
      In this code, the non-local return in the loop causes an
      IRReturnJump (instanceof Unrescuable) to be thrown the closure
      corresponding to 'loop do ... end'. The body of 'foo' has
      a rescue block for the IRBreakJump it will receive from loop
      and an ensure block for the IRReturnJump it will receive from loop.
    
      At runtime, the interpreter tries to find an ensure block for the
      IRReturnJump that propagates up to 'foo'. But, it doesn't find out
      find one because the ensure map is setup assuming that all exceptions
      go through any inner rescue blocks -- and there is one to deal with
      the IRBreakJump (BB 4 --> BB 5)
    
      Note that this bug is not specific to break/returns -- it could
      have been triggered by other Unrescuables used in the JRuby runtime
      (ThreadExit, Continuation, etc.)
    
      This bug was exposed by crashing spec run for
      spec/ruby/library/csv/parse_spec.rb
    
    * This patch fixes the bug by eliminating the bypass in the interpreter
      and routing all exceptions through any inner rescue blocks. However,
      Unrescuable types should bail immediately on entry and rethrow the
      exception for non-ensure blocks.
    
      This detection has currently been done in a hacky way (with a bunch of
      FIXMEs in IRBuilder.java and Interpreter.java) by using an existing
      checkType flag in ReceiveExceptionInstr.java but we could probably make
      the semantics explicit by one of (a) renaming the field (b) using a
      different flag to indicate that the instruction can deal with Unrescuables
      (c) a new instruction (d) additional explicit IR instructions with these
      checks. To be decided what the most appropriate solution is.
    
    * One additional benefit of eliminating the bypass is that we no longer
      need the ensure map -- the rescue map has all information required for
      both rescues and ensures. To be cleaned up.
    
    * But for now, this patch fixes the execution of the snippet
      above and lets the rspec proceed till the end, but it currently
      crashes while reporting failures (could be a related or a
      different bug/regression introduced sometime in the last year).
Commits on Oct 31, 2013
  1. Merge branch 'jruby-1_7'

    headius committed Oct 31, 2013
  2. Strip down ant build a bit and get travis working again.

    headius committed Oct 31, 2013
    * Remove dist.xml and anything that references it.
    * Remove gem installing targets, replaced with bootstrap target.
    * Fix spec and test targets to depend on bootstrap.
  3. Bump joni to 2.1.0.

    headius committed Oct 31, 2013
  4. Merge branch 'jruby-1_7'

    headius committed Oct 31, 2013
    Conflicts:
    	test/pom.xml
  5. Rework how and when gems are installed during build.

    headius committed Oct 31, 2013
    * Base build (package with no profile): jruby-launcher installed
      as part of jruby-core
    * Bootstrap build (-Pbootstrap package): rake, rdoc, minitest,
      minitest-excludes, rspec installed for dev use
  6. Revert "Remove pre-rake-call build since rake test:extended runs a bu…

    headius committed Oct 31, 2013
    …ild."
    
    This reverts commit c1a7f80.