tildefriends/deps/speedscope/demangle-cpp.1768f4cc.js.map

1 line
167 KiB
Plaintext
Raw Normal View History

{"version":3,"sources":["../src/lib/demangle-cpp.ts"],"names":[],"mappings":";AAwBA,aAxBA,IAAI,EAwBJ,OAAA,eAAA,QAAA,aAAA,CAAA,OAAA,IAAA,QAAA,YAAA,EAvBA,MAAM,EAAQ,IAAI,IAIZ,SAAU,EAAY,GACtB,GAAA,EAAK,WAAW,OAAQ,CACtB,IAAA,EAAS,EAAM,IAAI,QACR,IAAX,EACF,EAAO,GAEF,IACH,EAAU,IAAI,SAAS,UAAW,EAAxB,IAGZ,EAAoB,YADpB,EAAS,EAAQ,EAAK,MAAM,KACG,EAAO,EACtC,EAAM,IAAI,EAAM,GAChB,EAAO,GAGJ,OAAA,EAIT,MAAM,EAAO","file":"demangle-cpp.1768f4cc.js","sourceRoot":"../../assets","sourcesContent":["let cppfilt: (name: string) => string\nconst cache = new Map<string, string>()\n\n// This function converts a mangled C++ name such as \"__ZNK7Support6ColorFeqERKS0_\"\n// into a human-readable symbol (in this case \"Support::ColorF::==(Support::ColorF&)\")\nexport function demangleCpp(name: string): string {\n if (name.startsWith('__Z')) {\n let result = cache.get(name)\n if (result !== undefined) {\n name = result\n } else {\n if (!cppfilt) {\n cppfilt = new Function('exports', code)()\n }\n result = cppfilt(name.slice(1))\n result = result === '(null)' ? name : result\n cache.set(name, result)\n name = result\n }\n }\n return name\n}\n\n// This was taken from https://d.fuqu.jp/c++filtjs/\nconst code = `\nreturn function(){function r(r){eval.call(null,r)}function a(r){throw print(r+\":\\\\n\"+(new Error).stack),ke=!0,\"Assertion: \"+r}function e(r,e){r||a(\"Assertion failed: \"+e)}function i(r,a,i,v){function t(r,a){if(\"string\"==a){var e=Oe;return le.stackAlloc(r.length+1),A(r,e),e}return r}function f(r,a){return\"string\"==a?s(r):r}try{func=ce.Module[\"_\"+r]}catch(r){}e(func,\"Cannot call unknown function \"+r+\" (perhaps LLVM optimizations or closure removed it?)\");var _=0,n=v?v.map(function(r){return t(r,i[_++])}):[];return f(func.apply(null,n),a)}function v(r,a,e){return function(){return i(r,a,e,Array.prototype.slice.call(arguments))}}function t(r,e,i,v){switch(i=i||\"i8\",\"*\"===i[i.length-1]&&(i=\"i32\"),i){case\"i1\":Ae[r]=e;break;case\"i8\":Ae[r]=e;break;case\"i16\":ye[r>>1]=e;break;case\"i32\":Se[r>>2]=e;break;case\"i64\":Se[r>>2]=e;break;case\"float\":Ce[r>>2]=e;break;case\"double\":ze[0]=e,Se[r>>2]=xe[0],Se[r+4>>2]=xe[1];break;default:a(\"invalid type for setValue: \"+i)}}function f(r,e,i){switch(e=e||\"i8\",\"*\"===e[e.length-1]&&(e=\"i32\"),e){case\"i1\":return Ae[r];case\"i8\":return Ae[r];case\"i16\":return ye[r>>1];case\"i32\":return Se[r>>2];case\"i64\":return Se[r>>2];case\"float\":return Ce[r>>2];case\"double\":return xe[0]=Se[r>>2],xe[1]=Se[r+4>>2],ze[0];default:a(\"invalid type for setValue: \"+e)}return null}function _(r,a,e){var i,v;\"number\"==typeof r?(i=!0,v=r):(i=!1,v=r.length);var f=\"string\"==typeof a?a:null,_=[Jr,le.stackAlloc,le.staticAlloc][void 0===e?we:e](Math.max(v,f?1:a.length));if(i)return Fa(_,0,v),_;for(var s,n=0;n<v;){var o=r[n];\"function\"==typeof o&&(o=le.getFunctionIndex(o)),s=f||a[n],0!==s?(\"i64\"==s&&(s=\"i32\"),t(_+n,o,s),n+=le.getNativeTypeSize(s)):n++}return _}function s(r,a){for(var e,i=\"undefined\"==typeof a,v=\"\",t=0,f=String.fromCharCode(0);;){if(e=String.fromCharCode(ge[r+t]),i&&e==f)break;if(v+=e,t+=1,!i&&t==a)break}return v}function n(r){for(var a=\"\",e=0;e<r.length;e++)a+=String.fromCharCode(r[e]);return a}function o(r){return r+4095>>12<<12}function l(){for(;Le<=Ie;)Le=o(2*Le);var r=Ae,a=new ArrayBuffer(Le);Ae=new Int8Array(a),ye=new Int16Array(a),Se=new Int32Array(a),ge=new Uint8Array(a),me=new Uint16Array(a),Me=new Uint32Array(a),Ce=new Float32Array(a),Re=new Float64Array(a),Ae.set(r)}function b(r){for(;r.length>0;){var a=r.shift(),e=a.func;\"number\"==typeof e&&(e=pe[e]),e(void 0===a.arg?null:a.arg)}}function k(){b(Ve)}function u(){b(Be),be.print()}function c(r,a){return Array.prototype.slice.call(Ae.subarray(r,r+a))}function h(r,a){for(var e=new Uint8Array(a),i=0;i<a;++i)e[i]=Ae[r+i];return e.buffer}function d(r){for(var a=0;Ae[r+a];)a++;return a}function w(r,a){var e=d(r);a&&e++;var i=c(r,e);return a&&(i[e-1]=0),i}function p(r,a){for(var e=[],i=0;i<r.length;){var v=r.charCodeAt(i);v>255&&(v&=255),e.push(v),i+=1}return a||e