mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-21 18:51:43 +00:00
New ArrayBuffer/TypedArray; Stdlib restructure; Fix importing stdlib in stdlib; Traverse constructors; Allow initialization of readonly instance fields in constructors
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
* @module std/assembly/allocator/arena
|
||||
*//***/
|
||||
|
||||
import { AL_MASK } from "./common";
|
||||
import { AL_MASK } from "../internal/allocator";
|
||||
|
||||
var startOffset: usize = (HEAP_BASE + AL_MASK) & ~AL_MASK;
|
||||
var offset: usize = startOffset;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Buddy Memory Allocator.
|
||||
* @module stdd/assembly/allocator/buddy
|
||||
* @module std/assembly/allocator/buddy
|
||||
*//***/
|
||||
|
||||
/*
|
||||
|
@ -1,16 +0,0 @@
|
||||
/**
|
||||
* Shared allocator constants.
|
||||
* @module std/assembly/allocator/common
|
||||
*//***/
|
||||
|
||||
/** Number of alignment bits. */
|
||||
export const AL_BITS: u32 = 3;
|
||||
|
||||
/** Number of possible alignment values. */
|
||||
export const AL_SIZE: usize = 1 << <usize>AL_BITS;
|
||||
|
||||
/** Mask to obtain just the alignment bits. */
|
||||
export const AL_MASK: usize = AL_SIZE - 1;
|
||||
|
||||
/** Maximum 32-bit allocation size. */
|
||||
export const MAX_SIZE_32: usize = 1 << 30; // 1GB
|
@ -19,7 +19,7 @@ import {
|
||||
AL_BITS,
|
||||
AL_SIZE,
|
||||
AL_MASK
|
||||
} from "./common";
|
||||
} from "../internal/allocator";
|
||||
|
||||
const SL_BITS: u32 = 5;
|
||||
const SL_SIZE: usize = 1 << <usize>SL_BITS;
|
||||
|
Reference in New Issue
Block a user