mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-21 02:31:41 +00:00
Progress and a tiny WASM binary parser
This commit is contained in:
@ -1,13 +0,0 @@
|
||||
/**
|
||||
* Shared alignment constants.
|
||||
* @module std/assembly/allocator/common/alignment
|
||||
*//***/
|
||||
|
||||
/** Number of alignment bits. */
|
||||
export const BITS: u32 = 3;
|
||||
|
||||
/** Number of possible alignment values. */
|
||||
export const SIZE: usize = 1 << <usize>BITS;
|
||||
|
||||
/** Mask to obtain just the alignment bits. */
|
||||
export const MASK: usize = SIZE - 1;
|
16
std/assembly/allocator/common/index.ts
Normal file
16
std/assembly/allocator/common/index.ts
Normal file
@ -0,0 +1,16 @@
|
||||
/**
|
||||
* 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
|
Reference in New Issue
Block a user