File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ var functionNode_webgl = (function() {
33
44 var gpu , opt , jsFunctionString ;
55
6+ function isIdentifierConstant ( paramName ) {
7+ return opt . constants . indexOf ( paramName ) != - 1 ;
8+ }
9+
610 function isIdentifierKernelParam ( paramName , ast , funcParam ) {
711 return funcParam . paramNames . indexOf ( paramName ) != - 1 ;
812 }
@@ -346,7 +350,8 @@ var functionNode_webgl = (function() {
346350
347351 if ( forNode . test && forNode . test . type == "BinaryExpression" ) {
348352 if ( forNode . test . right . type == "Identifier"
349- && forNode . test . operator == "<" ) {
353+ && forNode . test . operator == "<"
354+ && isIdentifierConstant ( forNode . test . right . name ) == false ) {
350355
351356 if ( opt . loopMaxIterations === undefined ) {
352357 console . warn ( "Warning: loopMaxIterations is not set! Using default of 100 which may result in unintended behavior." ) ;
You can’t perform that action at this time.
0 commit comments