Mercurial > hg > truffle
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/model/SpecializationData.java @ 17251:6ee7afea175a
Truffle-DSL: Fixed @SlowPath was not applied to certain specialize0 implementations. This will reduce the pressure on the truffle cache.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 29 Sep 2014 18:37:24 +0200 |
parents | 89f635cbd85e |
children | a665483c3881 |
comparison
equal
deleted
inserted
replaced
17250:9f001294893d | 17251:6ee7afea175a |
---|---|
285 @Override | 285 @Override |
286 public String toString() { | 286 public String toString() { |
287 return String.format("%s [id = %s, method = %s, guards = %s, signature = %s]", getClass().getSimpleName(), getId(), getMethod(), getGuards(), getTypeSignature()); | 287 return String.format("%s [id = %s, method = %s, guards = %s, signature = %s]", getClass().getSimpleName(), getId(), getMethod(), getGuards(), getTypeSignature()); |
288 } | 288 } |
289 | 289 |
290 public boolean hasFrame(ProcessorContext context) { | 290 public boolean isFrameUsedByGuard(ProcessorContext context) { |
291 for (Parameter param : getParameters()) { | 291 for (GuardExpression guard : getGuards()) { |
292 if (ElementUtils.typeEquals(param.getType(), context.getTruffleTypes().getFrame())) { | 292 if (guard.getResolvedGuard() == null) { |
293 return true; | 293 continue; |
294 } | 294 } |
295 } | 295 |
296 for (Parameter param : guard.getResolvedGuard().getParameters()) { | |
297 if (ElementUtils.typeEquals(param.getType(), context.getTruffleTypes().getFrame())) { | |
298 return true; | |
299 } | |
300 } | |
301 } | |
302 | |
296 return false; | 303 return false; |
297 } | 304 } |
298 | 305 |
299 public boolean isReachableAfter(SpecializationData prev) { | 306 public boolean isReachableAfter(SpecializationData prev) { |
300 if (!prev.isSpecialized()) { | 307 if (!prev.isSpecialized()) { |