Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/generator/NodeGenFactory.java @ 21065:986f1c0d6f55
Truffle-DSL: do not generate polymorphic nodes for nodes with all parameters evaluated in all execute methods.
author | Christian Humer <christian.humer@oracle.com> |
---|---|
date | Fri, 17 Apr 2015 16:18:17 +0200 |
parents | ef2825da2e43 |
children | 82539241ff38 |
comparison
equal
deleted
inserted
replaced
21064:28117ede7606 | 21065:986f1c0d6f55 |
---|---|
418 | 418 |
419 return node.getUninitializedSpecialization(); | 419 return node.getUninitializedSpecialization(); |
420 } | 420 } |
421 | 421 |
422 private boolean needsPolymorphic() { | 422 private boolean needsPolymorphic() { |
423 int signatureSize = node.getSignatureSize(); | |
424 boolean allEvaluated = true; | |
425 for (ExecutableTypeData type : usedTypes) { | |
426 if (type.getEvaluatedCount() != signatureSize) { | |
427 allEvaluated = false; | |
428 } | |
429 } | |
430 if (allEvaluated) { | |
431 return false; | |
432 } | |
433 | |
423 if (reachableSpecializations.size() != 1) { | 434 if (reachableSpecializations.size() != 1) { |
424 return true; | 435 return true; |
425 } | 436 } |
426 | 437 |
427 SpecializationData specialization = reachableSpecializations.get(0); | 438 SpecializationData specialization = reachableSpecializations.get(0); |