Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/java/ElementUtils.java @ 16851:2db61eddcb97
Truffle-DSL: argument syntax support for guards
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 18 Aug 2014 18:41:16 +0200 |
parents | c3c07046a74b |
children | 433ece7d941d |
comparison
equal
deleted
inserted
replaced
16850:d6c002f4d2a9 | 16851:2db61eddcb97 |
---|---|
528 } | 528 } |
529 | 529 |
530 public static boolean isEnclosedIn(Element enclosedIn, Element element) { | 530 public static boolean isEnclosedIn(Element enclosedIn, Element element) { |
531 if (element == null) { | 531 if (element == null) { |
532 return false; | 532 return false; |
533 } else if (enclosedIn.equals(element)) { | 533 } else if (typeEquals(enclosedIn.asType(), element.asType())) { |
534 return true; | 534 return true; |
535 } else { | 535 } else { |
536 return isEnclosedIn(enclosedIn, element.getEnclosingElement()); | 536 return isEnclosedIn(enclosedIn, element.getEnclosingElement()); |
537 } | 537 } |
538 } | 538 } |