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

Fix frozen checks and exceptions #2178

Merged
merged 2 commits into from Nov 12, 2014
Merged

Fix frozen checks and exceptions #2178

merged 2 commits into from Nov 12, 2014

Conversation

cheald
Copy link
Contributor

@cheald cheald commented Nov 12, 2014

Fix freeze enforcement and exceptions for immediate values. Passes test suite and rubyspec suite.

I'd love some extra review on this, though - the JRuby code isn't directly analogous to the MRI code, and there is a whole set of checks (FL_ABLE, SPECIAL_CONST_P) that JRuby doesn't do which probably need evaluation.

@cheald cheald changed the title Fix frozen Fix frozen checks and exceptions Nov 12, 2014
@headius
Copy link
Member

headius commented Nov 12, 2014

Bleh, so MRI does do this check directly in their bytecode interpreter then. The changes look good, but try to avoid committing commented code or add a comment saying why it's still there.

We're trying to build a corpus of small interpreter/compiler specs in spec/compiler/general_spec.rb, so if you feel like adding this case go for it. The format is pretty explanatory, and it will run against both IR interpreter and IR JIT.

@headius headius added this to the JRuby 9.0.0.0-pre1 milestone Nov 12, 2014
@headius headius self-assigned this Nov 12, 2014
headius added a commit that referenced this pull request Nov 12, 2014
Fix frozen checks and exceptions
@headius headius merged commit def7426 into jruby:master Nov 12, 2014
@cheald cheald deleted the fix_frozen branch Nov 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants