You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove the Yielding stuff; since it really never ended up in use by anyone, especially myself. Also adds an optimizer for the interpreted logic for performance improvements. The optimizer is not fast as the compiler, but improves performance regardless (seeing 2-3x gains on .run logic).
* @param {{ deterministic?: Boolean, yields?: Boolean, useContext?: Boolean, async?: Boolean, sync?: Boolean }} annotations This is used by the compiler to help determine if it can optimize the function being generated.
90
+
* @param {{ deterministic?: Boolean, useContext?: Boolean, async?: Boolean, sync?: Boolean }} annotations This is used by the compiler to help determine if it can optimize the function being generated.
* @param {{ deterministic?: Boolean, yields?: Boolean, useContext?: Boolean, async?: Boolean, sync?: Boolean }} annotations Not recommended unless you're sure every function from the module will match these annotations.
121
+
* @param {{ deterministic?: Boolean, useContext?: Boolean, async?: Boolean, sync?: Boolean }} annotations Not recommended unless you're sure every function from the module will match these annotations.
127
122
*/
128
123
addModule(name,obj,annotations={}){
129
124
Object.getOwnPropertyNames(obj).forEach((key)=>{
@@ -138,6 +133,14 @@ class AsyncLogicEngine {
138
133
}
139
134
140
135
/**
136
+
* Runs the logic against the data.
137
+
*
138
+
* NOTE: With interpreted optimizations enabled, it will cache the execution plan for the logic for
139
+
* future invocations; if you plan to modify the logic, you should disable this feature, by passing
140
+
* `disableInterpretedOptimization: true` in the constructor.
141
+
*
142
+
* If it detects that a bunch of dynamic objects are being passed in, and it doesn't see the same object,
143
+
* it will disable the interpreted optimization.
141
144
*
142
145
* @param {*} logic The logic to be executed
143
146
* @param {*} data The data being passed in to the logic to be executed against.
0 commit comments