From c426f4a6d5f4026203db67bf06a4eca04be9cdce Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Wed, 28 Oct 2015 21:38:52 +0200 Subject: [PATCH] some of the sources methods belonged to method really --- lib/parfait/method.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/parfait/method.rb b/lib/parfait/method.rb index 490ce236..0747703d 100644 --- a/lib/parfait/method.rb +++ b/lib/parfait/method.rb @@ -77,5 +77,16 @@ module Parfait def inspect "#{self.for_class.name}:#{name}(#{arguments.inspect})" end + + def total_byte_length + self.instructions.total_byte_length + end + + # position of the function is the position of the entry block, is where we call + def set_position at + at += 8 #for the 2 header words + self.instructions.set_position at + end + end end