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

Commits on Apr 30, 2016

  1. Copy the full SHA
    2a9d1e4 View commit details
  2. Copy the full SHA
    8e6b3d2 View commit details
  3. Copy the full SHA
    b107518 View commit details
  4. [Truffle] Fix DATA handling.

    eregon committed Apr 30, 2016
    Copy the full SHA
    411edb1 View commit details
  5. [Truffle] Fix reference to methods which moved out of the Truffle mod…

    …ule.
    
    * Also fix comment about DATA.
    eregon committed Apr 30, 2016
    Copy the full SHA
    35af9f8 View commit details
4 changes: 2 additions & 2 deletions tool/jruby_eclipse
Original file line number Diff line number Diff line change
@@ -4,15 +4,15 @@

M2REPO = "#{Dir.home}/.m2/repository"

TRUFFLE_VERSION = "0.12"
TRUFFLE_VERSION = "0.13"

TRUFFLEJARS = %W[
com/oracle/truffle/truffle-api/#{TRUFFLE_VERSION}/truffle-api-#{TRUFFLE_VERSION}.jar
com/oracle/truffle/truffle-debug/#{TRUFFLE_VERSION}/truffle-debug-#{TRUFFLE_VERSION}.jar
].map { |jar| "#{M2REPO}/#{jar}" }

SNAKEYAMLJAR = "#{M2REPO}/org/yaml/snakeyaml/1.14/snakeyaml-1.14.jar"
ANTLR4JAR = "#{M2REPO}/org/antlr/antlr4-runtime/4.5/antlr4-runtime-4.5.jar"
ANTLR4JAR = "#{M2REPO}/org/antlr/antlr4-runtime/4.5.1-1/antlr4-runtime-4.5.1-1.jar"

GRAAL_OPTIONS_PREFIX = "graal."

4 changes: 2 additions & 2 deletions truffle/.factorypath
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<factorypath>
<factorypathentry kind="VARJAR" id="M2_REPO/com/oracle/truffle/truffle-api/0.12/truffle-api-0.12.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/oracle/truffle/truffle-dsl-processor/0.12/truffle-dsl-processor-0.12.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/oracle/truffle/truffle-api/0.13/truffle-api-0.13.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/oracle/truffle/truffle-dsl-processor/0.13/truffle-dsl-processor-0.13.jar" enabled="true" runInBatchMode="false"/>
</factorypath>
Original file line number Diff line number Diff line change
@@ -218,17 +218,18 @@ public RubyRootNode parse(RubyContext context, Source source, Encoding defaultEn
truffleNode = new CatchRetryAsErrorNode(context, truffleNode.getSourceSection(), truffleNode);

if (parserContext == ParserContext.TOP_LEVEL_FIRST) {
truffleNode = new TopLevelRaiseHandler(context, sourceSection,
Translator.sequence(context, sourceSection, Arrays.asList(
new SetTopLevelBindingNode(context, sourceSection),
new LoadRequiredLibrariesNode(context, sourceSection),
truffleNode)));
truffleNode = Translator.sequence(context, sourceSection, Arrays.asList(
new SetTopLevelBindingNode(context, sourceSection),
new LoadRequiredLibrariesNode(context, sourceSection),
truffleNode));

if (node.hasEndPosition()) {
truffleNode = Translator.sequence(context, sourceSection, Arrays.asList(
new DataNode(context, sourceSection, node.getEndPosition()),
truffleNode));
}

truffleNode = new TopLevelRaiseHandler(context, sourceSection, truffleNode);
}

return new RubyRootNode(context, truffleNode.getSourceSection(), environment.getFrameDescriptor(), sharedMethodInfo, truffleNode, environment.needsDeclarationFrame());
4 changes: 2 additions & 2 deletions truffle/src/main/ruby/core/shims.rb
Original file line number Diff line number Diff line change
@@ -227,7 +227,7 @@ module Enumerable

ENV_JAVA = {}

# Truffle.get_data is used by RubyContext#execute to prepare the DATA constant
# The translator adds a call to Truffle.get_data to set up the DATA constant

module Truffle
def self.get_data(path, offset)
@@ -237,7 +237,7 @@ def self.get_data(path, offset)
# I think if the file can't be locked then we just silently ignore
file.flock(File::LOCK_EX | File::LOCK_NB)

Truffle.at_exit true do
Truffle::Kernel.at_exit true do
file.flock(File::LOCK_UN)
end

16 changes: 8 additions & 8 deletions truffle/src/main/ruby/core/truffle/debug.rb
Original file line number Diff line number Diff line change
@@ -66,29 +66,29 @@ module Debug
def self.break(file = nil, line = nil, condition = nil)
if line.nil?
raise 'must specify both a file and a line, or neither' unless file.nil?
Truffle.simple_shell
Truffle::Debug.simple_shell
elsif not condition.nil?
Truffle.attach file, line do |binding|
Truffle::Attachments.attach file, line do |binding|
if binding.eval(condition)
Truffle.simple_shell
Truffle::Debug.simple_shell
end
end
elsif block_given?
Truffle.attach file, line do |binding|
Truffle::Attachments.attach file, line do |binding|
if yield binding
Truffle.simple_shell
Truffle::Debug.simple_shell
end
end
else
Truffle.attach file, line do |binding|
Truffle.simple_shell
Truffle::Attachments.attach file, line do |binding|
Truffle::Debug.simple_shell
end
end
end

# Remove a breakpoint set in {#break}.
def self.clear(file, line)
Truffle.detach file, line
Truffle::Attachments.detach file, line
end

end