Skip to content

Commit

Permalink
Use kind range for JSFunction in JIT
Browse files Browse the repository at this point in the history
Summary: `JSFunction::classof` actually uses the kind range `CodeBlockFunction`.

Reviewed By: avp

Differential Revision: D66080283

fbshipit-source-id: 043488f529545500eb3d1f202d27d83bc69e2733
neildhar authored and facebook-github-bot committed Nov 18, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent bc3cb27 commit 0b58f74
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/VM/JIT/arm64/JitEmitter.cpp
Original file line number Diff line number Diff line change
@@ -4144,8 +4144,13 @@ void Emitter::callImpl(FR frRes, FR frCallee) {
emit_gccell_get_kind(a, a64::w1, a64::x0);

// Check if it is a JSFunction.
a.cmp(a64::w1, CellKind::JSFunctionKind);
a.b_ne(slowPathLab);
emit_cellkind_in_range(
a,
a64::w1,
a64::w1,
CellKind::CodeBlockFunctionKind_first,
CellKind::CodeBlockFunctionKind_last);
a.b_hi(slowPathLab);

// Check if the JSFunction has already been JIT compiled.
a.ldr(a64::x1, a64::Mem(a64::x0, RuntimeOffsets::jsFunctionCodeBlock));

0 comments on commit 0b58f74

Please sign in to comment.