Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7d26b4b2027c
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3d510ea9d103
Choose a head ref

Commits on Jan 26, 2015

  1. Copy the full SHA
    ed6ccf7 View commit details
  2. 2
    Copy the full SHA
    a4686d8 View commit details
  3. Copy the full SHA
    c9ae6ab View commit details

Commits on Jan 27, 2015

  1. 3
    Copy the full SHA
    9549565 View commit details
  2. 1
    Copy the full SHA
    17be927 View commit details
  3. 4
    Copy the full SHA
    0919714 View commit details
  4. [Truffle] Use a ThreadPassNode directly rather than resolving constan…

    …t and such.
    
    * Notably did not work if inside BasicObject.
    eregon committed Jan 27, 2015
    2
    Copy the full SHA
    0f550c5 View commit details
  5. Copy the full SHA
    a12b6f1 View commit details
  6. Copy the full SHA
    20dad68 View commit details
  7. Copy the full SHA
    0251509 View commit details
  8. [Truffle] JT: Add test pe

    eregon committed Jan 27, 2015
    Copy the full SHA
    9bf06cf View commit details
  9. Copy the full SHA
    e8a0f1d View commit details
  10. Copy the full SHA
    2840563 View commit details
  11. Copy the full SHA
    27e480c View commit details
  12. Copy the full SHA
    737a821 View commit details
  13. RubySpec: fix bad spec defining X on Object.

    * It caused an error as X might already be defined,
      such as by the lambda spec in language.
    eregon committed Jan 27, 2015
    Copy the full SHA
    5b1fad2 View commit details
  14. Copy the full SHA
    f3dcd90 View commit details
  15. [Truffle] Fix bug due to bad Specialization chosen as UndefinedPlaceh…

    …older is an Object ...
    eregon committed Jan 27, 2015
    Copy the full SHA
    fc569f0 View commit details
  16. Copy the full SHA
    1befb7b View commit details
  17. Copy the full SHA
    6d9344c View commit details
  18. Copy the full SHA
    4d98439 View commit details
  19. Uh...

    headius committed Jan 27, 2015
    Copy the full SHA
    c601151 View commit details
  20. Copy the full SHA
    0d080fc View commit details
  21. Merge pull request #2526 from Who828/local_variables_bug

    Fixed a bug with local_variables ordering and duplicate variables
    enebo committed Jan 27, 2015
    Copy the full SHA
    7713b6b View commit details
  22. Hack to make package-info.java emit a dummy class.

    ...to avoid recompiling it every time.
    headius committed Jan 27, 2015
    Copy the full SHA
    09721d6 View commit details
  23. Copy the full SHA
    dbdfc4e View commit details
  24. Copy the full SHA
    576ecb3 View commit details
  25. Copy the full SHA
    4f534b8 View commit details

Commits on Jan 28, 2015

  1. Copy the full SHA
    ccb45cc View commit details
  2. Merge pull request #2530 from Who828/local_variables_bug

    Forgot to match the order of JRuby local variables spec to MRI
    headius committed Jan 28, 2015
    Copy the full SHA
    d12289e View commit details
  3. make the regular classloader load path default again

    add an option which allows to switch to a self-first strategy which might
    be able to solve some classloader conflicts.
    
    keep the old tests using the switch to use the SelfFirstClassLoader
    mkristian committed Jan 28, 2015
    3
    Copy the full SHA
    580bd4e View commit details
  4. Copy the full SHA
    33c7f7e View commit details
  5. [Truffle] deduplicate getKeywordsHash into RubyArguments

    To reduce duplicate code between CheckArityNode, ReadKeywordArgumentNode,
    ReadKeywordRestArgumentNode move the getKeywordsHash method into
    RubyArguments - where all the other argument helper functions live.
    mswart committed Jan 28, 2015
    Copy the full SHA
    2caf50c View commit details
  6. Merge pull request #2532 from mswart/dedubGetKeywordsHash

    [Truffle] deduplicate getKeywordsHash into RubyArguments
    chrisseaton committed Jan 28, 2015
    Copy the full SHA
    451fb60 View commit details
  7. Copy the full SHA
    4ef07df View commit details
  8. Copy the full SHA
    bb93b3e View commit details
  9. Copy the full SHA
    9c45c23 View commit details
  10. Copy the full SHA
    d947caa View commit details
  11. Copy the full SHA
    88e9106 View commit details
  12. Copy the full SHA
    3d510ea View commit details
Showing with 4,511 additions and 4,108 deletions.
  1. +0 −1 .travis.yml
  2. +11 −0 core/pom.rb
  3. +26 −0 core/pom.xml
  4. +8 −2 core/src/main/java/org/jruby/Ruby.java
  5. +24 −0 core/src/main/java/org/jruby/RubyInstanceConfig.java
  6. +15 −5 core/src/main/java/org/jruby/RubyKernel.java
  7. +1 −0 core/src/main/java/org/jruby/ir/IRScope.java
  8. +12 −3 core/src/main/java/org/jruby/lexer/yacc/RubyLexer.java
  9. 0 core/src/main/java/org/jruby/parser/Ruby19.java
  10. +382 −373 core/src/main/java/org/jruby/parser/RubyParser.java
  11. +10 −5 core/src/main/java/org/jruby/parser/RubyParser.y
  12. +3,495 −3,423 core/src/main/java/org/jruby/parser/YyTables.java
  13. +1 −0 core/src/main/java/org/jruby/runtime/profile/builtin/package-info.java
  14. +1 −0 core/src/main/java/org/jruby/runtime/profile/package-info.java
  15. +0 −22 core/src/main/java/org/jruby/util/JRubyClassLoader.java
  16. +61 −0 core/src/main/java/org/jruby/util/SelfFirstJRubyClassLoader.java
  17. +3 −0 core/src/main/java/org/jruby/util/cli/Options.java
  18. +5 −0 lib/pom.xml
  19. +4 −0 ...by-complete/src/it/bouncycastle-with-bc-gem/src/test/java/org/jruby/its/BouncyCastleTestCase.java
  20. +1 −1 maven/jruby-complete/src/it/bouncycastle/pom.xml
  21. +6 −2 maven/jruby-complete/src/it/bouncycastle/src/test/java/org/jruby/its/BouncyCastleTestCase.java
  22. +6 −2 maven/jruby/src/it/bouncycastle-with-bc-gem/src/test/java/org/jruby/its/BouncyCastleTestCase.java
  23. +4 −0 maven/jruby/src/it/bouncycastle/src/test/java/org/jruby/its/BouncyCastleTestCase.java
  24. +7 −3 spec/ruby/core/float/shared/equal.rb
  25. +1 −0 spec/truffle/tags/rubysl/rubysl-set/spec/constructor_tags.txt
  26. +2 −0 spec/truffle/tags/rubysl/rubysl-set/spec/initialize_tags.txt
  27. +6 −1 spec/truffle/truffle.mspec
  28. +2 −2 test/jruby/test_kernel.rb
  29. +0 −2 test/mri/excludes/TestVariable.rb
  30. +0 −5 tool/jrubytruffle
  31. +14 −3 tool/jt.rb
  32. +3 −7 truffle/pom.rb
  33. +3 −13 truffle/pom.xml
  34. +2 −7 truffle/src/main/java/org/jruby/truffle/TruffleBridgeImpl.java
  35. +0 −1 truffle/src/main/java/org/jruby/truffle/nodes/RubyCallNode.java
  36. +32 −45 truffle/src/main/java/org/jruby/truffle/nodes/RubyNode.java
  37. +11 −0 truffle/src/main/java/org/jruby/truffle/nodes/RubyRootNode.java
  38. +2 −10 truffle/src/main/java/org/jruby/truffle/nodes/control/TraceNode.java
  39. +11 −6 truffle/src/main/java/org/jruby/truffle/nodes/core/ArrayNodes.java
  40. +10 −8 truffle/src/main/java/org/jruby/truffle/nodes/core/FileNodes.java
  41. +1 −1 truffle/src/main/java/org/jruby/truffle/nodes/core/FloatNodes.java
  42. +10 −2 truffle/src/main/java/org/jruby/truffle/nodes/core/StringNodes.java
  43. +6 −9 truffle/src/main/java/org/jruby/truffle/nodes/core/ThreadNodes.java
  44. +46 −0 truffle/src/main/java/org/jruby/truffle/nodes/core/ThreadPassNode.java
  45. +22 −7 truffle/src/main/java/org/jruby/truffle/nodes/core/TrufflePrimitiveNodes.java
  46. +37 −0 truffle/src/main/java/org/jruby/truffle/nodes/instrument/RubyDefaultASTProber.java
  47. +5 −14 truffle/src/main/java/org/jruby/truffle/nodes/instrument/RubyWrapperNode.java
  48. +14 −22 truffle/src/main/java/org/jruby/truffle/nodes/methods/arguments/CheckArityNode.java
  49. +1 −15 truffle/src/main/java/org/jruby/truffle/nodes/methods/arguments/ReadKeywordArgumentNode.java
  50. +1 −17 truffle/src/main/java/org/jruby/truffle/nodes/methods/arguments/ReadKeywordRestArgumentNode.java
  51. +0 −25 truffle/src/main/java/org/jruby/truffle/runtime/InternalName.java
  52. +17 −0 truffle/src/main/java/org/jruby/truffle/runtime/RubyArguments.java
  53. +0 −26 truffle/src/main/java/org/jruby/truffle/runtime/RubyCallStack.java
  54. +19 −7 truffle/src/main/java/org/jruby/truffle/runtime/RubyContext.java
  55. +1 −3 truffle/src/main/java/org/jruby/truffle/runtime/RubyOperations.java
  56. +3 −1 truffle/src/main/java/org/jruby/truffle/runtime/backtrace/MRIBacktraceFormatter.java
  57. +4 −3 truffle/src/main/java/org/jruby/truffle/runtime/core/RubyBasicObject.java
  58. +1 −1 truffle/src/main/java/org/jruby/truffle/runtime/signal/ProcSignalHandler.java
  59. +1 −1 truffle/src/main/java/org/jruby/truffle/runtime/subsystems/SafepointManager.java
  60. +81 −0 truffle/src/main/java/org/jruby/truffle/runtime/subsystems/StackServerManager.java
  61. +45 −0 truffle/src/main/java/org/jruby/truffle/runtime/util/FileUtils.java
  62. +14 −2 truffle/src/main/java/org/jruby/truffle/translator/BodyTranslator.java
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -69,7 +69,6 @@ matrix:
- env: PHASE='-Pcomplete'
- env: PHASE='-Prake -Dtask=spec:jrubyc'
- env: PHASE='-Prake -Dtask=spec:profiler'
- env: PHASE='-Ptruffle-specs-rubysl'
- env: COMMAND=tool/truffle-findbugs.sh

branches:
11 changes: 11 additions & 0 deletions core/pom.rb
Original file line number Diff line number Diff line change
@@ -245,6 +245,17 @@
end


plugin :shade do
execute_goals( 'shade',
:id => 'create lib/jruby.jar',
:phase => 'package',
'relocations' => [ { 'pattern' => 'org.objectweb',
'shadedPattern' => 'org.jruby.org.objectweb' } ],
'outputFile' => '${jruby.basedir}/lib/jruby.jar',
'transformers' => [ { '@implementation' => 'org.apache.maven.plugins.shade.resource.ManifestResourceTransformer',
'mainClass' => 'org.jruby.Main' } ] )
end

[ :osgi, :dist, :'jruby-jars', :main, :all, :complete, :release, :jruby_complete_jar_extended ].each do |name|
profile name do
plugin :shade do
26 changes: 26 additions & 0 deletions core/pom.xml
Original file line number Diff line number Diff line change
@@ -528,6 +528,32 @@
</additionalClasspathElements>
</configuration>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>pack lib/jruby.jar</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<relocations>
<relocation>
<pattern>org.objectweb</pattern>
<shadedPattern>org.jruby.org.objectweb</shadedPattern>
</relocation>
</relocations>
<outputFile>${jruby.basedir}/lib/jruby.jar</outputFile>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.jruby.Main</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
10 changes: 8 additions & 2 deletions core/src/main/java/org/jruby/Ruby.java
Original file line number Diff line number Diff line change
@@ -141,6 +141,7 @@
import org.jruby.util.ByteList;
import org.jruby.util.DefinedMessage;
import org.jruby.util.JRubyClassLoader;
import org.jruby.util.SelfFirstJRubyClassLoader;
import org.jruby.util.IOInputStream;
import org.jruby.util.IOOutputStream;
import org.jruby.util.ClassDefininngJRubyClassLoader;
@@ -904,7 +905,7 @@ public synchronized TruffleBridge getTruffleBridge() {
*/

try {
Class<?> clazz = getClass().getClassLoader().loadClass("org.jruby.truffle.TruffleBridgeImpl");
Class<?> clazz = getJRubyClassLoader().loadClass("org.jruby.truffle.TruffleBridgeImpl");
Constructor<?> con = clazz.getConstructor(Ruby.class);
truffleBridge = (TruffleBridge) con.newInstance(this);
truffleBridge.init();
@@ -2582,7 +2583,12 @@ public static ClassLoader getClassLoader() {
public synchronized JRubyClassLoader getJRubyClassLoader() {
// FIXME: Get rid of laziness and handle restricted access elsewhere
if (!Ruby.isSecurityRestricted() && jrubyClassLoader == null) {
jrubyClassLoader = new JRubyClassLoader(config.getLoader());
if (config.isSelfFirstClassLoader()){
jrubyClassLoader = new SelfFirstJRubyClassLoader(config.getLoader());
}
else {
jrubyClassLoader = new JRubyClassLoader(config.getLoader());
}

// if jit code cache is used, we need to add the cache directory to the classpath
// so the previously generated class files can be reused.
24 changes: 24 additions & 0 deletions core/src/main/java/org/jruby/RubyInstanceConfig.java
Original file line number Diff line number Diff line change
@@ -1227,6 +1227,28 @@ public boolean isNativeEnabled() {
return _nativeEnabled;
}

/**
* Set whether to use the self-first jruby classloader.
*
* @see Options#SELF_FIRST_CLASS_LOADER
*
* @param b new value indicating whether self-first classloader is used
*/
public void setSelfFirstClassLoader(boolean b) {
_selfFirstClassLoader = b;
}

/**
* Get whether to use the self-first jruby classloader.
*
* @see Options#SELF_FIRST_CLASS_LOADER
*
* @return true if self-first classloader is used; false otherwise.
*/
public boolean isSelfFirstClassLoader() {
return _selfFirstClassLoader;
}

/**
* @see Options#CLI_STRIP_HEADER
*/
@@ -1472,6 +1494,7 @@ public void setProfilingService( String service ) {
* Whether native code is enabled for this configuration.
*/
private boolean _nativeEnabled = NATIVE_ENABLED;
private boolean _selfFirstClassLoader = SELF_FIRST_CLASS_LOADER;

private TraceType traceType =
TraceType.traceTypeFor(Options.BACKTRACE_STYLE.load());
@@ -1674,6 +1697,7 @@ public boolean shouldPrecompileAll() {
* Set with the <tt>jruby.native.enabled</tt> system property.
*/
public static final boolean NATIVE_ENABLED = Options.NATIVE_ENABLED.load();
public static final boolean SELF_FIRST_CLASS_LOADER = Options.SELF_FIRST_CLASS_LOADER.load();

@Deprecated
public final static boolean CEXT_ENABLED = false;
20 changes: 15 additions & 5 deletions core/src/main/java/org/jruby/RubyKernel.java
Original file line number Diff line number Diff line change
@@ -60,6 +60,7 @@
import org.jruby.runtime.Helpers;
import org.jruby.runtime.ThreadContext;
import org.jruby.runtime.Visibility;
import org.jruby.runtime.DynamicScope;
import org.jruby.runtime.backtrace.RubyStackTraceElement;
import org.jruby.runtime.builtin.IRubyObject;
import org.jruby.runtime.load.IAutoloadMethod;
@@ -76,6 +77,7 @@
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Map;

import static org.jruby.RubyEnumerator.enumeratorizeWithSize;
@@ -762,13 +764,21 @@ public static RubyArray local_variables(ThreadContext context, IRubyObject recv)
@JRubyMethod(name = "local_variables", module = true, visibility = PRIVATE)
public static RubyArray local_variables19(ThreadContext context, IRubyObject recv) {
final Ruby runtime = context.runtime;
RubyArray localVariables = runtime.newArray();

for (String name: context.getCurrentScope().getAllNamesInScope()) {
if (IdUtil.isLocal(name)) localVariables.append(runtime.newSymbol(name));
HashSet<String> encounteredLocalVariables = new HashSet<String>();
RubyArray allLocalVariables = runtime.newArray();
DynamicScope currentScope = context.getCurrentScope();

while (currentScope != null) {
for (String name : currentScope.getStaticScope().getVariables()) {
if (IdUtil.isLocal(name) && !encounteredLocalVariables.contains(name)) {
allLocalVariables.push(runtime.newSymbol(name));
encounteredLocalVariables.add(name);
}
}
currentScope = currentScope.getParentScope();
}

return localVariables;
return allLocalVariables;
}

public static RubyBinding binding(ThreadContext context, IRubyObject recv, Block block) {
1 change: 1 addition & 0 deletions core/src/main/java/org/jruby/ir/IRScope.java
Original file line number Diff line number Diff line change
@@ -1026,6 +1026,7 @@ public Operand[] getCallArgs() {

// We have two paths. eval and non-eval.
if (instrList == null) { // CFG already made. eval has zsuper and we walk back to some executing method/script
// FIXME: Need to verify this can never re-order recvs in a way to swap order to zsuper
for (BasicBlock bb: getCFG().getBasicBlocks()) {
for (Instr instr: bb.getInstrs()) {
extractCallOperands(callArgs, keywordArgs, instr);
15 changes: 12 additions & 3 deletions core/src/main/java/org/jruby/lexer/yacc/RubyLexer.java
Original file line number Diff line number Diff line change
@@ -260,7 +260,7 @@ public enum Keyword {

public enum LexState {
EXPR_BEG, EXPR_END, EXPR_ARG, EXPR_CMDARG, EXPR_ENDARG, EXPR_MID,
EXPR_FNAME, EXPR_DOT, EXPR_CLASS, EXPR_VALUE, EXPR_ENDFN
EXPR_FNAME, EXPR_DOT, EXPR_CLASS, EXPR_VALUE, EXPR_ENDFN, EXPR_LABELARG
}

public static Keyword getKeyword(String str) {
@@ -329,6 +329,7 @@ public void newtok() {
private int braceNest = 0;

private int leftParenBegin = 0;
public boolean inKwarg = false;

public int incrementParenNest() {
parenNest++;
@@ -510,7 +511,8 @@ private boolean isNext_identchar() throws IOException {

private boolean isBEG() {
return lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID ||
lex_state == LexState.EXPR_CLASS || (lex_state == LexState.EXPR_VALUE);
lex_state == LexState.EXPR_CLASS || lex_state == LexState.EXPR_VALUE ||
lex_state == LexState.EXPR_LABELARG;
}

private boolean isEND() {
@@ -1160,6 +1162,13 @@ private int yylex() throws IOException {
case EXPR_BEG: case EXPR_FNAME: case EXPR_DOT:
case EXPR_CLASS: case EXPR_VALUE:
continue loop;
case EXPR_LABELARG:
if (inKwarg) {
commandStart = true;
setState(LexState.EXPR_BEG);
return '\n';
}
continue loop;
}

boolean done = false;
@@ -1816,7 +1825,7 @@ private int identifier(int c, boolean commandState) throws IOException {
if (isLabelPossible(commandState)) {
int c2 = src.read();
if (c2 == ':' && !src.peek(':')) {
setState(LexState.EXPR_BEG);
setState(LexState.EXPR_LABELARG);
yaccValue = tempVal;
return Tokens.tLABEL;
}
Empty file.
Loading