summaryrefslogtreecommitdiff
path: root/yjit_iface.c
diff options
context:
space:
mode:
authorMaxime Chevalier-Boisvert <maximechevalierb@gmail.com>2021-06-03 08:39:52 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:35 -0400
commit860589c7fa63faa837e0922f581ef8b1af7837d4 (patch)
tree7ff4ad00f132b456aab7f006d491d2c54929a441 /yjit_iface.c
parent9f46e6e64b826f555dd9cf80839f1aa89fdc36fd (diff)
Use builtin_inline_p to avoid pushing a frame for primitive C methods (#63)
* Use builtin_inline_p to skip a frame of C methods * Fix bugs in primitive cfunc call code * Remove if (push_frame) {} * Remove if (push_frame) {} * Push Aaron's fix to avoid hardcoding insn lengths Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
Diffstat (limited to 'yjit_iface.c')
-rw-r--r--yjit_iface.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/yjit_iface.c b/yjit_iface.c
index 01075ea1ee..9e1085a788 100644
--- a/yjit_iface.c
+++ b/yjit_iface.c
@@ -126,19 +126,6 @@ check_cfunc_dispatch(VALUE receiver, struct rb_callinfo *ci, void *callee, rb_ca
MJIT_FUNC_EXPORTED VALUE rb_hash_has_key(VALUE hash, VALUE key);
-bool
-cfunc_needs_frame(const rb_method_cfunc_t *cfunc)
-{
- void* fptr = (void*)cfunc->func;
-
- // Leaf C functions do not need a stack frame
- // or a stack overflow check
- return !(
- // Hash#key?
- fptr == (void*)rb_hash_has_key
- );
-}
-
// GC root for interacting with the GC
struct yjit_root_struct {
int unused; // empty structs are not legal in C99