Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/ExecutableTypeMethodParser.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 | 703c09f8640c |
children | 89006c76f737 |
comparison
equal
deleted
inserted
replaced
8251:cb70ed101b5f | 8252:0905d796944a |
---|---|
42 } | 42 } |
43 | 43 |
44 @Override | 44 @Override |
45 public MethodSpec createSpecification(ExecutableElement method, AnnotationMirror mirror) { | 45 public MethodSpec createSpecification(ExecutableElement method, AnnotationMirror mirror) { |
46 List<TypeMirror> types = new ArrayList<>(); | 46 List<TypeMirror> types = new ArrayList<>(); |
47 types.addAll(Arrays.asList(getNode().getTypeSystem().getPrimitiveTypeMirrors())); | 47 types.addAll(getNode().getTypeSystem().getPrimitiveTypeMirrors()); |
48 types.add(getContext().getType(void.class)); | 48 types.add(getContext().getType(void.class)); |
49 | 49 |
50 ParameterSpec returnTypeSpec = new ParameterSpec("executedValue", types.toArray(new TypeMirror[types.size()]), false, Cardinality.ONE); | 50 ParameterSpec returnTypeSpec = new ParameterSpec("executedValue", types, false, Cardinality.ONE); |
51 | 51 |
52 List<ParameterSpec> parameters = new ArrayList<>(); | 52 List<ParameterSpec> parameters = new ArrayList<>(); |
53 parameters.add(new ParameterSpec("frame", getContext().getTruffleTypes().getFrame(), true)); | 53 parameters.add(new ParameterSpec("frame", getContext().getTruffleTypes().getFrame(), true)); |
54 return new MethodSpec(new ArrayList<TypeMirror>(), returnTypeSpec, parameters); | 54 return new MethodSpec(new ArrayList<TypeMirror>(), returnTypeSpec, parameters); |
55 } | 55 } |