f0rki / mapping-high-level-constructs-to-llvm-ir

A guide that explains how high level programming language constructs are mapped to the LLVM intermediate language.
https://mapping-high-level-constructs-to-llvm-ir.readthedocs.io
Other
599 stars 62 forks source link

Update index.rst #36

Closed ivanrodriguez3753 closed 3 years ago

ivanrodriguez3753 commented 3 years ago

I think you forgot to update maxlen

archfrog commented 3 years ago

I think you're right :) The code has only been tested in terms of being compiled with LLVM, which explains how this ancient bug could survive this long.

ivanrodriguez3753 commented 3 years ago

It was causing a bug in my compiler, tested by putting a print statement after grow_begin: label and seeing it was only called once (at the beginning when length, maxlen are both 0. Further tested by printing length, maxlen before the icmp and the result was 0010203040... etc meaning maxlen was never being updated. Other than that, your website was extremely helpful in finishing up my project.

f0rki commented 3 years ago

ah sorry I forgot to merge this! thanks!