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 920240b8 authored by Tobias Pape's avatar Tobias Pape Committed by Stefan Marr
Browse files

hash() is not rpython

parent 3b0cd388
...@@ -9,7 +9,7 @@ import math ...@@ -9,7 +9,7 @@ import math
def _push_long_result(frame, result, universe): def _push_long_result(frame, result, universe):
# Check with integer bounds and push: # Check with integer bounds and push:
if integer_value_fits(result): if integer_value_fits(result):
frame.push(universe.new_integer(result)) frame.push(universe.new_integer(int(result)))
else: else:
frame.push(universe.new_biginteger(result)) frame.push(universe.new_biginteger(result))
......
from rpython.rlib.objectmodel import compute_identity_hash
from som.primitives.primitives import Primitives from som.primitives.primitives import Primitives
from som.vmobjects.primitive import Primitive from som.vmobjects.primitive import Primitive
...@@ -13,7 +15,8 @@ def _equals(ivkbl, frame, interpreter): ...@@ -13,7 +15,8 @@ def _equals(ivkbl, frame, interpreter):
def _hashcode(ivkbl, frame, interpreter): def _hashcode(ivkbl, frame, interpreter):
rcvr = frame.pop() rcvr = frame.pop()
frame.push(interpreter.get_universe().new_integer(hash(rcvr))) frame.push(interpreter.get_universe().new_integer(
compute_identity_hash(rcvr)))
def _objectSize(ivkbl, frame, interpreter): def _objectSize(ivkbl, frame, interpreter):
rcvr = frame.pop() rcvr = frame.pop()
......
from rpython.rlib.objectmodel import compute_identity_hash
from som.primitives.primitives import Primitives from som.primitives.primitives import Primitives
from som.vmobjects.primitive import Primitive from som.vmobjects.primitive import Primitive
...@@ -40,7 +42,8 @@ def _substring(ivkbl, frame, interpreter): ...@@ -40,7 +42,8 @@ def _substring(ivkbl, frame, interpreter):
def _hashcode(ivkbl, frame, interpreter): def _hashcode(ivkbl, frame, interpreter):
rcvr = frame.pop() rcvr = frame.pop()
frame.push(interpreter.get_universe().new_integer(hash(rcvr.get_embedded_string()))) frame.push(interpreter.universe().new_integer(
compute_identity_hash(rcvr.get_embedded_string())))
class StringPrimitives(Primitives): class StringPrimitives(Primitives):
......
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