mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Mark several low-level methods as NoGC
This commit is contained in:
parent
582177654a
commit
5caa400eb7
|
@ -23,6 +23,7 @@ import org.teavm.dependency.PluggableDependency;
|
|||
import org.teavm.backend.javascript.spi.GeneratedBy;
|
||||
import org.teavm.interop.Address;
|
||||
import org.teavm.interop.DelegateTo;
|
||||
import org.teavm.interop.NoGC;
|
||||
import org.teavm.interop.Structure;
|
||||
import org.teavm.runtime.Allocator;
|
||||
import org.teavm.runtime.RuntimeArray;
|
||||
|
@ -79,6 +80,7 @@ public final class TSystem extends TObject {
|
|||
@DelegateTo("doArrayCopyLowLevel")
|
||||
private static native void doArrayCopy(Object src, int srcPos, Object dest, int destPos, int length);
|
||||
|
||||
@NoGC
|
||||
static void doArrayCopyLowLevel(RuntimeArray src, int srcPos, RuntimeArray dest, int destPos, int length) {
|
||||
RuntimeClass type = RuntimeClass.getClass(src);
|
||||
int itemSize = type.itemType.size;
|
||||
|
|
|
@ -19,6 +19,7 @@ import org.teavm.classlib.java.lang.*;
|
|||
import org.teavm.dependency.PluggableDependency;
|
||||
import org.teavm.interop.DelegateTo;
|
||||
import org.teavm.backend.javascript.spi.GeneratedBy;
|
||||
import org.teavm.interop.NoGC;
|
||||
import org.teavm.platform.PlatformClass;
|
||||
import org.teavm.runtime.Allocator;
|
||||
import org.teavm.runtime.RuntimeArray;
|
||||
|
@ -60,6 +61,7 @@ public final class TArray extends TObject {
|
|||
private static native TObject newInstanceImpl(PlatformClass componentType, int length);
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@NoGC
|
||||
private static RuntimeObject newInstanceLowLevel(RuntimeClass cls, int length) {
|
||||
return Allocator.allocateArray(cls.arrayType, length).toStructure();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user