Update internal ABI to zero/sign-extend where necessary only (#87)

This commit is contained in:
Daniel Wirtz
2018-05-06 00:00:54 +02:00
committed by GitHub
parent ce2bf00d62
commit 50f6c1c460
72 changed files with 8846 additions and 9459 deletions

View File

@ -255,9 +255,9 @@ function node_for_ptr(ptr: usize, bucket: usize): usize {
/*
* Given the index of a node, this returns the "is split" flag of the parent.
*/
function parent_is_split(index: usize): i32 {
function parent_is_split(index: usize): bool {
index = (index - 1) / 2;
return (node_is_split$get(index / 8) >>> <i32>(index % 8)) & 1;
return ((node_is_split$get(index / 8) >>> <i32>(index % 8)) & 1) == 1;
}
/*

2
std/portable.d.ts vendored
View File

@ -247,7 +247,7 @@ declare class Array<T> {
shift(): T;
some(callbackfn: (element: T, index: i32, array?: Array<T>) => bool): bool;
unshift(element: T): i32;
slice(from: i32, to?: i32): T[];
slice(from?: i32, to?: i32): T[];
splice(start: i32, deleteCount?: i32): void;
reverse(): T[];
sort(comparator?: (a: T, b: T) => i32): this;