Mercurial > hg > truffle
diff graal/com.oracle.jvmci.meta/src/com/oracle/jvmci/meta/Signature.java @ 21567:f41409c6ff26
Do not rely on single/double slot information from the Kind of the value in a local variable or expression stack entry. With word type rewriting during parsing, long values can be single slot values when they are rewritten from Object values.
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Thu, 28 May 2015 17:00:59 -0700 |
parents | 48c1ebd24120 |
children |
line wrap: on
line diff
--- a/graal/com.oracle.jvmci.meta/src/com/oracle/jvmci/meta/Signature.java Fri May 29 01:11:41 2015 +0200 +++ b/graal/com.oracle.jvmci.meta/src/com/oracle/jvmci/meta/Signature.java Thu May 28 17:00:59 2015 -0700 @@ -119,4 +119,21 @@ } return result; } + + default Kind[] toParameterKinds(boolean receiver) { + int args = getParameterCount(false); + Kind[] result; + int i = 0; + if (receiver) { + result = new Kind[args + 1]; + result[0] = Kind.Object; + i = 1; + } else { + result = new Kind[args]; + } + for (int j = 0; j < args; j++) { + result[i + j] = getParameterKind(j); + } + return result; + } }