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 2.7% of users enabled 2FA.

Commit a3d1e509 authored by Stefan Marr's avatar Stefan Marr
Browse files

Adopting superficial changes from RTruffleSOM


Signed-off-by: default avatarStefan Marr <git@stefan-marr.de>
parent 0c323fe0
......@@ -13,5 +13,7 @@ def _signature(ivkbl, frame, interpreter):
class MethodPrimitives(Primitives):
def install_primitives(self):
self._install_instance_primitive(Primitive("holder", self._universe, _holder))
self._install_instance_primitive(Primitive("signature", self._universe, _signature))
self._install_instance_primitive(Primitive("holder",
self._universe, _holder))
self._install_instance_primitive(Primitive("signature",
self._universe, _signature))
......@@ -14,5 +14,7 @@ def _signature(ivkbl, frame, interpreter):
class PrimitivePrimitives(Primitives):
def install_primitives(self):
self._install_instance_primitive(Primitive("holder", self._universe, _holder))
self._install_instance_primitive(Primitive("signature", self._universe, _signature))
self._install_instance_primitive(Primitive("holder",
self._universe, _holder))
self._install_instance_primitive(Primitive("signature",
self._universe, _signature))
......@@ -8,7 +8,7 @@ def _concat(ivkbl, frame, interpreter):
argument = frame.pop()
rcvr = frame.pop()
frame.push(interpreter.get_universe().new_string(rcvr.get_embedded_string()
+ argument.get_embedded_string()))
+ argument.get_embedded_string()))
def _asSymbol(ivkbl, frame, interpreter):
......
......@@ -10,4 +10,5 @@ def _asString(ivkbl, frame, interpreter):
class SymbolPrimitives(Primitives):
def install_primitives(self):
self._install_instance_primitive(Primitive("asString", self._universe, _asString))
self._install_instance_primitive(Primitive("asString", self._universe,
_asString))
......@@ -37,13 +37,13 @@ class Method(AbstractObject):
self._holder = None
def is_primitive(self):
@staticmethod
def is_primitive():
return False
def is_invokable(self):
"""In the RPython version, we use this method to identify methods
and primitives
"""
@staticmethod
def is_invokable():
""" We use this method to identify methods and primitives """
return True
def get_number_of_locals(self):
......@@ -114,7 +114,8 @@ class Method(AbstractObject):
raise e
def __str__(self):
return "Method(" + self.get_holder().get_name().get_string() + ">>" + str(self.get_signature()) + ")"
return ("Method(" + self.get_holder().get_name().get_string() + ">>" +
str(self.get_signature()) + ")")
def get_class(self, universe):
return universe.methodClass
......
from som.vmobjects.abstract_object import AbstractObject
class Primitive(AbstractObject):
_immutable_fields_ = ["_invoke", "_is_empty", "_signature", "_holder"]
......@@ -15,13 +16,13 @@ class Primitive(AbstractObject):
inv = self._invoke
inv(self, frame, interpreter)
def is_primitive(self):
@staticmethod
def is_primitive():
return True
def is_invokable(self):
"""In the RPython version, we use this method to identify methods
and primitives
"""
@staticmethod
def is_invokable():
""" We use this method to identify methods and primitives """
return True
def get_signature(self):
......@@ -52,4 +53,4 @@ def empty_primitive(signature_string, universe):
def _invoke(ivkbl, frame, interpreter):
""" Write a warning to the screen """
print "Warning: undefined primitive %s called" % ivkbl.get_signature().get_string()
print "Warning: undefined primitive %s called" % str(ivkbl.get_signature())
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