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 toplevel method visibility in jit/fullint script scopes. #5358

Merged
merged 1 commit into from Oct 11, 2018

Conversation

Projects
None yet
1 participant
@headius
Copy link
Member

headius commented Oct 11, 2018

Toplevel scopes were only getting defaulted to private visibility
for the startup interpreter, which does not ever use in-IR call
protocol. When the toplevel script body is first optimized to
fullint or compiled to bytecode, call protocol is installed with
no external preamble code to set visibility to private, so the
visibility was defaulting back to public as in non-script scopes.
This change adds visibility to the frame push instruction, so top-
level scripts will use private in their frame push.

This fixes regression in test:jruby:aot test_timeout.rb toplevel
timeout test, which relied on the non-self call to timeout to see
the toplevel private method and trigger method_missing. This began
to fail with my timeout update because the method is now defined
in Ruby code rather than manually in Java code (the latter of
which explicitly set private visibility).

Fix toplevel method visibility in jit/fullint script scopes.
Toplevel scopes were only getting defaulted to private visibility
for the startup interpreter, which does not ever use in-IR call
protocol. When the toplevel script body is first optimized to
fullint or compiled to bytecode, call protocol is installed with
no external preamble code to set visibility to private, so the
visibility was defaulting back to public as in non-script scopes.
This change adds visibility to the frame push instruction, so top-
level scripts will use private in their frame push.

This fixes regression in test:jruby:aot test_timeout.rb toplevel
timeout test, which relied on the non-self call to timeout to see
the toplevel private method and trigger method_missing. This began
to fail with my timeout update because the method is now defined
in Ruby code rather than manually in Java code (the latter of
which explicitly set private visibility).

@headius headius added this to the JRuby 9.2.1.0 milestone Oct 11, 2018

@headius headius merged commit ba9583f into jruby:master Oct 11, 2018

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

@headius headius deleted the headius:toplevel_visibility_in_jit branch Oct 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.