Wilfred / bfc

An industrial-grade brainfuck compiler
https://bfc.wilfred.me.uk
GNU General Public License v2.0
508 stars 30 forks source link

Max cell index #19

Open Isawan opened 7 years ago

Isawan commented 7 years ago

A way to change the max cell index from the command line would be nice even if at build time.

Suppose I wanted to use more than 100,000 is that as straightforward as changing line 22 in src/bounds.rs?

Wilfred commented 7 years ago

Yep, that's correct. Increasing that number will increase the maximum number of cells used during compile-time execution, and the number of cells allocated for runtime execution.

We pass the cells as a vector to add_cells_init, and the size of this vector was due to highest_cell_index.

If you fancy creating a PR to make this a CLI option, that would be welcome :)