From c625d5b80309a3553124c1723be9819ba9acfba3 Mon Sep 17 00:00:00 2001
From: pycsham <shampuiyanchloe@gmail.com>
Date: Mon, 13 Apr 2020 03:09:47 -0400
Subject: [PATCH] set lastMethodOffset to 4 as subtype testing table has been
 added

---
 TypeNodes.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/TypeNodes.py b/TypeNodes.py
index b621d53..28b222c 100644
--- a/TypeNodes.py
+++ b/TypeNodes.py
@@ -331,7 +331,7 @@ class ClassNode(ClassInterNode):
 
         ####### ADDING METHODS TO CLASS MEMORY LAYOUT AND FIELDS TO FIELD OFFSET TABLE #########
         # Copying over the offsets of methods from superclass and DECLARING memory segment for the methods
-        lastMethodOffset = 0  # stores the largest method offset in the superCalss
+        lastMethodOffset = 4  # stores the largest method offset in the superCalss
                         # TODO: set this to 4 after the implemntation of both the SIT and subtype testing table
                         # Note: This is 4 less than the offset of where the next method would be located
                         #       This is to accomodate for the addition of 4 to lastMethodOffset in EVERY (including the first) iteration in the
-- 
GitLab