Skip to content

Commit f55a49b

Browse files
author
Christian Wimmer
committed
[GR-26186] Various fixes.
PullRequest: graal/10537
2 parents 179dc4f + c44838e commit f55a49b

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

compiler/src/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64ArithmeticLIRGenerator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ public Value emitExtendMemory(boolean isSigned, AArch64Kind accessKind, int resu
121121
* Issue an extending load of the proper bit size and set the result to the proper kind.
122122
*/
123123
GraalError.guarantee(accessKind.isInteger(), "can only extend integer kinds");
124-
Variable result = getLIRGen().newVariable(LIRKind.value(resultBits == 32 ? AArch64Kind.DWORD : AArch64Kind.QWORD));
124+
AArch64Kind resultKind = resultBits <= 32 ? AArch64Kind.DWORD : AArch64Kind.QWORD;
125+
Variable result = getLIRGen().newVariable(LIRKind.value(resultKind));
125126

126-
int dstBitSize = resultBits <= 32 ? 32 : 64;
127127
AArch64Move.ExtendKind extend = isSigned ? AArch64Move.ExtendKind.SIGN_EXTEND : AArch64Move.ExtendKind.ZERO_EXTEND;
128-
getLIRGen().append(new AArch64Move.LoadOp(accessKind, dstBitSize, extend, result, address, state));
128+
getLIRGen().append(new AArch64Move.LoadOp(accessKind, resultKind.getSizeInBytes() * Byte.SIZE, extend, result, address, state));
129129
return result;
130130
}
131131

substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/flow/MethodTypeFlow.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ public StackTraceElement[] getParsingContext() {
8787
List<StackTraceElement> parsingContext = new ArrayList<>();
8888
InvokeTypeFlow invokeFlow = parsingReason;
8989

90-
while (invokeFlow != null) {
90+
/* Defend against cycles in the parsing context. GR-35744 should fix this properly. */
91+
int maxSize = 100;
92+
93+
while (invokeFlow != null && parsingContext.size() < maxSize) {
9194
parsingContext.add(invokeFlow.getSource().getMethod().asStackTraceElement(invokeFlow.getSource().getBCI()));
9295
invokeFlow = ((PointsToAnalysisMethod) invokeFlow.getSource().getMethod()).getTypeFlow().parsingReason;
9396
}

substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/meta/AnalysisUniverse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ private void collectMethodImplementations() {
587587
public static Set<AnalysisMethod> getMethodImplementations(BigBang bb, AnalysisMethod method, boolean includeInlinedMethods) {
588588
Set<AnalysisMethod> implementations = new LinkedHashSet<>();
589589
if (method.wrapped.canBeStaticallyBound() || method.isConstructor()) {
590-
if (method.isImplementationInvoked()) {
590+
if (includeInlinedMethods ? method.isReachable() : method.isImplementationInvoked()) {
591591
implementations.add(method);
592592
}
593593
} else {

substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/image/NativeImageDebugInfoProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ public String name() {
660660

661661
@Override
662662
public String valueType() {
663-
return hostedMethod.getSignature().getReturnType(null).toJavaName();
663+
return toJavaName((HostedType) hostedMethod.getSignature().getReturnType(null));
664664
}
665665

666666
@Override
@@ -669,7 +669,7 @@ public List<String> paramTypes() {
669669
int parameterCount = signature.getParameterCount(false);
670670
List<String> paramTypes = new ArrayList<>(parameterCount);
671671
for (int i = 0; i < parameterCount; i++) {
672-
paramTypes.add(signature.getParameterType(i, null).toJavaName());
672+
paramTypes.add(toJavaName((HostedType) signature.getParameterType(i, null)));
673673
}
674674
return paramTypes;
675675
}

0 commit comments

Comments
 (0)