To protect your data, the CISO officer has suggested users to enable GitLab 2FA as soon as possible.

Commit 349463b4 authored by Stefan Marr's avatar Stefan Marr
Browse files

Remove replace_bytecodes, because it is not actually used

Signed-off-by: default avatarStefan Marr <>
parent 3610d639
......@@ -180,12 +180,5 @@ class Class(Object):
assert prims is not None, "We yet only support prims for known classes"
def replace_bytecodes(self):
cnt = self.get_number_of_instance_invokables()
for i in range(0, cnt):
inv = self.get_instance_invokable(i)
if not inv.is_primitive():
def __str__(self):
return "Class(" + self.get_name().get_string() + ")"
......@@ -2,8 +2,6 @@ from __future__ import absolute_import
from som.vmobjects.array import Array
from som.interpreter.bytecodes import bytecode_length
class Method(Array):
# Static field indices and number of method fields
......@@ -115,40 +113,6 @@ class Method(Array):
def replace_bytecodes(self):
newbc = ["\x00"] * len(self._bytecodes)
idx = 0
i = 0
while i < len(self._bytecodes):
bc1 = self._bytecodes[i]
len1 = bytecode_length(bc1)
if i + len1 >= len(self._bytecodes):
# we're over target, so just copy bc1
for j in range(i, i + len1):
newbc[idx] = self._bytecodes[j]
idx += 1
newbc[idx] = bc1
idx += 1
# copy args to bc1
for j in range(i + 1, i + len1):
newbc[idx] = self._bytecodes[j]
idx += 1
i += len1 # update i to point on bc2
# we copy the new array because it may be shorter, and we don't
# want to upset whatever dependence there is on the length
self._bytecodes = ["\x00"] * len(idx)
for i in range(0, idx):
self._bytecodes[i] = newbc[i]
# TODO: remove these things
def get_receiver_class(self, index):
return self._receiver_class_table[index]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment