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:
@@ -29,7 +29,7 @@ class NthToggle < Toggle
|
||||
def activate
|
||||
@counter += 1
|
||||
if @counter >= @count_max
|
||||
@bool = !@bool
|
||||
super
|
||||
@counter = 0
|
||||
end
|
||||
self
|
||||
|
||||
Reference in New Issue
Block a user