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: 19510fac433c
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 13a6c15c4cf5
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Mar 12, 2015

  1. [Truffle] RubyTruffleError should inherit from Exception.

    * So it is not rescued by empty rescue statements.
    eregon committed Mar 12, 2015
    Copy the full SHA
    a3650b3 View commit details
  2. [Truffle] Use the Assumption as a flag, less confusing than callling …

    …isValid() in void context.
    eregon committed Mar 12, 2015
    Copy the full SHA
    13a6c15 View commit details
Original file line number Diff line number Diff line change
@@ -18,21 +18,18 @@ public class ArrayAllocationSite {

public static final boolean ARRAYS_OPTIMISTIC_LONG = Options.TRUFFLE_ARRAYS_OPTIMISTIC_LONG.load();

@CompilerDirectives.CompilationFinal private boolean convertedIntToLong = false;
private final Assumption assumption = Truffle.getRuntime().createAssumption("ArrayAllocationSite");
private final Assumption keepUsingInt = Truffle.getRuntime().createAssumption("ArrayAllocationSite");

@CompilerDirectives.TruffleBoundary
public void convertedIntToLong() {
if (ARRAYS_OPTIMISTIC_LONG) {
convertedIntToLong = true;
assumption.invalidate();
keepUsingInt.invalidate();
}
}

public boolean hasConvertedIntToLong() {
if (ARRAYS_OPTIMISTIC_LONG) {
assumption.isValid();
return convertedIntToLong;
return !keepUsingInt.isValid();
} else {
return false;
}
Original file line number Diff line number Diff line change
@@ -194,13 +194,15 @@ public CoreLibrary(RubyContext context) {
// NoMemoryError
noMemoryErrorClass = defineClass(exceptionClass, "NoMemoryError");

// RubyTruffleError
rubyTruffleErrorClass = defineClass(exceptionClass, "RubyTruffleError");

// StandardError
standardErrorClass = defineClass(exceptionClass, "StandardError");
argumentErrorClass = defineClass(standardErrorClass, "ArgumentError");
ioErrorClass = defineClass(standardErrorClass, "IOError");
localJumpErrorClass = defineClass(standardErrorClass, "LocalJumpError");
regexpErrorClass = defineClass(standardErrorClass, "RegexpError");
rubyTruffleErrorClass = defineClass(standardErrorClass, "RubyTruffleError");
runtimeErrorClass = defineClass(standardErrorClass, "RuntimeError");
threadErrorClass = defineClass(standardErrorClass, "ThreadError");
typeErrorClass = defineClass(standardErrorClass, "TypeError");