From e72f9e176f9200007f84b73622493a228d47f432 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 14 Feb 2018 12:54:37 -0800 Subject: [PATCH] Update DESIGN.md with import class shims --- DESIGN.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/DESIGN.md b/DESIGN.md index bc47c713..01a42f0c 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -712,16 +712,19 @@ export function __wbg_s_Bar_new() { return addHeapObject(new Bar()); } +const another_function_shim = Bar.another_function; export function __wbg_s_Bar_another_function() { - return Bar.another_function(); + return another_function_shim(); } +const get_shim = Bar.prototype.get; export function __wbg_s_Bar_get(ptr) { - return Bar.prototype.get.call(getObject(ptr)); + return shim.call(getObject(ptr)); } +const set_shim = Bar.prototype.set; export function __wbg_s_Bar_set(ptr, arg0) { - Bar.prototype.set.call(getObject(ptr), arg0) + set_shim.call(getObject(ptr), arg0) } ```