assemblyscript/dist/assemblyscript.js

2 lines
350 KiB
JavaScript
Raw Normal View History

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("binaryen")):"function"==typeof define&&define.amd?define(["binaryen"],t):"object"==typeof exports?exports.assemblyscript=t(require("binaryen")):e.assemblyscript=t(e.binaryen)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=27)}([function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}},o=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o};Object.defineProperty(t,"__esModule",{value:!0});var s=r(2),c=r(7),p=r(5),u=r(3);t.PATH_DELIMITER="/",t.PARENT_SUBST="..",t.GETTER_PREFIX="get:",t.SETTER_PREFIX="set:",t.INSTANCE_DELIMITER="#",t.STATIC_DELIMITER=".",t.LIBRARY_SUBST="(lib)",t.LIBRARY_PREFIX=t.LIBRARY_SUBST+t.PATH_DELIMITER;var l=function(){return function(){}}(),h=function(){return function(){}}(),_=function(){return function(){}}(),d=new Map,y=function(e){function r(t){void 0===t&&(t=null);var r=e.call(this,t)||this;return r.diagnosticsOffset=0,r.elementsLookup=new Map,r.typesLookup=d,r.typeAliases=new Map,r.fileLevelExports=new Map,r.moduleLevelExports=new Map,r.sources=[],r}return i(r,e),r.prototype.initialize=function(e){this.options=e,this.typesLookup=new Map([["i8",c.Type.i8],["i16",c.Type.i16],["i32",c.Type.i32],["i64",c.Type.i64],["isize",e.isizeType],["u8",c.Type.u8],["u16",c.Type.u16],["u32",c.Type.u32],["u64",c.Type.u64],["usize",e.usizeType],["bool",c.Type.bool],["f32",c.Type.f32],["f64",c.Type.f64],["void",c.Type.void],["number",c.Type.f64],["boolean",c.Type.bool]]);for(var t,r,n=new Map,i=new Array,u=new Array,l=0,h=this.sources.length;l<h;++l)for(var _=this.sources[l].statements,d=0,y=_.length;d<y;++d){var m=_[d];switch(m.kind){case p.NodeKind.CLASSDECLARATION:this.initializeClass(m,u);break;case p.NodeKind.ENUMDECLARATION:this.initializeEnum(m);break;case p.NodeKind.EXPORT:this.initializeExports(m,n);break;case p.NodeKind.FUNCTIONDECLARATION:this.initializeFunction(m);break;case p.NodeKind.IMPORT:this.initializeImports(m,n,i);break;case p.NodeKind.INTERFACEDECLARATION:this.initializeInterface(m);break;case p.NodeKind.NAMESPACEDECLARATION:this.initializeNamespace(m,u);break;case p.NodeKind.TYPEDECLARATION:this.initializeTypeAlias(m);break;case p.NodeKind.VARIABLE:this.initializeVariables(m)}}for(l=0;l<i.length;){var E=i[l];(C=this.tryResolveImport(E.referencedName,n))?(this.elementsLookup.set(E.internalName,C),i.splice(l,1)):(C=this.tryResolveImport(E.referencedNameAlt,n))?(this.elementsLookup.set(E.internalName,C),i.splice(l,1)):(this.error(s.DiagnosticCode.Module_0_has_no_exported_member_1,E.declaration.range,E.declaration.parent.path.value,E.declaration.externalName.text),++l)}try{for(var T=a(n),f=T.next();!f.done;f=T.next()){var A=o(f.value,2),I=A[0],v=A[1],N=v,C=void 0;do{if(!N.isReExport){(C=this.elementsLookup.get(N.referencedName))||(C=this.elementsLookup.get(N.member.name.text))?thi
2018-03-17 14:56:37 +01:00
//# sourceMappingURL=assemblyscript.js.map