Skip to content

Commit

Permalink
Merge branch 'master' into truffle-head
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisseaton committed Jan 30, 2015
2 parents ec5b7a3 + 0a6a2b9 commit 6ee6976
Show file tree
Hide file tree
Showing 65 changed files with 758 additions and 149 deletions.
2 changes: 1 addition & 1 deletion bin/ast
Expand Up @@ -193,7 +193,7 @@ def ir_setup(root)

builder = org.jruby.ir.IRBuilder

scope = builder.new(manager).build_root(root)
scope = builder.build_root(manager, root)
passes = manager.get_compiler_passes(scope)
[scope, passes]
end
Expand Down
Empty file modified bin/jruby.bat 100644 → 100755
Empty file.
Empty file modified bin/jruby.dll 100644 → 100755
Empty file.
Empty file modified bin/jruby.exe 100644 → 100755
Empty file.
Empty file modified bin/jrubyd.bat 100644 → 100755
Empty file.
Empty file modified bin/jrubyw.exe 100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion core/pom.xml
Expand Up @@ -532,7 +532,7 @@
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>pack lib/jruby.jar</id>
<id>create lib/jruby.jar</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
Expand Down
7 changes: 4 additions & 3 deletions core/src/main/java/org/jruby/RubyRegexp.java
Expand Up @@ -71,6 +71,7 @@
import org.jruby.util.Sprintf;
import org.jruby.util.StringSupport;
import org.jruby.util.TypeConverter;
import org.jruby.util.cli.Options;
import org.jruby.util.io.EncodingUtils;
import org.jruby.util.collections.WeakValuedMap;

Expand Down Expand Up @@ -1248,7 +1249,7 @@ public IRubyObject initialize_m19(IRubyObject arg) {

@JRubyMethod(name = "initialize", visibility = Visibility.PRIVATE)
public IRubyObject initialize_m19(IRubyObject arg0, IRubyObject arg1) {
if (arg0 instanceof RubyRegexp) {
if (arg0 instanceof RubyRegexp && Options.PARSER_WARN_FLAGS_IGNORED.load()) {
getRuntime().getWarnings().warn(ID.REGEXP_IGNORED_FLAGS, "flags ignored");
return initializeByRegexp19((RubyRegexp)arg0);
}
Expand All @@ -1259,8 +1260,8 @@ public IRubyObject initialize_m19(IRubyObject arg0, IRubyObject arg1) {

@JRubyMethod(name = "initialize", visibility = Visibility.PRIVATE)
public IRubyObject initialize_m19(IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) {
if (arg0 instanceof RubyRegexp) {
getRuntime().getWarnings().warn(ID.REGEXP_IGNORED_FLAGS, "flags ignored");
if (arg0 instanceof RubyRegexp && Options.PARSER_WARN_FLAGS_IGNORED.load()) {
getRuntime().getWarnings().warn(ID.REGEXP_IGNORED_FLAGS, "flags ignored");
return initializeByRegexp19((RubyRegexp)arg0);
}

Expand Down
1 change: 1 addition & 0 deletions core/src/main/java/org/jruby/ir/IRScope.java
Expand Up @@ -239,6 +239,7 @@ public boolean equals(Object other) {
}

protected void addChildScope(IRScope scope) {
if (lexicalChildren == null) lexicalChildren = new ArrayList<>();
lexicalChildren.add(scope);
}

Expand Down
4 changes: 3 additions & 1 deletion core/src/main/java/org/jruby/lexer/yacc/RubyLexer.java
Expand Up @@ -819,7 +819,9 @@ private int hereDocumentIdentifier() throws IOException {
}

private void arg_ambiguous() {
if (warnings.isVerbose()) warnings.warning(ID.AMBIGUOUS_ARGUMENT, getPosition(), "Ambiguous first argument; make sure.");
if (warnings.isVerbose() && Options.PARSER_WARN_AMBIGUOUS_ARGUMENTS.load()) {
warnings.warning(ID.AMBIGUOUS_ARGUMENT, getPosition(), "Ambiguous first argument; make sure.");
}
}


Expand Down
2 changes: 2 additions & 0 deletions core/src/main/java/org/jruby/util/cli/Options.java
Expand Up @@ -65,6 +65,8 @@ public class Options {
public static final Option<Boolean> PARSER_WARN_LOCAL_SHADOWING = bool(PARSER, "parser.warn.shadowing_local", true, "Warn about shadowing local variables.");
public static final Option<Boolean> PARSER_WARN_REGEX_CONDITION = bool(PARSER, "parser.warn.regex_condition", true, "Warn about regex literals in conditions.");
public static final Option<Boolean> PARSER_WARN_ARGUMENT_PREFIX = bool(PARSER, "parser.warn.argument_prefix", true, "Warn about splat operators being interpreted as argument prefixes.");
public static final Option<Boolean> PARSER_WARN_AMBIGUOUS_ARGUMENTS = bool(PARSER, "parser.warn.ambiguous_argument", true, "Warn about ambiguous arguments.");
public static final Option<Boolean> PARSER_WARN_FLAGS_IGNORED = bool(PARSER, "parser.warn.flags_ignored", true, "Warn about ignored regex flags being ignored.");

public static final Option<CompileMode> COMPILE_MODE = enumeration(COMPILER, "compile.mode", CompileMode.class, CompileMode.JIT, "Set compilation mode. JIT = at runtime; FORCE = before execution.");
public static final Option<Boolean> COMPILE_DUMP = bool(COMPILER, "compile.dump", false, "Dump to console all bytecode generated at runtime.");
Expand Down
1 change: 1 addition & 0 deletions core/src/main/ruby/jruby/truffle/core.rb
Expand Up @@ -32,6 +32,7 @@
require_relative 'core/rubinius/kernel/bootstrap/type'

# Load common (ordered according to Rubinius' load_order.txt)
require_relative 'core/rubinius/kernel/common/enumerator'
require_relative 'core/rubinius/kernel/common/enumerable'
require_relative 'core/rubinius/kernel/common/undefined'
require_relative 'core/rubinius/kernel/common/type'
Expand Down
Expand Up @@ -12,6 +12,12 @@ def self.mathn_loaded?
false
end

module Fiber

ENABLED = true

end

end

class PrimitiveFailure < StandardError
Expand Down

0 comments on commit 6ee6976

Please sign in to comment.