aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/NodeVMScript.h
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-05-18 19:27:02 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-05-18 19:27:02 -0700
commita3e53b025e36ff01a2225df42dcc9e4089767fbc (patch)
tree18d01c3c2bd351f3ac940dda72683ee104f76136 /src/bun.js/bindings/NodeVMScript.h
parentf862ae405036acb35ed2134b66f056031e1367fe (diff)
downloadbun-a3e53b025e36ff01a2225df42dcc9e4089767fbc.tar.gz
bun-a3e53b025e36ff01a2225df42dcc9e4089767fbc.tar.zst
bun-a3e53b025e36ff01a2225df42dcc9e4089767fbc.zip
Make node:vm 12x faster
Diffstat (limited to 'src/bun.js/bindings/NodeVMScript.h')
-rw-r--r--src/bun.js/bindings/NodeVMScript.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bun.js/bindings/NodeVMScript.h b/src/bun.js/bindings/NodeVMScript.h
index 09878e533..3181e8291 100644
--- a/src/bun.js/bindings/NodeVMScript.h
+++ b/src/bun.js/bindings/NodeVMScript.h
@@ -61,6 +61,10 @@ public:
const JSC::SourceCode& source() const { return m_source; }
+ DECLARE_VISIT_CHILDREN;
+ mutable WriteBarrier<JSC::DirectEvalExecutable> m_cachedDirectExecutable;
+ mutable WriteBarrier<JSC::JSGlobalObject> m_cachedGlobalObject;
+
private:
JSC::SourceCode m_source;