mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 00:04:10 -08:00
fix style violations
This commit is contained in:
parent
fec6caa10f
commit
5c5c92e104
|
@ -17,7 +17,6 @@ package org.teavm.backend.wasm.intrinsics.gc;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.teavm.ast.InvocationExpr;
|
||||
import org.teavm.backend.wasm.model.expression.WasmExpression;
|
||||
import org.teavm.backend.wasm.model.expression.WasmInt32Constant;
|
||||
|
@ -77,7 +76,7 @@ public class LaxMallocIntrinsic implements WasmGCIntrinsic {
|
|||
}
|
||||
}
|
||||
|
||||
private static interface LaxMallocHeapMapper {
|
||||
private interface LaxMallocHeapMapper {
|
||||
void setHeapLocation(int heapLoc);
|
||||
}
|
||||
|
||||
|
|
|
@ -178,8 +178,10 @@ public class WasmGCIntrinsics implements WasmGCIntrinsicProvider {
|
|||
add(new MethodReference(DirectMalloc.class, "malloc", int.class, Address.class), intrinsic);
|
||||
add(new MethodReference(DirectMalloc.class, "calloc", int.class, Address.class), intrinsic);
|
||||
add(new MethodReference(DirectMalloc.class, "free", Address.class, void.class), intrinsic);
|
||||
add(new MethodReference(DirectMalloc.class, "memcpy", Address.class, Address.class, int.class, void.class), intrinsic);
|
||||
add(new MethodReference(DirectMalloc.class, "memset", Address.class, int.class, int.class, void.class), intrinsic);
|
||||
add(new MethodReference(DirectMalloc.class, "memcpy", Address.class, Address.class, int.class, void.class),
|
||||
intrinsic);
|
||||
add(new MethodReference(DirectMalloc.class, "memset", Address.class, int.class, int.class, void.class),
|
||||
intrinsic);
|
||||
add(new MethodReference(DirectMalloc.class, "zmemset", Address.class, int.class, void.class), intrinsic);
|
||||
}
|
||||
|
||||
|
|
|
@ -173,7 +173,8 @@ public final class LaxMalloc {
|
|||
if (bucketMask != 0L) {
|
||||
// there is a bucket with a larger chunk
|
||||
int availableLargerBucket = Long.numberOfTrailingZeros(bucketMask);
|
||||
Address largerBucketStartAddr = addrHeap(ADDR_HEAP_BUCKETS_START).add(availableLargerBucket << SIZEOF_PTR_SH);
|
||||
Address largerBucketStartAddr = addrHeap(ADDR_HEAP_BUCKETS_START)
|
||||
.add(availableLargerBucket << SIZEOF_PTR_SH);
|
||||
Address largerChunkPtr = largerBucketStartAddr.getAddress();
|
||||
int largerChunkSize = readChunkSizeStatus(largerChunkPtr);
|
||||
|
||||
|
@ -418,7 +419,7 @@ public final class LaxMalloc {
|
|||
Address bucketStartAddr = addrHeap(ADDR_HEAP_BUCKETS_START).add(bucket << SIZEOF_PTR_SH);
|
||||
|
||||
// test the bucket mask if the bucket is empty
|
||||
if ((bucketMask & (1L << bucket)) == 0l) {
|
||||
if ((bucketMask & (1L << bucket)) == 0L) {
|
||||
|
||||
// bucket is empty, add the free chunk to the list
|
||||
bucketStartAddr.putAddress(chunkPtr);
|
||||
|
@ -426,7 +427,7 @@ public final class LaxMalloc {
|
|||
writeChunkNextFreeAddr(chunkPtr, chunkPtr);
|
||||
|
||||
// set the free bit in bucket mask
|
||||
bucketMask |= (1L << bucket);
|
||||
bucketMask |= 1L << bucket;
|
||||
addrHeap(ADDR_HEAP_BUCKETS_FREE_MASK).putLong(bucketMask);
|
||||
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user