()
| 77 | } |
| 78 | |
| 79 | const insertComplexObjectsWithoutProxy = async () => { |
| 80 | const state = await new wasmoon.LuaFactory().createEngine({ |
| 81 | enableProxy: false, |
| 82 | }) |
| 83 | const obj1 = { |
| 84 | hello: 'world', |
| 85 | } |
| 86 | obj1.self = obj1 |
| 87 | const obj2 = { |
| 88 | hello: 'everybody', |
| 89 | array: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], |
| 90 | fn: () => { |
| 91 | return 'hello' |
| 92 | }, |
| 93 | } |
| 94 | obj2.self = obj2 |
| 95 | |
| 96 | console.time('Insert complex objects without proxy') |
| 97 | state.global.set('obj', { obj1, obj2 }) |
| 98 | console.timeEnd('Insert complex objects without proxy') |
| 99 | } |
| 100 | |
| 101 | const getComplexObjects = async () => { |
| 102 | const state = await new wasmoon.LuaFactory().createEngine() |
nothing calls this directly
no test coverage detected