Make method_call benchmark use inheritance.

This also fixes a bug where constructors weren't being bound
correctly, and eliminates some unneeded instructions when
compiling ifs.

I also tweaked the other method_call languages to match Wren's.
Since Wren needs to do a super call to get to the parent _count,
the other languages do now too.

This is nice too because it means we're benchmarking super 
calls.
This commit is contained in:
Bob Nystrom
2013-12-18 07:37:41 -08:00
parent caafa96252
commit e7cf8ffe2e
7 changed files with 62 additions and 61 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ class NthToggle < Toggle
def activate
@counter += 1
if @counter >= @count_max
@bool = !@bool
super
@counter = 0
end
self