Skip to content

Handling Symbol and Fixnum (and true, false and nil) #6

@vidarh

Description

@vidarh

MRI uses type tagging for those. Need to decide whether to do type tagging (more complex code) or do what Python does (memoize small integers) - the benefit of the latter is simpler code. Another alternative is to do method calls, but handle Fixnum "specially" for inline caching... This will cause crashes when we get the compiler to compile.

The simplest may be to implement Fixnum/Symbol as normal classes to start with.

True, false and nil are much simpler as they're single objects so avoiding type tagging is ok to start with, though not necessarily good in terms of performance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions