@glimmer/program
Advanced tools
Comparing version 0.32.3 to 0.32.4
@@ -302,2 +302,3 @@ define('@glimmer/program', ['exports', '@glimmer/util'], function (exports, util) { 'use strict'; | ||
} | ||
var PAGE_SIZE = 0x100000; | ||
/** | ||
@@ -330,2 +331,3 @@ * The Heap is responsible for dynamically allocating | ||
this.handle = 0; | ||
this.capacity = PAGE_SIZE; | ||
if (serializedHeap) { | ||
@@ -340,4 +342,5 @@ var buffer = serializedHeap.buffer, | ||
this.handle = handle; | ||
this.capacity = 0; | ||
} else { | ||
this.heap = new Uint16Array(0x100000); | ||
this.heap = new Uint16Array(PAGE_SIZE); | ||
this.table = []; | ||
@@ -348,5 +351,16 @@ } | ||
Heap.prototype.push = function push(item) { | ||
this.sizeCheck(); | ||
this.heap[this.offset++] = item; | ||
}; | ||
Heap.prototype.sizeCheck = function sizeCheck() { | ||
if (this.capacity === 0) { | ||
var heap = slice(this.heap, 0, this.offset); | ||
this.heap = new Uint16Array(heap.length + PAGE_SIZE); | ||
this.heap.set(heap, 0); | ||
this.capacity = PAGE_SIZE; | ||
} | ||
this.capacity--; | ||
}; | ||
Heap.prototype.getbyaddr = function getbyaddr(address) { | ||
@@ -448,2 +462,3 @@ return this.heap[address]; | ||
Heap.prototype.pushPlaceholder = function pushPlaceholder(valueFunc) { | ||
this.sizeCheck(); | ||
var address = this.offset++; | ||
@@ -467,5 +482,7 @@ this.heap[address] = 65535 /* MAX_SIZE */; | ||
Heap.prototype.capture = function capture() { | ||
var offset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.offset; | ||
this.patchPlaceholders(); | ||
// Only called in eager mode | ||
var buffer = slice(this.heap, 0, this.offset); | ||
var buffer = slice(this.heap, 0, offset).buffer; | ||
return { | ||
@@ -533,16 +550,12 @@ handle: this.handle, | ||
function slice(arr, start, end) { | ||
if (arr instanceof Uint16Array) { | ||
if (arr.slice !== undefined) { | ||
return arr.slice(start, end).buffer; | ||
} | ||
var ret = new Uint16Array(end); | ||
for (; start < end; start++) { | ||
ret[start] = arr[start]; | ||
} | ||
return ret.buffer; | ||
if (arr.slice !== undefined) { | ||
return arr.slice(start, end); | ||
} | ||
return null; | ||
var ret = new Uint16Array(end); | ||
for (; start < end; start++) { | ||
ret[start] = arr[start]; | ||
} | ||
return ret; | ||
} | ||
exports.WELL_KNOWN_EMPTY_ARRAY_POSITION = WELL_KNOWN_EMPTY_ARRAY_POSITION; | ||
exports.WriteOnlyConstants = WriteOnlyConstants; | ||
@@ -561,2 +574,2 @@ exports.RuntimeConstants = RuntimeConstants; | ||
}); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2xpbW1lci1wcm9ncmFtLmpzIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9AZ2xpbW1lci9wcm9ncmFtL2xpYi9jb25zdGFudHMudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9AZ2xpbW1lci9wcm9ncmFtL2xpYi9vcGNvZGUudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9AZ2xpbW1lci9wcm9ncmFtL2xpYi9wcm9ncmFtLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE9wYXF1ZSwgU3ltYm9sVGFibGUsIFJ1bnRpbWVSZXNvbHZlciwgQ29tcGlsZVRpbWVDb25zdGFudHMgfSBmcm9tIFwiQGdsaW1tZXIvaW50ZXJmYWNlc1wiO1xuXG5jb25zdCBVTlJFU09MVkVEID0ge307XG5cbmV4cG9ydCBjb25zdCBXRUxMX0tOT1dOX0VNUFRZX0FSUkFZX1BPU0lUSU9OID0gMDtcbmNvbnN0IFdFTExfS05PV19FTVBUWV9BUlJBWSA9IE9iamVjdC5mcmVlemUoW10pO1xuZXhwb3J0IHR5cGUgRU1QVFlfQVJSQVkgPSBBcnJheTxSZWFkb25seUFycmF5PG5ldmVyPj47XG5cbmV4cG9ydCBpb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ZUFDZixLQUFLOzs7OztBQUloQixJQUFtQzs7Ozs7Ozs7OztFQUFRO0FBSTNDLGVBQWUsS0FBa0IsT0FBZSxLQUM5QztRQUFJLElBQUksVUFBVSxXQUFXO2VBQ3BCLElBQUksTUFBTSxPQUFPOztRQUd0QixNQUFNLElBQUksWUFBWTtXQUVuQixRQUFRLEtBQUssU0FBUztZQUN2QixTQUFVLElBQUk7O1dBR2I7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ== |
@@ -7,3 +7,3 @@ "use strict"; | ||
const UNRESOLVED = {}; | ||
const WELL_KNOWN_EMPTY_ARRAY_POSITION = exports.WELL_KNOWN_EMPTY_ARRAY_POSITION = 0; | ||
const WELL_KNOWN_EMPTY_ARRAY_POSITION = 0; | ||
const WELL_KNOW_EMPTY_ARRAY = Object.freeze([]); | ||
@@ -184,2 +184,2 @@ class WriteOnlyConstants { | ||
exports.LazyConstants = LazyConstants; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcGFja2FnZXMvQGdsaW1tZXIvcHJvZ3JhbS9saWIvY29uc3RhbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBRUEsTUFBTSxBQUFVLGFBQUcsQUFBRSxBQUFDLEFBRXRCLEFBQU07QUFBQyxNQUFNLEFBQStCLDRFQUFHLEFBQUMsQUFBQztBQUNqRCxNQUFNLEFBQXFCLHdCQUFHLEFBQU0sT0FBQyxBQUFNLE9BQUMsQUFBRSxBQUFDLEFBQUMsQUFtQmhELEFBQU07O2tCQUNKLEFBQWlCO0FBRVA7YUFBTyxVQUFhLEFBQUUsQUFBQyxBQUN2QjthQUFNLFNBQTZCLENBQUMsQUFBcUIsQUFBQyxBQUFDLEFBQzNEO2FBQU0sU0FBa0IsQUFBRSxBQU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2VyaWFsaXphYmxlcy5wdXNoKHZhbHVlKSAtIDE7XG4gIH1cblxuICBnZXRTZXJpYWxpemFibGU8VD4oczogbnVtYmVyKTogVCB7XG4gICAgcmV0dXJuIHRoaXMuc2VyaWFsaXphYmxlc1tzXSBhcyBUO1xuICB9XG5cbiAgZ2V0T3RoZXI8VD4odmFsdWU6IG51bWJlcik6IFQge1xuICAgIHJldHVybiB0aGlzLm90aGVyc1t2YWx1ZSAtIDFdIGFzIFQ7XG4gIH1cblxuICBvdGhlcihvdGhlcjogT3BhcXVlKTogbnVtYmVyIHtcbiAgICByZXR1cm4gdGhpcy5vdGhlcnMucHVzaChvdGhlcik7XG4gIH1cbn1cbiJdfQ== |
"use strict"; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJuYWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wYWNrYWdlcy9AZ2xpbW1lci9wcm9ncmFtL2xpYi9pbnRlcm5hbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgVW5pcXVlLCBSdW50aW1lUmVzb2x2ZXIgYXMgSVJlc29sdmVyIH0gZnJvbSAnQGdsaW1tZXIvaW50ZXJmYWNlcyc7XG5cbmV4cG9ydCB0eXBlIExvY2F0b3IgPSBVbmlxdWU8J0xvY2F0b3InPjtcbmV4cG9ydCB0eXBlIFJlZmVycmVyID0gVW5pcXVlPCdSZWZlcnJlcic+O1xuZXhwb3J0IHR5cGUgUmVzb2x2ZXIgPSBJUmVzb2x2ZXI8TG9jYXRvcj47XG4iXX0= | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJuYWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wYWNrYWdlcy9AZ2xpbW1lci9wcm9ncmFtL2xpYi9pbnRlcm5hbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgVW5pcXVlLCBSdW50aW1lUmVzb2x2ZXIgYXMgSVJlc29sdmVyIH0gZnJvbSAnQGdsaW1tZXIvaW50ZXJmYWNlcyc7XG5cbmV4cG9ydCB0eXBlIFRlbXBsYXRlTWV0YSA9IFVuaXF1ZTwnVGVtcGxhdGVNZXRhJz47XG5leHBvcnQgdHlwZSBSZWZlcnJlciA9IFVuaXF1ZTwnUmVmZXJyZXInPjtcbmV4cG9ydCB0eXBlIFJlc29sdmVyID0gSVJlc29sdmVyPFRlbXBsYXRlTWV0YT47XG4iXX0= |
@@ -20,2 +20,3 @@ 'use strict'; | ||
} | ||
const PAGE_SIZE = 0x100000; | ||
/** | ||
@@ -46,2 +47,3 @@ * The Heap is responsible for dynamically allocating | ||
this.handle = 0; | ||
this.capacity = PAGE_SIZE; | ||
if (serializedHeap) { | ||
@@ -53,4 +55,5 @@ let { buffer, table, handle } = serializedHeap; | ||
this.handle = handle; | ||
this.capacity = 0; | ||
} else { | ||
this.heap = new Uint16Array(0x100000); | ||
this.heap = new Uint16Array(PAGE_SIZE); | ||
this.table = []; | ||
@@ -60,4 +63,14 @@ } | ||
push(item) { | ||
this.sizeCheck(); | ||
this.heap[this.offset++] = item; | ||
} | ||
sizeCheck() { | ||
if (this.capacity === 0) { | ||
let heap = slice(this.heap, 0, this.offset); | ||
this.heap = new Uint16Array(heap.length + PAGE_SIZE); | ||
this.heap.set(heap, 0); | ||
this.capacity = PAGE_SIZE; | ||
} | ||
this.capacity--; | ||
} | ||
getbyaddr(address) { | ||
@@ -147,2 +160,3 @@ return this.heap[address]; | ||
pushPlaceholder(valueFunc) { | ||
this.sizeCheck(); | ||
let address = this.offset++; | ||
@@ -161,6 +175,6 @@ this.heap[address] = 65535 /* MAX_SIZE */; | ||
} | ||
capture() { | ||
capture(offset = this.offset) { | ||
this.patchPlaceholders(); | ||
// Only called in eager mode | ||
let buffer = slice(this.heap, 0, this.offset); | ||
let buffer = slice(this.heap, 0, offset).buffer; | ||
return { | ||
@@ -206,14 +220,11 @@ handle: this.handle, | ||
function slice(arr, start, end) { | ||
if (arr instanceof Uint16Array) { | ||
if (arr.slice !== undefined) { | ||
return arr.slice(start, end).buffer; | ||
} | ||
let ret = new Uint16Array(end); | ||
for (; start < end; start++) { | ||
ret[start] = arr[start]; | ||
} | ||
return ret.buffer; | ||
if (arr.slice !== undefined) { | ||
return arr.slice(start, end); | ||
} | ||
return null; | ||
let ret = new Uint16Array(end); | ||
for (; start < end; start++) { | ||
ret[start] = arr[start]; | ||
} | ||
return ret; | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZ3JhbS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL3Byb2dyYW0vbGliL3Byb2dyYW0udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUdBLEFBQU8sQUFBYSxBQUFrQixBQUFFLEFBQWdCLEFBQWdCLEFBQU0sQUFBYSxBQUFDOztBQUM1RixBQUFPLEFBQUUsQUFBTSxBQUFFLEFBQU0sQUFBVSxBQUFDOztBQUNsQyxBQUFPLEFBQUUsQUFBTSxBQUFFLEFBQU0sQUFBZSxBQUFDOztBQWtCdkMseUJBQXlCLEFBQVksTUFBRSxBQUFpQixXQUFFLEFBQWEsT0FDckUsQUFBTTtXQUFDLEFBQUksQUFBRyxPQUFDLEFBQVMsYUFBSSxBQUFFLEFBQUMsS0FBRyxBQUFLLFNBQUksQUFBRSxBQUFDLEFBQ2hELEFBQUM7O0FBRUQscUJBQXFCLEFBQVksTUFBRSxBQUFnQixVQUNqRCxBQUFNO1dBQUMsQUFBSSxPQUFHLEFB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ZW5kKTtcblxuICBmb3IgKDsgc3RhcnQgPCBlbmQ7IHN0YXJ0KyspIHtcbiAgICByZXRbc3RhcnRdICA9IGFycltzdGFydF07XG4gIH1cblxuICByZXR1cm4gcmV0O1xufVxuIl19 |
@@ -33,3 +33,3 @@ "use strict"; | ||
var UNRESOLVED = {}; | ||
var WELL_KNOWN_EMPTY_ARRAY_POSITION = exports.WELL_KNOWN_EMPTY_ARRAY_POSITION = 0; | ||
var WELL_KNOWN_EMPTY_ARRAY_POSITION = 0; | ||
var WELL_KNOW_EMPTY_ARRAY = Object.freeze([]); | ||
@@ -263,2 +263,2 @@ | ||
exports.LazyConstants = LazyConstants; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcGFja2FnZXMvQGdsaW1tZXIvcHJvZ3JhbS9saWIvY29uc3RhbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFFQSxJQUFNLEFBQVUsYUFBRyxBQUFFLEFBQUMsQUFFdEIsQUFBTTtBQUFDLElBQU0sQUFBK0IsNEVBQUcsQUFBQyxBQUFDO0FBQ2pELElBQU0sQUFBcUIsd0JBQUcsQUFBTSxPQUFDLEFBQU0sT0FBQyxBQUFFLEFBQUMsQUFBQyxBQW1CaEQsQUFBTTs7SUFBTjtrQ0FDRSxBQUFpQjs4QkFFUDs7O2FBQU8sVUFBYSxBQUFFLEFBQUMsQUFDdkI7YUFBTSxTQUE2QixDQUFDLEFBQXFCLEFBQUMsQUFBQyxBQUMzRDthQUFNLFNBQWtCLEFBQUUsQUFBQyxBQUMzQjthQUFPLFVBQWEsQUFBRSxBQUFDLEFBQ3ZCO2FBQVEsV0FBYSxBQUFFLEFBQUMsQUFDeEI7YU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ICBzZXJpYWxpemFibGUodmFsdWU6IE9wYXF1ZSk6IG51bWJlciB7XG4gICAgbGV0IGluZGV4ID0gdGhpcy5zZXJpYWxpemFibGVzLmluZGV4T2YodmFsdWUpO1xuXG4gICAgaWYgKGluZGV4ID4gLTEpIHtcbiAgICAgIHJldHVybiBpbmRleDtcbiAgICB9XG5cbiAgICByZXR1cm4gdGhpcy5zZXJpYWxpemFibGVzLnB1c2godmFsdWUpIC0gMTtcbiAgfVxuXG4gIGdldFNlcmlhbGl6YWJsZTxUPihzOiBudW1iZXIpOiBUIHtcbiAgICByZXR1cm4gdGhpcy5zZXJpYWxpemFibGVzW3NdIGFzIFQ7XG4gIH1cblxuICBnZXRPdGhlcjxUPih2YWx1ZTogbnVtYmVyKTogVCB7XG4gICAgcmV0dXJuIHRoaXMub3RoZXJzW3ZhbHVlIC0gMV0gYXMgVDtcbiAgfVxuXG4gIG90aGVyKG90aGVyOiBPcGFxdWUpOiBudW1iZXIge1xuICAgIHJldHVybiB0aGlzLm90aGVycy5wdXNoKG90aGVyKTtcbiAgfVxufVxuIl19 |
"use strict"; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJuYWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wYWNrYWdlcy9AZ2xpbW1lci9wcm9ncmFtL2xpYi9pbnRlcm5hbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgVW5pcXVlLCBSdW50aW1lUmVzb2x2ZXIgYXMgSVJlc29sdmVyIH0gZnJvbSAnQGdsaW1tZXIvaW50ZXJmYWNlcyc7XG5cbmV4cG9ydCB0eXBlIExvY2F0b3IgPSBVbmlxdWU8J0xvY2F0b3InPjtcbmV4cG9ydCB0eXBlIFJlZmVycmVyID0gVW5pcXVlPCdSZWZlcnJlcic+O1xuZXhwb3J0IHR5cGUgUmVzb2x2ZXIgPSBJUmVzb2x2ZXI8TG9jYXRvcj47XG4iXX0= | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJuYWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wYWNrYWdlcy9AZ2xpbW1lci9wcm9ncmFtL2xpYi9pbnRlcm5hbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgVW5pcXVlLCBSdW50aW1lUmVzb2x2ZXIgYXMgSVJlc29sdmVyIH0gZnJvbSAnQGdsaW1tZXIvaW50ZXJmYWNlcyc7XG5cbmV4cG9ydCB0eXBlIFRlbXBsYXRlTWV0YSA9IFVuaXF1ZTwnVGVtcGxhdGVNZXRhJz47XG5leHBvcnQgdHlwZSBSZWZlcnJlciA9IFVuaXF1ZTwnUmVmZXJyZXInPjtcbmV4cG9ydCB0eXBlIFJlc29sdmVyID0gSVJlc29sdmVyPFRlbXBsYXRlTWV0YT47XG4iXX0= |
@@ -46,2 +46,3 @@ "use strict"; | ||
} | ||
var PAGE_SIZE = 0x100000; | ||
/** | ||
@@ -74,2 +75,3 @@ * The Heap is responsible for dynamically allocating | ||
this.handle = 0; | ||
this.capacity = PAGE_SIZE; | ||
if (serializedHeap) { | ||
@@ -84,4 +86,5 @@ var buffer = serializedHeap.buffer, | ||
this.handle = handle; | ||
this.capacity = 0; | ||
} else { | ||
this.heap = new Uint16Array(0x100000); | ||
this.heap = new Uint16Array(PAGE_SIZE); | ||
this.table = []; | ||
@@ -92,5 +95,16 @@ } | ||
Heap.prototype.push = function push(item) { | ||
this.sizeCheck(); | ||
this.heap[this.offset++] = item; | ||
}; | ||
Heap.prototype.sizeCheck = function sizeCheck() { | ||
if (this.capacity === 0) { | ||
var heap = slice(this.heap, 0, this.offset); | ||
this.heap = new Uint16Array(heap.length + PAGE_SIZE); | ||
this.heap.set(heap, 0); | ||
this.capacity = PAGE_SIZE; | ||
} | ||
this.capacity--; | ||
}; | ||
Heap.prototype.getbyaddr = function getbyaddr(address) { | ||
@@ -195,2 +209,3 @@ return this.heap[address]; | ||
Heap.prototype.pushPlaceholder = function pushPlaceholder(valueFunc) { | ||
this.sizeCheck(); | ||
var address = this.offset++; | ||
@@ -216,5 +231,7 @@ this.heap[address] = 65535 /* MAX_SIZE */; | ||
Heap.prototype.capture = function capture() { | ||
var offset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.offset; | ||
this.patchPlaceholders(); | ||
// Only called in eager mode | ||
var buffer = slice(this.heap, 0, this.offset); | ||
var buffer = slice(this.heap, 0, offset).buffer; | ||
return { | ||
@@ -282,14 +299,11 @@ handle: this.handle, | ||
function slice(arr, start, end) { | ||
if (arr instanceof Uint16Array) { | ||
if (arr.slice !== undefined) { | ||
return arr.slice(start, end).buffer; | ||
} | ||
var ret = new Uint16Array(end); | ||
for (; start < end; start++) { | ||
ret[start] = arr[start]; | ||
} | ||
return ret.buffer; | ||
if (arr.slice !== undefined) { | ||
return arr.slice(start, end); | ||
} | ||
return null; | ||
var ret = new Uint16Array(end); | ||
for (; start < end; start++) { | ||
ret[start] = arr[start]; | ||
} | ||
return ret; | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZ3JhbS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL3Byb2dyYW0vbGliL3Byb2dyYW0udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUdBLEFBQU8sQUFBYSxBQUFrQixBQUFFLEFBQWdCLEFBQWdCLEFBQU0sQUFBYSxBQUFDOztBQUM1RixBQUFPLEFBQUUsQUFBTSxBQUFFLEFBQU0sQUFBVSxBQUFDOztB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RlbXBsYXRlTWV0YT4sIHB1YmxpYyBoZWFwOiBIZWFwKSB7XG4gICAgdGhpcy5fb3Bjb2RlID0gbmV3IE9wY29kZSh0aGlzLmhlYXApO1xuICB9XG5cbiAgb3Bjb2RlKG9mZnNldDogbnVtYmVyKTogT3Bjb2RlIHtcbiAgICB0aGlzLl9vcGNvZGUub2Zmc2V0ID0gb2Zmc2V0O1xuICAgIHJldHVybiB0aGlzLl9vcGNvZGU7XG4gIH1cbn1cblxuZXhwb3J0IGNsYXNzIFByb2dyYW08VGVtcGxhdGVNZXRhPiBleHRlbmRzIFdyaXRlT25seVByb2dyYW0ge1xuICBwdWJsaWMgY29uc3RhbnRzOiBDb25zdGFudHM8VGVtcGxhdGVNZXRhPjtcbn1cblxuZnVuY3Rpb24gc2xpY2UoYXJyOiBVaW50MTZBcnJheSwgc3RhcnQ6IG51bWJlciwgZW5kOiBudW1iZXIpOiBVaW50MTZBcnJheSB7XG4gIGlmIChhcnIuc2xpY2UgIT09IHVuZGVmaW5lZCkge1xuICAgIHJldHVybiBhcnIuc2xpY2Uoc3RhcnQsIGVuZCk7XG4gIH1cblxuICBsZXQgcmV0ID0gbmV3IFVpbnQxNkFycmF5KGVuZCk7XG5cbiAgZm9yICg7IHN0YXJ0IDwgZW5kOyBzdGFydCsrKSB7XG4gICAgcmV0W3N0YXJ0XSAgPSBhcnJbc3RhcnRdO1xuICB9XG5cbiAgcmV0dXJuIHJldDtcbn1cbiJdfQ== |
const UNRESOLVED = {}; | ||
export const WELL_KNOWN_EMPTY_ARRAY_POSITION = 0; | ||
const WELL_KNOWN_EMPTY_ARRAY_POSITION = 0; | ||
const WELL_KNOW_EMPTY_ARRAY = Object.freeze([]); | ||
@@ -174,2 +174,2 @@ export class WriteOnlyConstants { | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsi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W5pcXVlLCBSdW50aW1lUmVzb2x2ZXIgYXMgSVJlc29sdmVyIH0gZnJvbSAnQGdsaW1tZXIvaW50ZXJmYWNlcyc7XG5cbmV4cG9ydCB0eXBlIExvY2F0b3IgPSBVbmlxdWU8J0xvY2F0b3InPjtcbmV4cG9ydCB0eXBlIFJlZmVycmVyID0gVW5pcXVlPCdSZWZlcnJlcic+O1xuZXhwb3J0IHR5cGUgUmVzb2x2ZXIgPSBJUmVzb2x2ZXI8TG9jYXRvcj47XG4iXX0= | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJuYWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wYWNrYWdlcy9AZ2xpbW1lci9wcm9ncmFtL2xpYi9pbnRlcm5hbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgVW5pcXVlLCBSdW50aW1lUmVzb2x2ZXIgYXMgSVJlc29sdmVyIH0gZnJvbSAnQGdsaW1tZXIvaW50ZXJmYWNlcyc7XG5cbmV4cG9ydCB0eXBlIFRlbXBsYXRlTWV0YSA9IFVuaXF1ZTwnVGVtcGxhdGVNZXRhJz47XG5leHBvcnQgdHlwZSBSZWZlcnJlciA9IFVuaXF1ZTwnUmVmZXJyZXInPjtcbmV4cG9ydCB0eXBlIFJlc29sdmVyID0gSVJlc29sdmVyPFRlbXBsYXRlTWV0YT47XG4iXX0= |
@@ -11,2 +11,3 @@ | ||
} | ||
const PAGE_SIZE = 0x100000; | ||
/** | ||
@@ -37,2 +38,3 @@ * The Heap is responsible for dynamically allocating | ||
this.handle = 0; | ||
this.capacity = PAGE_SIZE; | ||
if (serializedHeap) { | ||
@@ -44,4 +46,5 @@ let { buffer, table, handle } = serializedHeap; | ||
this.handle = handle; | ||
this.capacity = 0; | ||
} else { | ||
this.heap = new Uint16Array(0x100000); | ||
this.heap = new Uint16Array(PAGE_SIZE); | ||
this.table = []; | ||
@@ -51,4 +54,14 @@ } | ||
push(item) { | ||
this.sizeCheck(); | ||
this.heap[this.offset++] = item; | ||
} | ||
sizeCheck() { | ||
if (this.capacity === 0) { | ||
let heap = slice(this.heap, 0, this.offset); | ||
this.heap = new Uint16Array(heap.length + PAGE_SIZE); | ||
this.heap.set(heap, 0); | ||
this.capacity = PAGE_SIZE; | ||
} | ||
this.capacity--; | ||
} | ||
getbyaddr(address) { | ||
@@ -138,2 +151,3 @@ return this.heap[address]; | ||
pushPlaceholder(valueFunc) { | ||
this.sizeCheck(); | ||
let address = this.offset++; | ||
@@ -152,6 +166,6 @@ this.heap[address] = 65535 /* MAX_SIZE */; | ||
} | ||
capture() { | ||
capture(offset = this.offset) { | ||
this.patchPlaceholders(); | ||
// Only called in eager mode | ||
let buffer = slice(this.heap, 0, this.offset); | ||
let buffer = slice(this.heap, 0, offset).buffer; | ||
return { | ||
@@ -193,14 +207,11 @@ handle: this.handle, | ||
function slice(arr, start, end) { | ||
if (arr instanceof Uint16Array) { | ||
if (arr.slice !== undefined) { | ||
return arr.slice(start, end).buffer; | ||
} | ||
let ret = new Uint16Array(end); | ||
for (; start < end; start++) { | ||
ret[start] = arr[start]; | ||
} | ||
return ret.buffer; | ||
if (arr.slice !== undefined) { | ||
return arr.slice(start, end); | ||
} | ||
return null; | ||
let ret = new Uint16Array(end); | ||
for (; start < end; start++) { | ||
ret[start] = arr[start]; | ||
} | ||
return ret; | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZ3JhbS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL3Byb2dyYW0vbGliL3Byb2dyYW0udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUdBLEFBQU8sU0FBYSxBQUFrQix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IFdyaXRlT25seVByb2dyYW0ge1xuICBwdWJsaWMgY29uc3RhbnRzOiBDb25zdGFudHM8VGVtcGxhdGVNZXRhPjtcbn1cblxuZnVuY3Rpb24gc2xpY2UoYXJyOiBVaW50MTZBcnJheSwgc3RhcnQ6IG51bWJlciwgZW5kOiBudW1iZXIpOiBVaW50MTZBcnJheSB7XG4gIGlmIChhcnIuc2xpY2UgIT09IHVuZGVmaW5lZCkge1xuICAgIHJldHVybiBhcnIuc2xpY2Uoc3RhcnQsIGVuZCk7XG4gIH1cblxuICBsZXQgcmV0ID0gbmV3IFVpbnQxNkFycmF5KGVuZCk7XG5cbiAgZm9yICg7IHN0YXJ0IDwgZW5kOyBzdGFydCsrKSB7XG4gICAgcmV0W3N0YXJ0XSAgPSBhcnJbc3RhcnRdO1xuICB9XG5cbiAgcmV0dXJuIHJldDtcbn1cbiJdfQ== |
@@ -10,3 +10,3 @@ function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } | ||
var UNRESOLVED = {}; | ||
export var WELL_KNOWN_EMPTY_ARRAY_POSITION = 0; | ||
var WELL_KNOWN_EMPTY_ARRAY_POSITION = 0; | ||
var WELL_KNOW_EMPTY_ARRAY = Object.freeze([]); | ||
@@ -241,2 +241,2 @@ | ||
export { LazyConstants }; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcGFja2FnZXMvQGdsaW1tZXIvcHJvZ3JhbS9saWIvY29uc3RhbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBRUEsSUFBTSxBQUFVLGFBQUcsQUFBRSxBQ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QiOlsiaW1wb3J0IHsgVW5pcXVlLCBSdW50aW1lUmVzb2x2ZXIgYXMgSVJlc29sdmVyIH0gZnJvbSAnQGdsaW1tZXIvaW50ZXJmYWNlcyc7XG5cbmV4cG9ydCB0eXBlIExvY2F0b3IgPSBVbmlxdWU8J0xvY2F0b3InPjtcbmV4cG9ydCB0eXBlIFJlZmVycmVyID0gVW5pcXVlPCdSZWZlcnJlcic+O1xuZXhwb3J0IHR5cGUgUmVzb2x2ZXIgPSBJUmVzb2x2ZXI8TG9jYXRvcj47XG4iXX0= | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJuYWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wYWNrYWdlcy9AZ2xpbW1lci9wcm9ncmFtL2xpYi9pbnRlcm5hbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgVW5pcXVlLCBSdW50aW1lUmVzb2x2ZXIgYXMgSVJlc29sdmVyIH0gZnJvbSAnQGdsaW1tZXIvaW50ZXJmYWNlcyc7XG5cbmV4cG9ydCB0eXBlIFRlbXBsYXRlTWV0YSA9IFVuaXF1ZTwnVGVtcGxhdGVNZXRhJz47XG5leHBvcnQgdHlwZSBSZWZlcnJlciA9IFVuaXF1ZTwnUmVmZXJyZXInPjtcbmV4cG9ydCB0eXBlIFJlc29sdmVyID0gSVJlc29sdmVyPFRlbXBsYXRlTWV0YT47XG4iXX0= |
@@ -18,2 +18,3 @@ function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } | ||
} | ||
var PAGE_SIZE = 0x100000; | ||
/** | ||
@@ -46,2 +47,3 @@ * The Heap is responsible for dynamically allocating | ||
this.handle = 0; | ||
this.capacity = PAGE_SIZE; | ||
if (serializedHeap) { | ||
@@ -56,4 +58,5 @@ var buffer = serializedHeap.buffer, | ||
this.handle = handle; | ||
this.capacity = 0; | ||
} else { | ||
this.heap = new Uint16Array(0x100000); | ||
this.heap = new Uint16Array(PAGE_SIZE); | ||
this.table = []; | ||
@@ -64,5 +67,16 @@ } | ||
Heap.prototype.push = function push(item) { | ||
this.sizeCheck(); | ||
this.heap[this.offset++] = item; | ||
}; | ||
Heap.prototype.sizeCheck = function sizeCheck() { | ||
if (this.capacity === 0) { | ||
var heap = slice(this.heap, 0, this.offset); | ||
this.heap = new Uint16Array(heap.length + PAGE_SIZE); | ||
this.heap.set(heap, 0); | ||
this.capacity = PAGE_SIZE; | ||
} | ||
this.capacity--; | ||
}; | ||
Heap.prototype.getbyaddr = function getbyaddr(address) { | ||
@@ -168,2 +182,3 @@ return this.heap[address]; | ||
Heap.prototype.pushPlaceholder = function pushPlaceholder(valueFunc) { | ||
this.sizeCheck(); | ||
var address = this.offset++; | ||
@@ -189,5 +204,7 @@ this.heap[address] = 65535 /* MAX_SIZE */; | ||
Heap.prototype.capture = function capture() { | ||
var offset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.offset; | ||
this.patchPlaceholders(); | ||
// Only called in eager mode | ||
var buffer = slice(this.heap, 0, this.offset); | ||
var buffer = slice(this.heap, 0, offset).buffer; | ||
return { | ||
@@ -255,14 +272,11 @@ handle: this.handle, | ||
function slice(arr, start, end) { | ||
if (arr instanceof Uint16Array) { | ||
if (arr.slice !== undefined) { | ||
return arr.slice(start, end).buffer; | ||
} | ||
var ret = new Uint16Array(end); | ||
for (; start < end; start++) { | ||
ret[start] = arr[start]; | ||
} | ||
return ret.buffer; | ||
if (arr.slice !== undefined) { | ||
return arr.slice(start, end); | ||
} | ||
return null; | ||
var ret = new Uint16Array(end); | ||
for (; start < end; start++) { | ||
ret[start] = arr[start]; | ||
} | ||
return ret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29uc3RhbnRzKHJlc29sdmVyLCBwb29sKTtcblxuICAgIHJldHVybiBuZXcgUnVudGltZVByb2dyYW0oY29uc3RhbnRzLCBoZWFwKTtcbiAgfVxuXG4gIHByaXZhdGUgX29wY29kZTogT3Bjb2RlO1xuXG4gIGNvbnN0cnVjdG9yKHB1YmxpYyBjb25zdGFudHM6IFJ1bnRpbWVDb25zdGFudHM8VGVtcGxhdGVNZXRhPiwgcHVibGljIGhlYXA6IEhlYXApIHtcbiAgICB0aGlzLl9vcGNvZGUgPSBuZXcgT3Bjb2RlKHRoaXMuaGVhcCk7XG4gIH1cblxuICBvcGNvZGUob2Zmc2V0OiBudW1iZXIpOiBPcGNvZGUge1xuICAgIHRoaXMuX29wY29kZS5vZmZzZXQgPSBvZmZzZXQ7XG4gICAgcmV0dXJuIHRoaXMuX29wY29kZTtcbiAgfVxufVxuXG5leHBvcnQgY2xhc3MgUHJvZ3JhbTxUZW1wbGF0ZU1ldGE+IGV4dGVuZHMgV3JpdGVPbmx5UHJvZ3JhbSB7XG4gIHB1YmxpYyBjb25zdGFudHM6IENvbnN0YW50czxUZW1wbGF0ZU1ldGE+O1xufVxuXG5mdW5jdGlvbiBzbGljZShhcnI6IFVpbnQxNkFycmF5LCBzdGFydDogbnVtYmVyLCBlbmQ6IG51bWJlcik6IFVpbnQxNkFycmF5IHtcbiAgaWYgKGFyci5zbGljZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgcmV0dXJuIGFyci5zbGljZShzdGFydCwgZW5kKTtcbiAgfVxuXG4gIGxldCByZXQgPSBuZXcgVWludDE2QXJyYXkoZW5kKTtcblxuICBmb3IgKDsgc3RhcnQgPCBlbmQ7IHN0YXJ0KyspIHtcbiAgICByZXRbc3RhcnRdICA9IGFycltzdGFydF07XG4gIH1cblxuICByZXR1cm4gcmV0O1xufVxuIl19 |
import { Opaque, SymbolTable, RuntimeResolver, CompileTimeConstants } from "@glimmer/interfaces"; | ||
export declare const WELL_KNOWN_EMPTY_ARRAY_POSITION = 0; | ||
export declare type EMPTY_ARRAY = Array<ReadonlyArray<never>>; | ||
@@ -33,4 +32,4 @@ export interface ConstantPool { | ||
} | ||
export declare class RuntimeConstants<Locator> { | ||
resolver: RuntimeResolver<Locator>; | ||
export declare class RuntimeConstants<TemplateMeta> { | ||
resolver: RuntimeResolver<TemplateMeta>; | ||
protected strings: string[]; | ||
@@ -41,3 +40,3 @@ protected arrays: number[][] | EMPTY_ARRAY; | ||
protected numbers: number[]; | ||
constructor(resolver: RuntimeResolver<Locator>, pool: ConstantPool); | ||
constructor(resolver: RuntimeResolver<TemplateMeta>, pool: ConstantPool); | ||
getString(value: number): string; | ||
@@ -50,5 +49,5 @@ getNumber(value: number): number; | ||
} | ||
export declare class Constants<Locator> extends WriteOnlyConstants { | ||
resolver: RuntimeResolver<Locator>; | ||
constructor(resolver: RuntimeResolver<Locator>, pool?: ConstantPool); | ||
export declare class Constants<TemplateMeta> extends WriteOnlyConstants { | ||
resolver: RuntimeResolver<TemplateMeta>; | ||
constructor(resolver: RuntimeResolver<TemplateMeta>, pool?: ConstantPool); | ||
getNumber(value: number): number; | ||
@@ -55,0 +54,0 @@ getString(value: number): string; |
import { Unique, RuntimeResolver as IResolver } from '@glimmer/interfaces'; | ||
export declare type Locator = Unique<'Locator'>; | ||
export declare type TemplateMeta = Unique<'TemplateMeta'>; | ||
export declare type Referrer = Unique<'Referrer'>; | ||
export declare type Resolver = IResolver<Locator>; | ||
export declare type Resolver = IResolver<TemplateMeta>; |
@@ -36,4 +36,6 @@ import { CompileTimeProgram, VMHandle, RuntimeResolver, CompileTimeHeap } from "@glimmer/interfaces"; | ||
private handle; | ||
private capacity; | ||
constructor(serializedHeap?: SerializedHeap); | ||
push(item: number): void; | ||
private sizeCheck(); | ||
getbyaddr(address: number): number; | ||
@@ -59,3 +61,3 @@ setbyaddr(address: number, value: number): void; | ||
private patchPlaceholders(); | ||
capture(): SerializedHeap; | ||
capture(offset?: number): SerializedHeap; | ||
} | ||
@@ -70,13 +72,13 @@ export declare class WriteOnlyProgram implements CompileTimeProgram { | ||
} | ||
export declare class RuntimeProgram<Locator> { | ||
constants: RuntimeConstants<Locator>; | ||
export declare class RuntimeProgram<TemplateMeta> { | ||
constants: RuntimeConstants<TemplateMeta>; | ||
heap: Heap; | ||
[key: number]: never; | ||
static hydrate<Locator>(rawHeap: SerializedHeap, pool: ConstantPool, resolver: RuntimeResolver<Locator>): RuntimeProgram<Locator>; | ||
static hydrate<TemplateMeta>(rawHeap: SerializedHeap, pool: ConstantPool, resolver: RuntimeResolver<TemplateMeta>): RuntimeProgram<TemplateMeta>; | ||
private _opcode; | ||
constructor(constants: RuntimeConstants<Locator>, heap: Heap); | ||
constructor(constants: RuntimeConstants<TemplateMeta>, heap: Heap); | ||
opcode(offset: number): Opcode; | ||
} | ||
export declare class Program<Locator> extends WriteOnlyProgram { | ||
constants: Constants<Locator>; | ||
export declare class Program<TemplateMeta> extends WriteOnlyProgram { | ||
constants: Constants<TemplateMeta>; | ||
} |
{ | ||
"name": "@glimmer/program", | ||
"version": "0.32.3", | ||
"version": "0.32.4", | ||
"repository": "https://github.com/glimmerjs/glimmer-vm/tree/master/packages/@glimmer/program", | ||
"dependencies": { | ||
"@glimmer/util": "^0.32.3", | ||
"@glimmer/interfaces": "^0.32.3", | ||
"@glimmer/encoder": "^0.32.3" | ||
"@glimmer/util": "^0.32.4", | ||
"@glimmer/interfaces": "^0.32.4", | ||
"@glimmer/encoder": "^0.32.4" | ||
}, | ||
@@ -10,0 +10,0 @@ "devDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
282919
2562
Updated@glimmer/encoder@^0.32.4
Updated@glimmer/interfaces@^0.32.4
Updated@glimmer/util@^0.32.4