Mercurial > hg > truffle
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/java/transform/FixWarningsVisitor.java @ 16909:62cfffca9be2
Truffle-DSL: some more performance optimizations.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Sat, 23 Aug 2014 19:31:18 +0200 |
parents | 45c8f64978d6 |
children |
comparison
equal
deleted
inserted
replaced
16908:d3f282a9e287 | 16909:62cfffca9be2 |
---|---|
101 mirror.setElementValue(mirror.findExecutableElement("value"), new CodeAnnotationValue("unused")); | 101 mirror.setElementValue(mirror.findExecutableElement("value"), new CodeAnnotationValue("unused")); |
102 return mirror; | 102 return mirror; |
103 } | 103 } |
104 | 104 |
105 @Override | 105 @Override |
106 public void visitTree(CodeTree e, Void p) { | 106 public void visitTree(CodeTree e, Void p, Element enclosingElement) { |
107 if (e.getString() != null) { | 107 if (e.getString() != null) { |
108 computeSymbols(e.getString()); | 108 computeSymbols(e.getString()); |
109 } | 109 } |
110 super.visitTree(e, p); | 110 super.visitTree(e, p, enclosingElement); |
111 } | 111 } |
112 | 112 |
113 private void computeSymbols(String s) { | 113 private void computeSymbols(String s) { |
114 // TODO there should not be any need for a StringTokenizer if we have a real AST for | 114 // TODO there should not be any need for a StringTokenizer if we have a real AST for |
115 // method bodies. Also the current solution is not perfect. What if one token | 115 // method bodies. Also the current solution is not perfect. What if one token |