spitbol / x64

SPITBOL x64 provides raw power and speed for non-numeric computation on the x86_64 architecture
GNU General Public License v3.0
256 stars 23 forks source link

I found a bug that occurs when about 1 million lines are read #4

Closed hibengler closed 6 years ago

hibengler commented 6 years ago

With a simple snobol program: a.sno

loop x = input :s(loop) end

echo 'for ($i=0;$i<1000000;$i++) {print "$i\n";}' | perl | sbl a.sno

It was that every syscall was leaving an extra return on the compiler stack, eventually wasting it away.

I switch a couple "calls" to "jmp" and vollia! it works.

Probably the calls were left over for debugging.

daveshields commented 6 years ago

Hib,

Many thanks for the fix. I just merged it into the main branch.

dave

On Mon, Oct 9, 2017 at 8:55 PM, Hib Engler notifications@github.com wrote:

With a simple snobol program: a.sno

loop x = input :s(loop) end

echo 'for ($i=0;$i<1000000;$i++) {print "$i\n";}' | perl | sbl a.sno

It was that every syscall was leaving an extra return on the compiler stack, eventually wasting it away.

I switch a couple "calls" to "jmp" and vollia! it works.

Probably the calls were left over for debugging.

You can view, comment on, or merge this pull request online at:

https://github.com/spitbol/spitbol/pull/4 Commit Summary

  • I found a bug that occurs when about 1 million lines are read

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/spitbol/spitbol/pull/4, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEXvedewxD1hynZSuuH9ZbCJBtahjgqks5sqsBvgaJpZM4PzPBF .