Skip to content

Commit

Permalink
Add JIT template for atkey_o
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterDuke17 authored and timo committed Jan 26, 2018
1 parent ac9f241 commit d3ce626
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/jit/core_templates.expr
Expand Up @@ -204,6 +204,22 @@
(carg $0 ptr)
(carg (const (&QUOTE MVM_reg_int64) int_sz) int))))

# REPR(obj)->ass_funcs.at_key(tc, STABLE(obj), obj, OBJECT_BODY(obj),
# (MVMObject *)GET_REG(cur_op, 4).s, &GET_REG(cur_op, 0), MVM_reg_obj);
(template: atkey_o!
(ifv (^is_type_obj $1)
(store $0 (^vmnull) ptr_sz)
(callv
(^getf (^repr $1) MVMREPROps ass_funcs.at_key)
(arglist
(carg (tc) ptr)
(carg (^stable $1) ptr)
(carg $1 ptr)
(carg (^body $1) ptr)
(carg $2 ptr)
(carg $0 ptr)
(carg (const (&QUOTE MVM_reg_obj) int_sz) int)))))

(template: gethow
(let: (($how (^getf (^stable $1) MVMSTable HOW)))
(if (nz $how)
Expand Down

0 comments on commit d3ce626

Please sign in to comment.