Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vidarh opened this issue May 8, 2009 · 0 comments
Open

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

vidarh opened this issue May 8, 2009 · 0 comments

Comments

@vidarh
Copy link
Owner

vidarh commented May 8, 2009

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant