Webifi

Results 63 comments of Webifi

I've modified interpreter.js to add methods for directly calling pseudo functions from native code. Here's the pull request for it: #201 Examples: **Synchronous callback from native function:** ``` function nativeFunction...

Here's a full example of how to implement native timers (setTimeout, etc.) using PR #201 ``` const interpreter = new Interpreter("", (interpreter, globalObject) => { const timeouts = {}; let...

> @Webifi: to try to answer some of your specific questions: Thanks for taking the time to look things over. > Since the interpreter is (intentionally) not reentrant, `.callFunction()` should...

Okay, to no longer be reentrant, I've modified the Synchronous callbacks to use something more analogous to a Promise. Examples of use: **Synchronous callback from native function:** ``` function nativeFunction...

@cpcallen > * It shouldn't matter whether `pseudoFunc` is an interprerted or native function, so I'd probably just call this argument `func`. cache invalidation and naming things... I've used "pseudo...

> The obvious question to ask is: what does the existing codebase do? I actually don't remember. interpreter.js uses "interpreted function" for purely interpreted functions, "native function" for native functions...

@NeilFraser Just a ping to see if you've had a chance to look this over.

@NeilFraser Looks like I'll need to resolve some conflicts... Any hope of this, or something like it, being merged? Any do's and don'ts I should keep in mind while refactoring...