10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "c1/c1_FrameMap.hpp"
27 #include "c1/c1_LIR.hpp"
28 #include "code/vmreg.inline.hpp"
29 #include "runtime/sharedRuntime.hpp"
30
31 //-----------------------------------------------------
32
33 // Convert method signature into an array of BasicTypes for the arguments
34 BasicTypeArray* FrameMap::signature_type_array_for(const ciMethod* method) {
35 ciSignature* sig = method->signature();
36 BasicTypeList* sta = new BasicTypeList(method->arg_size());
37 // add receiver, if any
38 if (!method->is_static()) sta->append(T_OBJECT);
39 // add remaining arguments
40 for (int i = 0; i < sig->count(); i++) {
41 ciType* type = sig->type_at(i);
42 BasicType t = type->basic_type();
43 if (t == T_ARRAY) {
44 t = T_OBJECT;
45 }
46 sta->append(t);
47 }
48 // done
49 return sta;
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "c1/c1_FrameMap.hpp"
27 #include "c1/c1_LIR.hpp"
28 #include "code/vmreg.inline.hpp"
29 #include "runtime/sharedRuntime.hpp"
30 #include "utilities/align.hpp"
31
32 //-----------------------------------------------------
33
34 // Convert method signature into an array of BasicTypes for the arguments
35 BasicTypeArray* FrameMap::signature_type_array_for(const ciMethod* method) {
36 ciSignature* sig = method->signature();
37 BasicTypeList* sta = new BasicTypeList(method->arg_size());
38 // add receiver, if any
39 if (!method->is_static()) sta->append(T_OBJECT);
40 // add remaining arguments
41 for (int i = 0; i < sig->count(); i++) {
42 ciType* type = sig->type_at(i);
43 BasicType t = type->basic_type();
44 if (t == T_ARRAY) {
45 t = T_OBJECT;
46 }
47 sta->append(t);
48 }
49 // done
50 return sta;
|