jsprime
jsprime copied to clipboard
Maximum Call Stack exceeded error on the Chrome browser
Hi I tried to run JSPrime on my javascript code, I am facing an Maximum Call Stack exceeded error on the Chrome browser in the function checkFunctionAsReturns in engine.js. It is 1000 line long, sometimes the browser is crashing, is there any workaround for this ?Is there any upperbound on the file size ? is JSPrime not scalable ?
In engine.js at asignFunctionReturnValue() repetitive variable declaration made the loop run infinite times and caused heap out of memory . To overcome this loop optimisation is done by for (var j = 0; j < real_func_names.length ; j++)
to
var real_fun_name_length = real_func_names.length;
for (var j = 0; j < real_fun_name_length ; j++)
Hope this can help you