jsprime icon indicating copy to clipboard operation
jsprime copied to clipboard

Maximum Call Stack exceeded error on the Chrome browser

Open neweffort opened this issue 7 years ago • 1 comments

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 ?

neweffort avatar Jun 18 '17 13:06 neweffort

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

TejaswiniU avatar Dec 27 '18 06:12 TejaswiniU