# HG changeset patch # User Michael Haupt # Date 1361785787 -3600 # Node ID c052cfe3cae3f10698b0b79c11a4cfa57839aea7 # Parent 838293a77af75ae859b3449efed9d2442bc5f266 let CodeUtil.getCallingConvention() honour receivers (if any) diff -r 838293a77af7 -r c052cfe3cae3 graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CodeUtil.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CodeUtil.java Fri Feb 22 12:15:14 2013 +0100 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CodeUtil.java Mon Feb 25 10:49:47 2013 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,6 +22,7 @@ */ package com.oracle.graal.api.code; +import java.lang.reflect.*; import java.util.*; import com.oracle.graal.api.meta.*; @@ -317,7 +318,7 @@ public static CallingConvention getCallingConvention(CodeCacheProvider codeCache, CallingConvention.Type type, ResolvedJavaMethod method, boolean stackOnly) { Signature sig = method.getSignature(); JavaType retType = sig.getReturnType(null); - JavaType[] argTypes = new JavaType[sig.getParameterCount(false)]; + JavaType[] argTypes = new JavaType[sig.getParameterCount(!Modifier.isStatic(method.getModifiers()))]; for (int i = 0; i < argTypes.length; i++) { argTypes[i] = sig.getParameterType(i, null); }