File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
src/vm/jvm/runtime/org/perl6/nqp/runtime Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -796,6 +796,20 @@ public static SixModelObject getlexdyn(String name, ThreadContext tc) {
796
796
}
797
797
return null ;
798
798
}
799
+ public static SixModelObject getlexcaller (String name , ThreadContext tc ) {
800
+ CallFrame curCallerFrame = tc .curFrame .caller ;
801
+ while (curCallerFrame != null ) {
802
+ CallFrame curFrame = curCallerFrame ;
803
+ while (curFrame != null ) {
804
+ Integer found = curFrame .codeRef .staticInfo .oTryGetLexicalIdx (name );
805
+ if (found != null )
806
+ return curFrame .oLex [found ];
807
+ curFrame = curFrame .outer ;
808
+ }
809
+ curCallerFrame = curCallerFrame .caller ;
810
+ }
811
+ return null ;
812
+ }
799
813
800
814
/* Context introspection. */
801
815
public static SixModelObject ctx (ThreadContext tc ) {
You can’t perform that action at this time.
0 commit comments