Mercurial > hg > truffle
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/node/NodeCodeGenerator.java @ 13812:f270f09616da
Truffle-DSL: implemented specific structured exception for unsupported specializations. (GRAAL-682)
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Wed, 29 Jan 2014 21:26:26 +0100 |
parents | 419b3ea1bdd1 |
children | 28479abd1a69 |
comparison
equal
deleted
inserted
replaced
13811:641f22b1c6b8 | 13812:f270f09616da |
---|---|
329 } | 329 } |
330 return builder.getRoot(); | 330 return builder.getRoot(); |
331 } | 331 } |
332 | 332 |
333 protected void emitEncounteredSynthetic(CodeTreeBuilder builder, TemplateMethod current) { | 333 protected void emitEncounteredSynthetic(CodeTreeBuilder builder, TemplateMethod current) { |
334 builder.startThrow().startNew(getContext().getType(UnsupportedOperationException.class)); | 334 builder.startThrow().startNew(getContext().getType(UnsupportedSpecializationException.class)); |
335 builder.startCall("createInfo0"); | 335 builder.string("this"); |
336 builder.doubleQuote("Unsupported values"); | |
337 addInternalValueParameterNames(builder, current, current, null, false, null); | 336 addInternalValueParameterNames(builder, current, current, null, false, null); |
338 builder.end().end().end(); | 337 builder.end().end(); |
339 } | 338 } |
340 | 339 |
341 private static List<ExecutableElement> findUserConstructors(TypeMirror nodeType) { | 340 private static List<ExecutableElement> findUserConstructors(TypeMirror nodeType) { |
342 List<ExecutableElement> constructors = new ArrayList<>(); | 341 List<ExecutableElement> constructors = new ArrayList<>(); |
343 for (ExecutableElement constructor : ElementFilter.constructorsIn(Utils.fromTypeMirror(nodeType).getEnclosedElements())) { | 342 for (ExecutableElement constructor : ElementFilter.constructorsIn(Utils.fromTypeMirror(nodeType).getEnclosedElements())) { |