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

Commits on Aug 21, 2015

  1. Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    ed4a945 View commit details
  2. [Truffle] Fix ambiguous block.

    eregon committed Aug 21, 2015
    Copy the full SHA
    6588d82 View commit details
  3. Copy the full SHA
    2fc9d77 View commit details
  4. [Truffle] OMProcessor: fix assertions.

    * Do not expect a specific parameter name for guards and setters.
    eregon committed Aug 21, 2015
    Copy the full SHA
    a821162 View commit details
2 changes: 1 addition & 1 deletion tool/jt.rb
Original file line number Diff line number Diff line change
@@ -430,7 +430,7 @@ def check_ambiguous_arguments
indent = $1
$&.gsub("1.7", "1.8") + "#{indent}'fork' => 'true',\n"
end
contents.sub!(/^(\s+)('-J-Dfile.encoding=UTF-8')(.+\n)/) do
contents.sub!(/^(\s+)('-J-Dfile.encoding=UTF-8')(.+\n)(?!\1'-parameters')/) do
"#{$1}#{$2},\n#{$1}'-parameters'#{$3}"
end
File.write pom, contents
Original file line number Diff line number Diff line change
@@ -1362,8 +1362,8 @@ public ProcNode(RubyContext context, SourceSection sourceSection) {
}

@Specialization
public DynamicObject proc(VirtualFrame frame, Object block) {
return procNewNode.executeProcNew(frame, getContext().getCoreLibrary().getProcClass(), ArrayUtils.EMPTY_ARRAY, block);
public DynamicObject proc(VirtualFrame frame, Object maybeBlock) {
return procNewNode.executeProcNew(frame, getContext().getCoreLibrary().getProcClass(), ArrayUtils.EMPTY_ARRAY, maybeBlock);
}

}
Original file line number Diff line number Diff line change
@@ -17,22 +17,26 @@
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.Element;
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.TypeElement;
import javax.tools.JavaFileObject;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Set;

@SupportedAnnotationTypes("org.jruby.truffle.om.dsl.api.Layout")
@SupportedSourceVersion(SourceVersion.RELEASE_7)
public class OMProcessor extends AbstractProcessor {

@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnvironment) {
for (Element element : roundEnvironment.getElementsAnnotatedWith(Layout.class)) {
assert element.getKind() == ElementKind.CLASS;
assert element.getKind() == ElementKind.INTERFACE : element.getKind();
processLayout((TypeElement) element);
}

Original file line number Diff line number Diff line change
@@ -133,7 +133,7 @@ private void parseConstructor(ExecutableElement methodElement) {
List<? extends VariableElement> parameters = methodElement.getParameters();

if (hasShapeProperties || (superLayout != null && superLayout.hasShapeProperties())) {
assert parameters.get(0).asType().toString().equals(DynamicObjectFactory.class.toString());
assert parameters.get(0).asType().toString().equals(DynamicObjectFactory.class.getName()) : parameters.get(0).asType();
parameters = parameters.subList(1, parameters.size());
}

@@ -176,9 +176,6 @@ private void parseGuard(ExecutableElement methodElement) {
assert methodElement.getParameters().size() == 1;

final String type = methodElement.getParameters().get(0).asType().toString();
assert type.equals(DynamicObject.class.getName()) || type.equals(Object.class.getName());

assert methodElement.getParameters().get(0).getSimpleName().toString().equals("object");

if (type.equals(DynamicObject.class.getName())) {
assert !hasDynamicObjectGuard;
@@ -189,6 +186,8 @@ private void parseGuard(ExecutableElement methodElement) {
} else if (type.equals(Object.class.getName())) {
assert !hasObjectGuard;
hasObjectGuard = true;
} else {
assert false : "Unknown type for the first guard parameter: " + type;
}
}

@@ -240,8 +239,6 @@ private void parseSetter(ExecutableElement methodElement) {
assert methodElement.getParameters().get(0).getSimpleName().toString().equals("object");
}

assert methodElement.getParameters().get(1).getSimpleName().toString().equals("value");

String name = titleToCamel(methodElement.getSimpleName().toString().substring("get".length()));

if (isUnsafeSetter) {
@@ -281,7 +278,7 @@ private void setPropertyType(PropertyBuilder builder, TypeMirror type) {
if (builder.getType() == null) {
builder.setType(type);
} else {
assert builder.getType().equals(type);
assert builder.getType().toString().equals(type.toString());
}
}