Skip to content

Commit

Permalink
Remove some unused JVM interop ops (#498)
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterDuke17 committed Aug 28, 2018
1 parent c43d1ab commit 09bf927
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 30 deletions.
7 changes: 0 additions & 7 deletions docs/ops.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@
* [istrue](#istrue)
* [istype](#istype)
* [null](#null)
* [jvmisnull `jvm`](#jvmisnull-jvm)
* [tostr](#tostr)
* [tonum](#tonum)
* [unbox](#unbox)
Expand Down Expand Up @@ -2051,12 +2050,6 @@ Generate a null value.
The value returned by `null_s` is VM dependant. Notably, it may stringify
differently depending on the backend.

## jvmisnull `jvm`
* `jvmisnull(Mu $obj)`

Returns a 1 if the object is an NQP Type object *or* the underlying
JVM object is null. Returns 0 otherwise.

## tostr
* `tostr_I(Int $val --> str)`

Expand Down
3 changes: 0 additions & 3 deletions src/vm/jvm/QAST/Compiler.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -2888,9 +2888,6 @@ QAST::OperationsJAST.map_classlib_core_op('continuationcontrol', $TYPE_OPS, 'con
QAST::OperationsJAST.map_classlib_core_op('continuationinvoke', $TYPE_OPS, 'continuationinvoke', [$RT_OBJ, $RT_OBJ], $RT_OBJ, :tc, :cont);

# JVM interop ops
QAST::OperationsJAST.map_classlib_core_op('jvmeqaddr', $TYPE_OPS, 'jvmeqaddr', [$RT_OBJ, $RT_OBJ], $RT_INT, :tc);
QAST::OperationsJAST.map_classlib_core_op('jvmisnull', $TYPE_OPS, 'jvmisnull', [$RT_OBJ], $RT_INT, :tc);
QAST::OperationsJAST.map_classlib_core_op('jvmbootinterop', $TYPE_OPS, 'jvmbootinterop', [], $RT_OBJ, :tc);
QAST::OperationsJAST.map_classlib_core_op('backendconfig', $TYPE_OPS, 'jvmgetconfig', [], $RT_OBJ, :tc);

# Native call ops
Expand Down
20 changes: 0 additions & 20 deletions src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java
Original file line number Diff line number Diff line change
Expand Up @@ -7361,26 +7361,6 @@ public static SixModelObject debugnoop(SixModelObject in, ThreadContext tc) {
return in;
}

public static long jvmeqaddr(SixModelObject a, SixModelObject b, ThreadContext tc) {
if (a instanceof TypeObject) {
return (b instanceof TypeObject) ? 1 : 0;
} else {
return (b instanceof TypeObject || ((JavaObjectWrapper)a).theObject != ((JavaObjectWrapper)b).theObject) ? 0 : 1;
}
}

public static long jvmisnull(SixModelObject a, ThreadContext tc) {
if (a instanceof TypeObject) {
return 1;
} else {
return ((JavaObjectWrapper)a).theObject == null ? 1 : 0;
}
}

public static SixModelObject jvmbootinterop(ThreadContext tc) {
return BootJavaInterop.RuntimeSupport.boxJava(tc.gc.bootInterop, tc.gc.bootInterop.getSTableForClass(BootJavaInterop.class));
}

public static SixModelObject jvmgetconfig(ThreadContext tc) {
SixModelObject hashType = tc.curFrame.codeRef.staticInfo.compUnit.hllConfig.hashType;
SixModelObject strType = tc.curFrame.codeRef.staticInfo.compUnit.hllConfig.strBoxType;
Expand Down

0 comments on commit 09bf927

Please sign in to comment.