|
Post by aurel on Oct 27, 2021 13:38:21 GMT -6
this part is really interesting It look that prevents endless loop
|
|
|
Post by n00b on Oct 27, 2021 18:34:34 GMT -6
This code looks like its for an interpreter. It is getting the token at different points which you wouldn't do when running compiled code. Since RC compiles to byte code, I never need to read the tokens when the code is actually executing but it also means that determining the start and end of loop can't be done on the fly either.
It does look like a very efficient way of doing this in an interpreter though. I may look through it sometime and see if I can pick up some optimizations from it.
|
|
|
Post by rosy on Oct 28, 2021 4:24:07 GMT -6
What does "determining the start and end of a loop cannot be done on the fly" mean? After all, the beginning and the end are given ...
From what I see in RCBasic it is the same, but instead of an error message - the loop is simply not executed. That is OK. You could possibly think how to do it even better ... But most of all optimization can be done in the places I indicated.
|
|