Skip to content
Browse files

[IR] Trivial: rearranged flags in alphabetical order.

  • Loading branch information...
1 parent 9157c52 commit 5f848317f83c8e701b015ee6087da564c9a782c7 @subbuss subbuss committed Feb 26, 2014
Showing with 17 additions and 17 deletions.
  1. +17 −17 core/src/main/java/org/jruby/ir/IRFlags.java
View
34 core/src/main/java/org/jruby/ir/IRFlags.java
@@ -1,6 +1,16 @@
package org.jruby.ir;
public enum IRFlags {
+ // Does this scope require a binding to be materialized?
+ // Yes if any of the following holds true:
+ // - calls 'Proc.new'
+ // - calls 'eval'
+ // - calls 'call' (could be a call on a stored block which could be local!)
+ // - calls 'send' and we cannot resolve the message (method name) that is being sent!
+ // - calls methods that can access the caller's binding
+ // - calls a method which we cannot resolve now!
+ // - has a call whose closure requires a binding
+ BINDING_HAS_ESCAPED,
// Does this execution scope (applicable only to methods) receive a block and use it in such a way that
// all of the caller's local variables need to be materialized into a heap binding?
// Ex:
@@ -27,27 +37,17 @@
// This logic was extracted from an email thread on the JRuby mailing list -- Yehuda Katz & Charles Nutter
// contributed this analysis above.
CAN_CAPTURE_CALLERS_BINDING,
- // Does this scope require a binding to be materialized?
- // Yes if any of the following holds true:
- // - calls 'Proc.new'
- // - calls 'eval'
- // - calls 'call' (could be a call on a stored block which could be local!)
- // - calls 'send' and we cannot resolve the message (method name) that is being sent!
- // - calls methods that can access the caller's binding
- // - calls a method which we cannot resolve now!
- // - has a call whose closure requires a binding
- BINDING_HAS_ESCAPED,
- USES_EVAL, // calls eval
- RECEIVES_KEYWORD_ARGS, // receives keyword args
- HAS_BREAK_INSTRS, // contains at least one break
CAN_RECEIVE_BREAKS, // may receive a break during execution
- HAS_NONLOCAL_RETURNS, // has a non-local return
CAN_RECEIVE_NONLOCAL_RETURNS, // may receive a non-local return during execution
- USES_BACKREF_OR_LASTLINE, // Since backref ($~) and lastline ($_) vars are allocated space on the dynamic scope.
- USES_ZSUPER, // has zsuper instr
- HAS_LOOPS, // has a loop
+ HAS_BREAK_INSTRS, // contains at least one break
HAS_END_BLOCKS, // has an end block. big de-opt flag
HAS_EXPLICIT_CALL_PROTOCOL, // contains call protocol instrs. if so we don't need to manage bindings frame implicitly.
+ HAS_LOOPS, // has a loop
+ HAS_NONLOCAL_RETURNS, // has a non-local return
HAS_UNUSED_IMPLICIT_BLOCK_ARG,// Is %block implicit block arg unused?
RECEIVES_CLOSURE_ARG, // This scope (or parent receives a closure
+ RECEIVES_KEYWORD_ARGS, // receives keyword args
+ USES_BACKREF_OR_LASTLINE, // Since backref ($~) and lastline ($_) vars are allocated space on the dynamic scope.
+ USES_EVAL, // calls eval
+ USES_ZSUPER, // has zsuper instr
}

0 comments on commit 5f84831

Please sign in to comment.
Something went wrong with that request. Please try again.