Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/node/CreateCastParser.java @ 16755:bd28da642eea
Truffle-DSL: Several new features implemented:
Implementation of a new code generation layout which shares code between generated nodes.
Declaration order of specializations is now used as specialization order.
Specializations do no longer perform fallthrough on respecialization, they now always respecialize from the first specialization.
Implemented support for contains relations between specializations.
Improved reachability error messages.
Preliminary support for @Implies.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 11 Aug 2014 15:53:05 +0200 |
parents | b466199f19e1 |
children |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/node/CreateCastParser.java Mon Aug 11 15:53:05 2014 +0200 +++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/node/CreateCastParser.java Mon Aug 11 15:53:05 2014 +0200 @@ -58,7 +58,7 @@ baseType = foundChild.getOriginalType(); } - MethodSpec spec = new MethodSpec(new InheritsParameterSpec(getContext(), "child", baseType)); + MethodSpec spec = new MethodSpec(new InheritsParameterSpec("child", baseType)); addDefaultFieldMethodSpec(spec); ParameterSpec childSpec = new ParameterSpec("castedChild", baseType); childSpec.setSignature(true); @@ -97,18 +97,15 @@ private static class InheritsParameterSpec extends ParameterSpec { - private final ProcessorContext context; - - public InheritsParameterSpec(ProcessorContext context, String name, TypeMirror... allowedTypes) { + public InheritsParameterSpec(String name, TypeMirror... allowedTypes) { super(name, Arrays.asList(allowedTypes)); - this.context = context; } @Override public boolean matches(TypeMirror actualType) { boolean found = false; for (TypeMirror specType : getAllowedTypes()) { - if (Utils.isAssignable(context, actualType, specType)) { + if (Utils.isAssignable(actualType, specType)) { found = true; break; }