forked from jruby/jruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HEADS UP! Removed all trace of setWithinDefined and isWithinDefined.
* Tested on rubyspecs in 1.8 and 1.9 mode -- AST, JIT, IR. No change in failures after this change. * Removed this from AST interpreter, JIT, IR * setWithinDefined was set by all of these before entering defined? checks and cleared on exit. isWithinDefined was only used by RaiseException to decide whether to set $! or not -- effectively $! was not being set for exceptions raised by code executing by the call tree rooted in the defined? checks. However, this resulted in buggy behavior because this call tree could do a ton of work (including loading files, requires, setting up classes, etc.) any of which can raise exceptions and might have to be handled, which require access to $!. The workaround in IR and AST interpreters was to set "$!" whenever an exception was received (effectively bypassing the condition that RaiseException was guarding). But, since I removed both these hacky checks as part of a previous commit (20632af), we had code failures in Rails (bug JRUBY-6705) because of files not getting loaded properly. So, given that isWithinDefined is only used by RaiseException, which was anyway getting bypassed, there is no reason to keep that check around. Once I removed that check, since there was no other use of isWithinDefined in the codebase, I also removed setWithinDefined, which led to a bunch of dead code which I purged. * NOTE: JIT is probably yet to remove the $! hack that I removed in the other commit. It would be best to remove that hack as well so we know for sure that these two commits are working together well without bugs.
- Loading branch information
Showing
11 changed files
with
7 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 0 additions & 55 deletions
55
src/org/jruby/ir/instructions/defined/SetWithinDefinedInstr.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters