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 null case and RubyHash when creating a new ConvertingMarshaller - f... #1

Merged
merged 1 commit into from Nov 18, 2014

Conversation

ahorek
Copy link
Owner

@ahorek ahorek commented Nov 18, 2014

...ixes jruby#2120

ahorek added a commit that referenced this pull request Nov 18, 2014
fix null case and RubyHash when creating a new ConvertingMarshaller  - f...
@ahorek ahorek merged commit cf70745 into ahorek:jruby-1_7 Nov 18, 2014
ahorek pushed a commit that referenced this pull request Dec 2, 2018
  1. lexically contained closures will return since it knows it is safe to do so (e.g. nonlocal -> local return conversion)
  2. other closures will copy to the return value of the method and jump to the end of the method

I believe jruby#2 is wrong and it is not currently possible to hit with the limitations in what we will inline.  I still added it as it seemed like some code should be there to handle this scenario when/if we decide to support it.  I think the premise of what jruby#2 does is right; but I do not see how we can guarantee where we jump to could possibly have the same variable in a return instr (or copy to some other significant variable).

For posterity, if I delete #1 and run the following script I feel this should still work but it doesn't:

```ruby
def try_fdopen()
  1.times do
    return :exit_closure
  end
  :exit_try_fdopen
end


def foo
  i = 0
  while i < 1000 do
    p try_fdopen
    i += 1
  end
end


foo
```
ahorek pushed a commit that referenced this pull request Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants