tag ( object -- n ) (original) (raw)

tag ( object -- n )
Factor handbook » The implementation » VM memory layouts » Type numbers

Next: type>class ( n -- class )

Vocabulary
kernel.private

Inputs

object an object

Outputs

n a tag number

Word description
Outputs an object's tag number, between zero and one less than num-types. This is implementation detail and user code should call class-of instead.

Definition

IN: kernel.private

PRIMITIVE: tag ( object -- n ) foldable flushable