Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/node/SpecializationData.java @ 11438:b77721210bd6
Truffle-DSL: fix NPE with nodes with no frame in the execute method.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Tue, 27 Aug 2013 18:11:35 +0200 |
parents | 6879565ee10b |
children | 8e8347ecabbc |
comparison
equal
deleted
inserted
replaced
11423:496cf245f023 | 11438:b77721210bd6 |
---|---|
254 } | 254 } |
255 | 255 |
256 public void forceFrame(TypeMirror frameType) { | 256 public void forceFrame(TypeMirror frameType) { |
257 if (getParameters().isEmpty() || !Utils.typeEquals(getParameters().get(0).getType(), frameType)) { | 257 if (getParameters().isEmpty() || !Utils.typeEquals(getParameters().get(0).getType(), frameType)) { |
258 ParameterSpec frameSpec = getSpecification().findParameterSpec("frame"); | 258 ParameterSpec frameSpec = getSpecification().findParameterSpec("frame"); |
259 getParameters().add(0, new ActualParameter(frameSpec, frameType, -1, false)); | 259 if (frameSpec != null) { |
260 getParameters().add(0, new ActualParameter(frameSpec, frameType, -1, false)); | |
261 } | |
260 } | 262 } |
261 } | 263 } |
262 | 264 |
263 public boolean equalsGuards(SpecializationData specialization) { | 265 public boolean equalsGuards(SpecializationData specialization) { |
264 if (assumptions.equals(specialization.getAssumptions()) && guards.equals(specialization.getGuards()) && getSignature().equalsParameters(specialization.getSignature())) { | 266 if (assumptions.equals(specialization.getAssumptions()) && guards.equals(specialization.getGuards()) && getSignature().equalsParameters(specialization.getSignature())) { |