@@ -3132,10 +3132,17 @@ function (Namespace, jsnums, codePoint, util, exnStackParser, loader, seedrandom
3132
3132
}
3133
3133
while ( true ) {
3134
3134
started = true ;
3135
- if ( i >= stop ) { ++ thisRuntime . GAS ; return thisRuntime . nothing ; }
3135
+ if ( i >= stop ) {
3136
+ ++ thisRuntime . GAS ;
3137
+ return thisRuntime . nothing ;
3138
+ }
3136
3139
var res = fun . app ( i ) ;
3137
3140
3138
- if ( isContinuation ( res ) ) { return res ; }
3141
+ if ( thisRuntime . isContinuation ( res ) ) {
3142
+ res . stack [ thisRuntime . EXN_STACKHEIGHT ++ ] =
3143
+ thisRuntime . makeActivationRecord ( "eachLoop" , restart , true , [ ] , [ i , started , elD ] ) ;
3144
+ return res ;
3145
+ }
3139
3146
3140
3147
if ( -- thisRuntime . RUNGAS <= 0 ) {
3141
3148
thisRuntime . EXN_STACKHEIGHT = 0 ;
@@ -3144,12 +3151,7 @@ function (Namespace, jsnums, codePoint, util, exnStackParser, loader, seedrandom
3144
3151
else { i = i + 1 ; }
3145
3152
}
3146
3153
}
3147
- var res = restart ( ) ;
3148
- if ( isContinuation ( res ) ) {
3149
- res . stack [ thisRuntime . EXN_STACKHEIGHT ++ ] =
3150
- thisRuntime . makeActivationRecord ( "eachLoop" , restart , true , [ ] , [ i , started ] ) ;
3151
- }
3152
- return res ;
3154
+ return restart ( ) ;
3153
3155
}
3154
3156
3155
3157
var RUN_ACTIVE = false ;
@@ -5090,6 +5092,7 @@ function (Namespace, jsnums, codePoint, util, exnStackParser, loader, seedrandom
5090
5092
} ) ;
5091
5093
} ) ;
5092
5094
instantiated . fail ( function ( val ) { return resumer . error ( val ) ; } ) ;
5095
+ return instantiated ;
5093
5096
} ) ;
5094
5097
}
5095
5098
} ,
0 commit comments