capabilities to detect half/full runtime header

This commit is contained in:
dcode
2019-03-18 13:45:10 +01:00
parent ba4c00efbd
commit c147e98a55
6 changed files with 30 additions and 5 deletions

View File

@ -54,7 +54,8 @@ function postInstantiate(baseModule, instance) {
var memory_fill = rawExports["memory.fill"];
var memory_free = rawExports["memory.free"];
var table = rawExports.table;
var setargc = rawExports._setargc || function() {};
var capabilities = rawExports[".capabilities"] || 0;
var setargc = rawExports[".setargc"] || function() {};
// Provide views for all sorts of basic values
var buffer, I8, U8, I16, U16, I32, U32, F32, F64, I64, U64;
@ -245,7 +246,7 @@ exports.instantiateStreaming = instantiateStreaming;
/** Demangles an AssemblyScript module's exports to a friendly object structure. */
function demangle(exports, baseModule) {
var module = baseModule ? Object.create(baseModule) : {};
var setargc = exports._setargc || function() {};
var setargc = exports[".setargc"] || function() {};
function hasOwnProperty(elem, prop) {
return Object.prototype.hasOwnProperty.call(elem, prop);
}