Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/ExecutableTypeMethodParser.java @ 8595:8a1115c92271
Implemented codegen guard definitions can now omit unused parameters.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 01 Apr 2013 21:43:20 +0200 |
parents | ce6e8672f798 |
children | 61ba6fc21ba4 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/ExecutableTypeMethodParser.java Mon Apr 01 12:19:15 2013 +0200 +++ b/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/ExecutableTypeMethodParser.java Mon Apr 01 21:43:20 2013 +0200 @@ -42,18 +42,16 @@ @Override public MethodSpec createSpecification(ExecutableElement method, AnnotationMirror mirror) { + List<TypeMirror> types = new ArrayList<>(); types.addAll(getNode().getTypeSystem().getPrimitiveTypeMirrors()); types.add(getContext().getType(void.class)); ParameterSpec returnTypeSpec = new ParameterSpec("executedValue", types); returnTypeSpec.setSignature(true); - - List<ParameterSpec> parameters = new ArrayList<>(); - ParameterSpec frameSpec = new ParameterSpec("frame", getContext().getTruffleTypes().getFrame()); - frameSpec.setOptional(true); - parameters.add(frameSpec); - return new MethodSpec(new ArrayList<TypeMirror>(), returnTypeSpec, parameters); + MethodSpec spec = new MethodSpec(returnTypeSpec); + spec.addOptional(new ParameterSpec("frame", getContext().getTruffleTypes().getFrame())); + return spec; } @Override