comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/NodeParser.java @ 16830:c3c07046a74b

Truffle-DSL: fixed guard solve of guards for interfaces.
author Christian Humer <christian.humer@gmail.com>
date Thu, 14 Aug 2014 15:02:17 +0200
parents 84f1c44b5e9b
children 13cf9b6b325c
comparison
equal deleted inserted replaced
16829:e3724f25056a 16830:c3c07046a74b
879 } 879 }
880 List<ExecutableElement> guardMethods = new ArrayList<>(); 880 List<ExecutableElement> guardMethods = new ArrayList<>();
881 for (GuardData guard : availableGuards) { 881 for (GuardData guard : availableGuards) {
882 guardMethods.add(guard.getMethod()); 882 guardMethods.add(guard.getMethod());
883 } 883 }
884 GuardParser parser = new GuardParser(context, node, source, new HashSet<>(Arrays.asList(expression.getGuardName()))); 884 GuardParser parser = new GuardParser(context, node, source, null);
885 List<GuardData> matchingGuards = parser.parse(guardMethods); 885 List<GuardData> matchingGuards = parser.parse(guardMethods);
886 if (!matchingGuards.isEmpty()) { 886 if (!matchingGuards.isEmpty()) {
887 GuardData guard = matchingGuards.get(0); 887 GuardData guard = matchingGuards.get(0);
888 // use the shared instance of the guard data 888 // use the shared instance of the guard data
889 for (GuardData guardData : availableGuards) { 889 for (GuardData guardData : availableGuards) {