Skip to content

Commit

Permalink
Compact clear tape for C mode in MindFreak main
Browse files Browse the repository at this point in the history
  • Loading branch information
Maumagnaguagno committed Jan 5, 2024
1 parent 0f14abb commit 1c1d1b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MindFreak.rb
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ def optimize(bytecode, blank_tape = false)
file_c = "#{filename}.c"
file_exe = "./#{filename}.exe"
t = Time.now.to_f
File.write(file_c, MindFreak.to_c(program, tape, eof))
File.write(file_c, MindFreak.to_c(program, bounds, eof))
if ['gcc', 'clang'].any? {|cc| system("#{cc} #{file_c} -o #{file_exe} -O2 -s")}
puts "Compilation time: #{Time.now.to_f - t}s"
# Execute
Expand Down

0 comments on commit 1c1d1b8

Please sign in to comment.