Skip to content

Commit f3b3fd2

Browse files
committed
Do not intrinsify Integer/Long.reverse in web-image
There is no direct way to implement this in JS/Wasm other than lowering the Java implementation.
1 parent 32078dc commit f3b3fd2

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

web-image/src/com.oracle.svm.hosted.webimage/src/com/oracle/svm/hosted/webimage/JSGraphBuilderPlugins.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Rec
114114
return false;
115115
}
116116
});
117+
r.register(new InvocationPlugin("reverse", type) {
118+
@Override
119+
public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode arg) {
120+
return false;
121+
}
122+
});
117123
r.register(new InvocationPlugin("bitCount", type) {
118124
@Override
119125
public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode value) {

web-image/src/com.oracle.svm.hosted.webimage/src/com/oracle/svm/hosted/webimage/wasm/WasmLMGraphBuilderPlugins.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,12 @@ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Rec
295295
return false;
296296
}
297297
});
298+
r.register(new InvocationPlugin("reverse", type) {
299+
@Override
300+
public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode arg) {
301+
return false;
302+
}
303+
});
298304
}
299305

300306
public static void registerCharacterPlugins(InvocationPlugins plugins) {

0 commit comments

Comments
 (0)