Mercurial > hg > graal-jvmci-8
comparison jvmci/jdk.vm.ci.code/src/jdk/vm/ci/code/CodeUtil.java @ 23396:9ed5b586018b
Replace LIRKind with abstract base class (JDK-8156942).
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Fri, 13 May 2016 14:33:19 +0200 |
parents | d63506bb5237 |
children | b4838d622f3f |
comparison
equal
deleted
inserted
replaced
23395:19432ed40848 | 23396:9ed5b586018b |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
415 } | 415 } |
416 | 416 |
417 /** | 417 /** |
418 * Create a calling convention from a {@link ResolvedJavaMethod}. | 418 * Create a calling convention from a {@link ResolvedJavaMethod}. |
419 */ | 419 */ |
420 public static CallingConvention getCallingConvention(CodeCacheProvider codeCache, CallingConvention.Type type, ResolvedJavaMethod method) { | 420 public static CallingConvention getCallingConvention(CodeCacheProvider codeCache, CallingConvention.Type type, ResolvedJavaMethod method, ValueKindFactory<?> valueKindFactory) { |
421 Signature sig = method.getSignature(); | 421 Signature sig = method.getSignature(); |
422 JavaType retType = sig.getReturnType(null); | 422 JavaType retType = sig.getReturnType(null); |
423 int sigCount = sig.getParameterCount(false); | 423 int sigCount = sig.getParameterCount(false); |
424 JavaType[] argTypes; | 424 JavaType[] argTypes; |
425 int argIndex = 0; | 425 int argIndex = 0; |
432 for (int i = 0; i < sigCount; i++) { | 432 for (int i = 0; i < sigCount; i++) { |
433 argTypes[argIndex++] = sig.getParameterType(i, null); | 433 argTypes[argIndex++] = sig.getParameterType(i, null); |
434 } | 434 } |
435 | 435 |
436 RegisterConfig registerConfig = codeCache.getRegisterConfig(); | 436 RegisterConfig registerConfig = codeCache.getRegisterConfig(); |
437 return registerConfig.getCallingConvention(type, retType, argTypes, codeCache.getTarget()); | 437 return registerConfig.getCallingConvention(type, retType, argTypes, valueKindFactory); |
438 } | 438 } |
439 } | 439 } |