From 334d944f67a1052befec44da9aaf1474635dd651 Mon Sep 17 00:00:00 2001 From: Willem Wyndham Date: Wed, 12 Jun 2019 07:52:53 -0400 Subject: [PATCH] Added paths option to resolve stdlib imports in IDEs (#637) --- std/assembly.json | 8 +++++++- std/assembly/rt/index.d.ts | 1 + std/assembly/rt/pure.ts | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/std/assembly.json b/std/assembly.json index ed68ff86..10a3e067 100644 --- a/std/assembly.json +++ b/std/assembly.json @@ -6,6 +6,12 @@ "noLib": true, "allowJs": false, "typeRoots": [ "types" ], - "types": [ "assembly" ] + "types": [ "assembly" ], + "baseUrl": ".", + "paths": { + "*": [ + "./assembly/*" + ] + } } } diff --git a/std/assembly/rt/index.d.ts b/std/assembly/rt/index.d.ts index 55a80a9b..29af9f0b 100644 --- a/std/assembly/rt/index.d.ts +++ b/std/assembly/rt/index.d.ts @@ -10,3 +10,4 @@ declare function __visit(ref: usize, cookie: i32): void; declare function __visit_globals(cookie: u32): void; declare function __visit_members(ref: usize, cookie: u32): void; declare function __allocArray(length: i32, alignLog2: usize, id: u32, data?: usize): usize; +declare const ASC_RTRACE: boolean; \ No newline at end of file diff --git a/std/assembly/rt/pure.ts b/std/assembly/rt/pure.ts index 8fdc7d94..bc5c7713 100644 --- a/std/assembly/rt/pure.ts +++ b/std/assembly/rt/pure.ts @@ -15,7 +15,7 @@ import { onincrement, ondecrement, onfree, onalloc } from "./rtrace"; // B: buffered // @ts-ignore: decorator -@inline const BUFFERED_MASK: u32 = 1 << (sizeof() * 8 - 1); +@inline const BUFFERED_MASK: u32 = 1 << ((sizeof() * 8) - 1); // @ts-ignore: decorator @inline const COLOR_BITS = 3; // @ts-ignore: decorator