From 3e18694be7909f8643cc6407ce88a0ae96161b63 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Sun, 24 May 2015 16:24:57 +0300 Subject: [PATCH] code for method --- lib/parfait/method.rb | 1 + lib/virtual/boot.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/parfait/method.rb b/lib/parfait/method.rb index 33a817c3..f45f1cc5 100644 --- a/lib/parfait/method.rb +++ b/lib/parfait/method.rb @@ -24,6 +24,7 @@ module Parfait raise "No class #{name}" unless clazz @for_class = clazz @name = name + @code = Word.new_object 0 @arg_names = arg_names @locals = [] @tmps = [] diff --git a/lib/virtual/boot.rb b/lib/virtual/boot.rb index 69ff8774..44a265f5 100644 --- a/lib/virtual/boot.rb +++ b/lib/virtual/boot.rb @@ -31,7 +31,7 @@ module Virtual "Layout" => ["object_class"] , "Class" => ["object_layout"], "Dictionary" => ["keys" , "values"] , - "Method" => ["name" , "arg_names" , "locals" , "tmps"] , + "Method" => ["name" , "code" ,"arg_names" , "locals" , "tmps"] , "Module" => ["name" , "instance_methods", "super_class", "meta_class"] } layouts.each do |name , layout|