Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/typesystem/TypeSystemCodeGenerator.java @ 8252:0905d796944a
Refactored codegen error model to make error redirection a lot easier.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Wed, 13 Mar 2013 19:58:28 +0100 |
parents | bdcb3cc47e16 |
children | 89006c76f737 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/typesystem/TypeSystemCodeGenerator.java Wed Mar 13 11:32:43 2013 +0100 +++ b/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/typesystem/TypeSystemCodeGenerator.java Wed Mar 13 19:58:28 2013 +0100 @@ -167,8 +167,8 @@ CodeTreeBuilder builder = method.createBuilder(); builder.startReturn(); - if (typeSystem.getTypes().length > 0) { - builder.typeLiteral(typeSystem.getTypes()[0].getBoxedType()); + if (!typeSystem.getTypes().isEmpty()) { + builder.typeLiteral(typeSystem.getTypes().get(0).getBoxedType()); } else { builder.null_(); }