Skip to content

Commit 78d7137

Browse files
lavenzgmeta-codesync[bot]
authored andcommitted
Add "JIT Enabled" property in HermesInternal.getRuntimeProperties()
Summary: This makes it easier to tell whether JIT is enabled. Reviewed By: avp Differential Revision: D88092036 fbshipit-source-id: 9da5f88ff557095e5bde5f72d76ebbc4906a3c73
1 parent e70d555 commit 78d7137

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/VM/JSLib/HermesInternal.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,14 @@ CallResult<HermesValue> hermesInternalGetRuntimeProperties(
273273
return ExecutionStatus::EXCEPTION;
274274
}
275275

276+
lv.tmpHandle =
277+
HermesValue::encodeBoolValue(runtime.getJITContext().isEnabled());
278+
if (LLVM_UNLIKELY(
279+
addProperty(lv.tmpHandle, "JIT Enabled") ==
280+
ExecutionStatus::EXCEPTION)) {
281+
return ExecutionStatus::EXCEPTION;
282+
}
283+
276284
lv.tmpHandle = HermesValue::encodeBoolValue(runtime.builtinsAreFrozen());
277285
if (LLVM_UNLIKELY(
278286
addProperty(lv.tmpHandle, "Builtins Frozen") ==

0 commit comments

Comments
 (0)