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

Convert null MAKI objects to global NULL value #866

Merged
merged 2 commits into from
Aug 19, 2019

Conversation

jberg
Copy link
Collaborator

@jberg jberg commented Aug 18, 2019

Need to add a test for this, but NULL in MAKI ends up just being 0, so need to coerce object value when comparing value

@captbaritone
Copy link
Owner

captbaritone commented Aug 18, 2019

I think one of the variable registers (1?)holds a magic Singleton “null” value. Can we use that?

@jberg
Copy link
Collaborator Author

jberg commented Aug 18, 2019

I think one of the variable registers (1?)holds a magic Singleton “null” value. Can we use that?

I'm not sure. What I end up seeing in the interpreter is NULL looking like an Int with value of 0

@captbaritone
Copy link
Owner

Yeah, I think that’s right, but I believe there is a variable that always holds the canonical zero value that represents null.

@jberg
Copy link
Collaborator Author

jberg commented Aug 18, 2019

should I test for javascript null in the interpreter and replace it with that variable?

@jberg
Copy link
Collaborator Author

jberg commented Aug 18, 2019

Well, thats what I did and seems to work well

@jberg jberg changed the title Coerce null MAKI objects to 0 Convert null MAKI objects to global NULL value Aug 18, 2019
@captbaritone captbaritone merged commit b32520a into captbaritone:master Aug 19, 2019
captbaritone pushed a commit that referenced this pull request Nov 30, 2019
* Coerce null MAKI objects to 0

* use global NULL value
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

Successfully merging this pull request may close these issues.

None yet

2 participants