Skip to content
Permalink
Browse files
Add comment explaining why scope loads can't move later.
  • Loading branch information
headius committed Oct 28, 2014
1 parent 579b8f2 commit c93c7bb9fca628c4ef16276067caf8546d326847
Showing 1 changed file with 3 additions and 0 deletions.
@@ -1657,6 +1657,9 @@ private IRMethod defineMethodInner(MethodDefNode defNode, IRMethod method, IRSco

addInstr(method, new ReceiveSelfInstr(method.getSelf()));


// These instructions need to be toward the top of the method because they may both be needed for
// processing optional arguments as in def foo(a = Object).
// Set %current_scope = <current-scope>
// Set %current_module = isInstanceMethod ? %self.metaclass : %self
int nearestScopeDepth = parent.getNearestModuleReferencingScopeDepth();

0 comments on commit c93c7bb

Please sign in to comment.