mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-18 17:31:29 +00:00
Rework resolver (#489)
* Rework IR and resolver to use nested lookup tables * Integrate types into IR * Make components prefer IR, slimmed down AST * Implement `export *` * Add `@lazy` annotation and remove `--noTreeShaking` * Add `@start` annotation and remove magic `main` * Related refactoring, cleanup and docs
This commit is contained in:
@ -8,9 +8,9 @@ import {
|
||||
|
||||
// A deterministic hash set based on CloseTable from https://github.com/jorendorff/dht
|
||||
|
||||
const INITIAL_CAPACITY = 4;
|
||||
const FILL_FACTOR: f64 = 8 / 3;
|
||||
const FREE_FACTOR: f64 = 3 / 4;
|
||||
@inline const INITIAL_CAPACITY = 4;
|
||||
@inline const FILL_FACTOR: f64 = 8 / 3;
|
||||
@inline const FREE_FACTOR: f64 = 3 / 4;
|
||||
|
||||
/** Structure of a set entry. */
|
||||
@unmanaged class SetEntry<K> {
|
||||
@ -19,10 +19,10 @@ const FREE_FACTOR: f64 = 3 / 4;
|
||||
}
|
||||
|
||||
/** Empty bit. */
|
||||
const EMPTY: usize = 1 << 0;
|
||||
@inline const EMPTY: usize = 1 << 0;
|
||||
|
||||
/** Size of a bucket. */
|
||||
const BUCKET_SIZE = sizeof<usize>();
|
||||
@inline const BUCKET_SIZE = sizeof<usize>();
|
||||
|
||||
/** Computes the alignment of an entry. */
|
||||
@inline function ENTRY_ALIGN<K>(): usize {
|
||||
|
Reference in New Issue
Block a user