Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/TypeSystemParser.java @ 16820:0370880ac9ce
Truffle-DSL: better caching for type checks.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Wed, 13 Aug 2014 18:06:26 +0200 |
parents | e6d15134ca86 |
children | 93e061157811 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/TypeSystemParser.java Wed Aug 13 18:06:18 2014 +0200 +++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/TypeSystemParser.java Wed Aug 13 18:06:26 2014 +0200 @@ -67,14 +67,17 @@ return typeSystem; } - typeSystem.setTypes(parseTypes(typeSystem)); + List<TypeData> types = parseTypes(typeSystem); + + TypeMirror genericType = context.getType(Object.class); + TypeData voidType = new TypeData(typeSystem, types.size(), null, context.getType(void.class), context.getType(Void.class)); + types.add(voidType); + + typeSystem.setTypes(types); if (typeSystem.hasErrors()) { return typeSystem; } - TypeMirror genericType = context.getType(Object.class); - TypeData voidType = new TypeData(typeSystem, typeSystem.getTypes().size(), null, context.getType(void.class), context.getType(Void.class)); - typeSystem.setGenericType(genericType); typeSystem.setVoidType(voidType); @@ -198,7 +201,6 @@ verifyTypeOrder(types); types.add(new TypeData(typeSystem, index, annotationValue, objectType, objectType)); - return types; }