WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 1.6% of users enabled 2FA.

Commit 7355bbba authored by Stefan Marr's avatar Stefan Marr
Browse files

Remove bytecode index from frame, handled now by interpreter only [WIP]

Signed-off-by: default avatarStefan Marr <git@stefan-marr.de>
parent 1818766c
...@@ -20,7 +20,6 @@ class Frame(object): ...@@ -20,7 +20,6 @@ class Frame(object):
self._context = context self._context = context
self._stack = [nilObject] * num_elements self._stack = [nilObject] * num_elements
self._stack_pointer = 0 self._stack_pointer = 0
self._bytecode_index = 0
self._previous_frame = previous_frame self._previous_frame = previous_frame
def get_previous_frame(self): def get_previous_frame(self):
...@@ -89,12 +88,6 @@ class Frame(object): ...@@ -89,12 +88,6 @@ class Frame(object):
self._stack_pointer = (self.get_number_of_arguments() + self._stack_pointer = (self.get_number_of_arguments() +
self.get_method().get_number_of_locals().get_embedded_integer() - 1) self.get_method().get_number_of_locals().get_embedded_integer() - 1)
def get_bytecode_index(self):
return self._bytecode_index
def set_bytecode_index(self, value):
self._bytecode_index = value
def get_stack_element(self, index): def get_stack_element(self, index):
# Get the stack element with the given index # Get the stack element with the given index
# (an index of zero yields the top element) # (an index of zero yields the top element)
...@@ -143,11 +136,11 @@ class Frame(object): ...@@ -143,11 +136,11 @@ class Frame(object):
for i in range(0, num_args): for i in range(0, num_args):
self._stack[i] = frame.get_stack_element(num_args - 1 - i) self._stack[i] = frame.get_stack_element(num_args - 1 - i)
def print_stack_trace(self): def print_stack_trace(self, bytecode_index):
# Print a stack trace starting in this frame # Print a stack trace starting in this frame
from som.vm.universe import std_print, std_println from som.vm.universe import std_print, std_println
std_print(self.get_method().get_holder().get_name().get_string()) std_print(self.get_method().get_holder().get_name().get_string())
std_println(" %d @ %s" % (self.get_bytecode_index(), std_println(" %d @ %s" % (bytecode_index,
self.get_method().get_signature().get_string())) self.get_method().get_signature().get_string()))
if self.has_previous_frame(): if self.has_previous_frame():
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