summaryrefslogtreecommitdiffstats
path: root/runtime/bench2/var_bench
blob: a45d9170a8db9893cf46d1c56723842954c95beb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env ruby
load './bench.rb'

# This is a test of the translator's ability to detect
# when variables are never modified and to optimize 
# reading of them.

["var.st","const.st"].each do |file|
  File.open(file,"r") do |f|
    desc = f.gets.sub(/^#/,'').strip
    test = Stapbench.new(desc)
    test.file = file
    test.run
    test.print
  end
end