use the return jump to jump to the return sequence

thus every method only has one exit
should make multi return messages smaller
especially when we have escape analisis
(maybe will help with inlining too)
This commit is contained in:
Torsten Ruger
2018-08-02 17:36:39 +03:00
parent 4d4b691a4b
commit 5346077a72
3 changed files with 27 additions and 12 deletions

View File

@ -1,14 +1,15 @@
# A CallableMethod is static object that primarily holds the executable code.
# It is callable through it's binary code
# Additionally to the base class it has a name
#
# It's relation to the method a ruby programmer knows (called VoolMethod) is many to one,
# meaning one VoolMethod (untyped) has many CallableMethod implementations.
# The VoolMethod only holds vool code, no binary.
module Parfait
# A CallableMethod is static object that primarily holds the executable code.
# It is callable through it's binary code
#
# It's relation to the method a ruby programmer knows (called VoolMethod) is many to one,
# meaning one VoolMethod (untyped) has many CallableMethod implementations.
# The VoolMethod only holds vool code, no binary.
#
# CallableMethods are bound to a known type (self_type) and have known argument
# and local variables. All variable resolution inside the method is exact (static),
# only method resolution may be dynamic
class CallableMethod < Callable
def ==(other)