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:
Daniel Wirtz
2019-02-21 00:11:22 +01:00
committed by GitHub
parent e623786b42
commit 0c64f21250
234 changed files with 16949 additions and 37871 deletions

View File

@ -1,4 +1,3 @@
import {
CharCode,
allocateUnsafe as allocateUnsafeString,
@ -10,7 +9,7 @@ import {
LOAD
} from "./arraybuffer";
export const MAX_DOUBLE_LENGTH = 28;
@lazy export const MAX_DOUBLE_LENGTH = 28;
@inline
export function POWERS10(): u32[] {
@ -359,16 +358,13 @@ export function itoa<T>(value: T): String {
}
}
var _K: i32 = 0;
var _frc: u64 = 0;
var _exp: i32 = 0;
var _frc_minus: u64 = 0;
var _frc_plus: u64 = 0;
var _frc_pow: u64 = 0;
var _exp_pow: i32 = 0;
@lazy var _K: i32 = 0;
// @lazy var _frc: u64 = 0;
@lazy var _exp: i32 = 0;
@lazy var _frc_minus: u64 = 0;
@lazy var _frc_plus: u64 = 0;
@lazy var _frc_pow: u64 = 0;
@lazy var _exp_pow: i32 = 0;
@inline
function umul64f(u: u64, v: u64): u64 {