Mercurial > hg > truffle
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/generator/TypeSystemCodeGenerator.java @ 21742:2e850dbf82ae
Truffle-DSL: fix NPE in getImplicitCastType if an implicitely casted type is short circuited. (reported-by: Mohaned Qunaibit)
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Fri, 05 Jun 2015 14:12:49 +0200 |
parents | 9a83732f97eb |
children |
comparison
equal
deleted
inserted
replaced
21741:b6ee5d3f3255 | 21742:2e850dbf82ae |
---|---|
408 builder.end().startBlock(); | 408 builder.end().startBlock(); |
409 builder.startReturn().typeLiteral(sourceType).end(); | 409 builder.startReturn().typeLiteral(sourceType).end(); |
410 builder.end(); | 410 builder.end(); |
411 } | 411 } |
412 | 412 |
413 builder.startElseIf().string(LOCAL_VALUE).string(" == ").nullLiteral().end(); | |
414 builder.startBlock(); | |
415 builder.startReturn().typeLiteral(context.getType(Object.class)).end(); | |
416 builder.end(); | |
417 | |
413 builder.startElseBlock(); | 418 builder.startElseBlock(); |
414 builder.tree(createTransferToInterpreterAndInvalidate()); | 419 builder.tree(createTransferToInterpreterAndInvalidate()); |
415 builder.startThrow().startNew(context.getType(IllegalArgumentException.class)).doubleQuote("Illegal type ").end().end(); | 420 builder.startThrow().startNew(context.getType(IllegalArgumentException.class)).doubleQuote("Illegal type ").end().end(); |
416 builder.end(); | 421 builder.end(); |
417 | 422 |