Skip to content

Commit bc5932e

Browse files
committed
[GR-64454] Handle deleted IfNode in OutlineRuntimeChecksPhase.
PullRequest: graal/20592
2 parents eb93a8f + 40759e4 commit bc5932e

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

vm/mx.vm/suite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"name": "graal-nodejs",
3434
"subdir": True,
3535
"dynamic": True,
36-
"version": "59e25d376c8bb2803be3e0c1ba19d70819d3e1da",
36+
"version": "20cf920b900b643c6e8ab05cd0a5e66e2ba4e687",
3737
"urls" : [
3838
{"url" : "https://github.com/graalvm/graaljs.git", "kind" : "git"},
3939
]
@@ -42,7 +42,7 @@
4242
"name": "graal-js",
4343
"subdir": True,
4444
"dynamic": True,
45-
"version": "59e25d376c8bb2803be3e0c1ba19d70819d3e1da",
45+
"version": "20cf920b900b643c6e8ab05cd0a5e66e2ba4e687",
4646
"urls": [
4747
{"url": "https://github.com/graalvm/graaljs.git", "kind" : "git"},
4848
]

web-image/mx.web-image/suite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"name": "graal-nodejs",
1717
"subdir": True,
1818
"dynamic": True,
19-
"version": "cffe4d4e341425200ec28f079eb6dca0c098d04b",
19+
"version": "20cf920b900b643c6e8ab05cd0a5e66e2ba4e687",
2020
"urls": [
2121
{"url": "https://github.com/graalvm/graaljs.git", "kind": "git"},
2222
],
@@ -25,7 +25,7 @@
2525
"name": "graal-js",
2626
"subdir": True,
2727
"dynamic": True,
28-
"version": "cffe4d4e341425200ec28f079eb6dca0c098d04b",
28+
"version": "20cf920b900b643c6e8ab05cd0a5e66e2ba4e687",
2929
"urls": [
3030
{"url": "https://github.com/graalvm/graaljs.git", "kind": "git"},
3131
],

web-image/src/com.oracle.svm.hosted.webimage/src/com/oracle/svm/hosted/webimage/codegen/phase/OutlineRuntimeChecksPhase.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
import java.util.ArrayList;
2929
import java.util.List;
3030

31-
import com.oracle.svm.webimage.functionintrinsics.ImplicitExceptions;
3231
import com.oracle.svm.core.graal.nodes.ThrowBytecodeExceptionNode;
32+
import com.oracle.svm.webimage.functionintrinsics.ImplicitExceptions;
3333

3434
import jdk.graal.compiler.core.common.spi.ForeignCallDescriptor;
3535
import jdk.graal.compiler.graph.Node;
@@ -203,6 +203,16 @@ private static class ArrayBoundCheckPattern extends Pattern {
203203
*/
204204
@Override
205205
void replace(CoreProviders providers) {
206+
if (ifNode.isDeleted()) {
207+
/*
208+
* This case can happen when both branches of an if node throw a bytecode exception;
209+
* e.g. if (array == null) where the true successor throws a NullPointerException,
210+
* and the other throws an ArrayIndexOutOfBoundsException, which is then replaced
211+
* with checkNullPointer(array) followed by ThrowBytecodeException(OUT_OF_BOUNDS).
212+
*/
213+
return;
214+
}
215+
206216
StructuredGraph graph = ifNode.graph();
207217

208218
/*

0 commit comments

Comments
 (0)