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.

Commit a5e7fbbc authored by John Zhang's avatar John Zhang
Browse files

It's actually LONG_BIT-dependent.

parent 4468ed58
from rpython.rlib.rarithmetic import ovfcheck
from rpython.rlib.rarithmetic import ovfcheck, LONG_BIT
from rpython.rlib.rbigint import rbigint
from som.primitives.primitives import Primitives
from som.vmobjects.integer import Integer
......@@ -105,7 +105,7 @@ def _leftShift(ivkbl, frame, interpreter):
l = left.get_embedded_integer()
r = right.get_embedded_integer()
try:
if not (l == 0 or 0 <= r <= 63):
if not (l == 0 or 0 <= r < LONG_BIT):
raise OverflowError
result = ovfcheck(l << r)
frame.push(universe.new_integer(result))
......
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