Skip to content

Commit

Permalink
Deploying to gh-pages from @ 6c5e304 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
sebffischer committed Oct 17, 2024
1 parent b930a76 commit 00cfc24
Show file tree
Hide file tree
Showing 18 changed files with 204 additions and 152 deletions.
26 changes: 13 additions & 13 deletions assets/wasm/r/r.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ export function wasm_parse_errors(args: any, input: string): (ParseError)[];
export function wasm_highlight(args: any, input: string): any[];
/**
*/
export enum Experiment {
TailCalls = 0,
RestArgs = 1,
}
/**
*/
export enum Localization {
En = 0,
Es = 1,
Expand All @@ -38,12 +44,6 @@ export enum Localization {
Emoji = 5,
}
/**
*/
export enum Experiment {
TailCalls = 0,
RestArgs = 1,
}
/**
* Run the R REPL
*/
export class Cli {
Expand Down Expand Up @@ -83,13 +83,6 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl

export interface InitOutput {
readonly memory: WebAssembly.Memory;
readonly __wbg_cli_free: (a: number) => void;
readonly __wbg_get_cli_locale: (a: number) => number;
readonly __wbg_set_cli_locale: (a: number, b: number) => void;
readonly __wbg_get_cli_warranty: (a: number) => number;
readonly __wbg_set_cli_warranty: (a: number, b: number) => void;
readonly __wbg_get_cli_experiments: (a: number, b: number) => void;
readonly __wbg_set_cli_experiments: (a: number, b: number, c: number) => void;
readonly __wbg_parseerror_free: (a: number) => void;
readonly parseerror_start: (a: number) => number;
readonly parseerror_end: (a: number) => number;
Expand All @@ -98,6 +91,13 @@ export interface InitOutput {
readonly wasm_runtime: (a: number) => number;
readonly wasm_parse_errors: (a: number, b: number, c: number, d: number) => void;
readonly wasm_highlight: (a: number, b: number, c: number, d: number) => void;
readonly __wbg_cli_free: (a: number) => void;
readonly __wbg_get_cli_locale: (a: number) => number;
readonly __wbg_set_cli_locale: (a: number, b: number) => void;
readonly __wbg_get_cli_warranty: (a: number) => number;
readonly __wbg_set_cli_warranty: (a: number, b: number) => void;
readonly __wbg_get_cli_experiments: (a: number, b: number) => void;
readonly __wbg_set_cli_experiments: (a: number, b: number, c: number) => void;
readonly __wbindgen_malloc: (a: number, b: number) => number;
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
readonly __wbindgen_export_2: WebAssembly.Table;
Expand Down
114 changes: 57 additions & 57 deletions assets/wasm/r/r.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ function addHeapObject(obj) {

function getObject(idx) { return heap[idx]; }

function dropObject(idx) {
if (idx < 132) return;
heap[idx] = heap_next;
heap_next = idx;
}

function takeObject(idx) {
const ret = getObject(idx);
dropObject(idx);
return ret;
}

function isLikeNone(x) {
return x === undefined || x === null;
}
Expand All @@ -57,18 +69,6 @@ function getInt32Memory0() {
return cachedInt32Memory0;
}

function dropObject(idx) {
if (idx < 132) return;
heap[idx] = heap_next;
heap_next = idx;
}

function takeObject(idx) {
const ret = getObject(idx);
dropObject(idx);
return ret;
}

let WASM_VECTOR_LEN = 0;

const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
Expand Down Expand Up @@ -171,35 +171,6 @@ function __wbg_adapter_28(arg0, arg1, arg2, arg3) {
}
}

let cachedUint32Memory0 = null;

function getUint32Memory0() {
if (cachedUint32Memory0 === null || cachedUint32Memory0.byteLength === 0) {
cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer);
}
return cachedUint32Memory0;
}

function getArrayJsValueFromWasm0(ptr, len) {
ptr = ptr >>> 0;
const mem = getUint32Memory0();
const slice = mem.subarray(ptr / 4, ptr / 4 + len);
const result = [];
for (let i = 0; i < slice.length; i++) {
result.push(takeObject(slice[i]));
}
return result;
}

function passArrayJsValueToWasm0(array, malloc) {
const ptr = malloc(array.length * 4, 4) >>> 0;
const mem = getUint32Memory0();
for (let i = 0; i < array.length; i++) {
mem[ptr / 4 + i] = addHeapObject(array[i]);
}
WASM_VECTOR_LEN = array.length;
return ptr;
}
/**
* @param {any} args
* @returns {string}
Expand Down Expand Up @@ -230,6 +201,25 @@ export function wasm_runtime(args) {
return takeObject(ret);
}

let cachedUint32Memory0 = null;

function getUint32Memory0() {
if (cachedUint32Memory0 === null || cachedUint32Memory0.byteLength === 0) {
cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer);
}
return cachedUint32Memory0;
}

function getArrayJsValueFromWasm0(ptr, len) {
ptr = ptr >>> 0;
const mem = getUint32Memory0();
const slice = mem.subarray(ptr / 4, ptr / 4 + len);
const result = [];
for (let i = 0; i < slice.length; i++) {
result.push(takeObject(slice[i]));
}
return result;
}
/**
* Check whether an input produces parse errors
*
Expand Down Expand Up @@ -277,6 +267,16 @@ export function wasm_highlight(args, input) {
}
}

function passArrayJsValueToWasm0(array, malloc) {
const ptr = malloc(array.length * 4, 4) >>> 0;
const mem = getUint32Memory0();
for (let i = 0; i < array.length; i++) {
mem[ptr / 4 + i] = addHeapObject(array[i]);
}
WASM_VECTOR_LEN = array.length;
return ptr;
}

function handleError(f, args) {
try {
return f.apply(this, args);
Expand All @@ -286,10 +286,10 @@ function handleError(f, args) {
}
/**
*/
export const Localization = Object.freeze({ En:0,"0":"En",Es:1,"1":"Es",Zh:2,"2":"Zh",De:3,"3":"De",Pirate:4,"4":"Pirate",Emoji:5,"5":"Emoji", });
export const Experiment = Object.freeze({ TailCalls:0,"0":"TailCalls",RestArgs:1,"1":"RestArgs", });
/**
*/
export const Experiment = Object.freeze({ TailCalls:0,"0":"TailCalls",RestArgs:1,"1":"RestArgs", });
export const Localization = Object.freeze({ En:0,"0":"En",Es:1,"1":"Es",Zh:2,"2":"Zh",De:3,"3":"De",Pirate:4,"4":"Pirate",Emoji:5,"5":"Emoji", });

const CliFinalization = (typeof FinalizationRegistry === 'undefined')
? { register: () => {}, unregister: () => {} }
Expand Down Expand Up @@ -475,9 +475,15 @@ function __wbg_get_imports() {
const ret = ParseError.__wrap(arg0);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_is_undefined = function(arg0) {
const ret = getObject(arg0) === undefined;
return ret;
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
takeObject(arg0);
};
imports.wbg.__wbg_log_622c0899e43adbe8 = function(arg0, arg1) {
console.log(getStringFromWasm0(arg0, arg1));
};
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
const ret = getObject(arg0);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_try_into_number = function(arg0) {
let result;
Expand All @@ -491,15 +497,9 @@ imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
};
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
takeObject(arg0);
};
imports.wbg.__wbg_log_622c0899e43adbe8 = function(arg0, arg1) {
console.log(getStringFromWasm0(arg0, arg1));
};
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
const ret = getObject(arg0);
return addHeapObject(ret);
imports.wbg.__wbindgen_is_undefined = function(arg0) {
const ret = getObject(arg0) === undefined;
return ret;
};
imports.wbg.__wbg_crypto_1d1f22824a6a080c = function(arg0) {
const ret = getObject(arg0).crypto;
Expand Down Expand Up @@ -614,8 +614,8 @@ imports.wbg.__wbindgen_memory = function() {
const ret = wasm.memory;
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper2880 = function(arg0, arg1, arg2) {
const ret = makeClosure(arg0, arg1, 1029, __wbg_adapter_28);
imports.wbg.__wbindgen_closure_wrapper2326 = function(arg0, arg1, arg2) {
const ret = makeClosure(arg0, arg1, 580, __wbg_adapter_28);
return addHeapObject(ret);
};

Expand Down
Binary file modified assets/wasm/r/r_bg.wasm
Binary file not shown.
14 changes: 7 additions & 7 deletions assets/wasm/r/r_bg.wasm.d.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
/* tslint:disable */
/* eslint-disable */
export const memory: WebAssembly.Memory;
export function __wbg_cli_free(a: number): void;
export function __wbg_get_cli_locale(a: number): number;
export function __wbg_set_cli_locale(a: number, b: number): void;
export function __wbg_get_cli_warranty(a: number): number;
export function __wbg_set_cli_warranty(a: number, b: number): void;
export function __wbg_get_cli_experiments(a: number, b: number): void;
export function __wbg_set_cli_experiments(a: number, b: number, c: number): void;
export function __wbg_parseerror_free(a: number): void;
export function parseerror_start(a: number): number;
export function parseerror_end(a: number): number;
Expand All @@ -16,6 +9,13 @@ export function wasm_session_header(a: number, b: number): void;
export function wasm_runtime(a: number): number;
export function wasm_parse_errors(a: number, b: number, c: number, d: number): void;
export function wasm_highlight(a: number, b: number, c: number, d: number): void;
export function __wbg_cli_free(a: number): void;
export function __wbg_get_cli_locale(a: number): number;
export function __wbg_set_cli_locale(a: number, b: number): void;
export function __wbg_get_cli_warranty(a: number): number;
export function __wbg_set_cli_warranty(a: number, b: number): void;
export function __wbg_get_cli_experiments(a: number, b: number): void;
export function __wbg_set_cli_experiments(a: number, b: number, c: number): void;
export function __wbindgen_malloc(a: number, b: number): number;
export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number;
export const __wbindgen_export_2: WebAssembly.Table;
Expand Down
2 changes: 1 addition & 1 deletion docs/r/callable/core/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
})
</script>

</head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../r/index.html">r</a><span class="version">0.4.0</span></h2></div><h2 class="location"><a href="#">Module core</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></section><h2><a href="../index.html">In r::callable</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../../index.html">r</a>::<wbr><a href="../index.html">callable</a>::<wbr><a class="mod" href="#">core</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../../src/r/callable/core.rs.html#1-401">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.FormatState.html" title="struct r::callable::core::FormatState">FormatState</a></div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.SymKind.html" title="enum r::callable::core::SymKind">SymKind</a></div></li></ul><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.Builtin.html" title="trait r::callable::core::Builtin">Builtin</a></div></li><li><div class="item-name"><a class="trait" href="trait.Callable.html" title="trait r::callable::core::Callable">Callable</a></div></li><li><div class="item-name"><a class="trait" href="trait.CallableClone.html" title="trait r::callable::core::CallableClone">CallableClone</a></div></li><li><div class="item-name"><a class="trait" href="trait.CallableFormals.html" title="trait r::callable::core::CallableFormals">CallableFormals</a></div></li><li><div class="item-name"><a class="trait" href="trait.Format.html" title="trait r::callable::core::Format">Format</a></div></li><li><div class="item-name"><a class="trait" href="trait.Sym.html" title="trait r::callable::core::Sym">Sym</a></div></li></ul><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.force_promises.html" title="fn r::callable::core::force_promises">force_promises</a></div></li></ul></section></div></main></body></html>
</head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../r/index.html">r</a><span class="version">0.4.0</span></h2></div><h2 class="location"><a href="#">Module core</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></section><h2><a href="../index.html">In r::callable</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../../index.html">r</a>::<wbr><a href="../index.html">callable</a>::<wbr><a class="mod" href="#">core</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../../src/r/callable/core.rs.html#1-407">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.FormatState.html" title="struct r::callable::core::FormatState">FormatState</a></div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.SymKind.html" title="enum r::callable::core::SymKind">SymKind</a></div></li></ul><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.Builtin.html" title="trait r::callable::core::Builtin">Builtin</a></div></li><li><div class="item-name"><a class="trait" href="trait.Callable.html" title="trait r::callable::core::Callable">Callable</a></div></li><li><div class="item-name"><a class="trait" href="trait.CallableClone.html" title="trait r::callable::core::CallableClone">CallableClone</a></div></li><li><div class="item-name"><a class="trait" href="trait.CallableFormals.html" title="trait r::callable::core::CallableFormals">CallableFormals</a></div></li><li><div class="item-name"><a class="trait" href="trait.Format.html" title="trait r::callable::core::Format">Format</a></div></li><li><div class="item-name"><a class="trait" href="trait.Sym.html" title="trait r::callable::core::Sym">Sym</a></div></li></ul><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.force_promises.html" title="fn r::callable::core::force_promises">force_promises</a></div></li></ul></section></div></main></body></html>
Loading

0 comments on commit 00cfc24

Please sign in to comment.