1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-23 03:54:12 +02:00

class-of has an opcode

* libguile/vm-i-scheme.c (class-of): New opcode.
* module/language/tree-il/compile-glil.scm:
* module/oop/goops.scm: Compile class-of into an opcode.
This commit is contained in:
Andy Wingo 2009-11-06 12:40:20 +01:00
parent b4a595a5d6
commit aec4a84ac8
3 changed files with 13 additions and 5 deletions

View file

@ -285,6 +285,12 @@ VM_DEFINE_FUNCTION (126, mod, "mod", 2)
/*
* GOOPS support
*/
VM_DEFINE_FUNCTION (169, class_of, "class-of", 1)
{
ARGS1 (obj);
RETURN (SCM_INSTANCEP (obj) ? SCM_CLASS_OF (obj) : scm_class_of (obj));
}
VM_DEFINE_FUNCTION (127, slot_ref, "slot-ref", 2)
{
size_t slot;