Allocate all ASTInterpreter instances on the stack and remove the interpreter map.
Not having the ASTInterpreter GC allocated improves performance. I had to add a small asm function in order to produce a special stack frame where we can easily retrieve the ASTInterpreter*, to replace s_interpreterMaps job. This also make sure that this function really does not get inlined. The s_interpreterMap was hard to understand and produced several times problems (duplicate entries,...) This patch contains a hack which limits the number of variables inside a function to 512. Because we have to make sure the are all on the stack and can't dynamically add more space. An upcoming patch will remove this limitation and replace it with a stack alloca of the size of the actual number of variables the function uses.
Showing
This diff is collapsed.
Please register or sign in to comment