Skip to content

Commit e590a6b

Browse files
authored
Update core-lib and RPython (#57)
2 parents b7acae5 + b239f2a commit e590a6b

File tree

6 files changed

+22
-16
lines changed

6 files changed

+22
-16
lines changed

.github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@ jobs:
2626

2727
steps:
2828
- name: Checkout
29-
uses: actions/checkout@v3
29+
uses: actions/checkout@v4
3030
with:
3131
submodules: true
3232

3333
- name: Set up PyPy
34-
uses: actions/setup-python@v4
34+
uses: actions/setup-python@v5
3535
with:
3636
python-version: ${{ matrix.python-version }}
3737

3838
- name: Download PyPy Sources
3939
if: matrix.id != 'basic'
4040
run: |
41-
export PYPYVER=v7.3.11
41+
export PYPYVER=v7.3.15
4242
curl https://downloads.python.org/pypy/pypy2.7-${PYPYVER}-src.tar.bz2 -o pypy.tar.bz2
4343
tar -xjf pypy.tar.bz2
4444
mv pypy2.7-${PYPYVER}-src .pypy

.gitlab-ci.yml

+10-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ stages:
55

66
variables:
77
PYTHONUNBUFFERED: "true"
8-
PYPY_SRC_DIR: /home/gitlab-runner/.local/pypy2.7-v7.3.11-src
9-
PYPY_BIN_DIR: /home/gitlab-runner/.local/pypy2.7-v7.3.11-linux64/bin
8+
PYPY_SRC_DIR: /data/home/gitlab-runner/.asdf/installs/awfy/pypysrc-2.7-v7.3.15
9+
PYPY_BIN_DIR: /data/home/gitlab-runner/.asdf/installs/python/pypy2.7-7.3.15/bin
1010

1111
before_script:
1212
- git submodule update --init
@@ -22,14 +22,16 @@ build-and-test-interpreters:
2222
- export PATH=$PATH:$PYPY_BIN_DIR
2323

2424
- export SOM_INTERP=BC
25-
25+
- (cd Examples/Benchmarks/TestSuite && ./duplicate-tests.sh)
26+
2627
# Unit Tests
2728
- PYTHONPATH=src python3 -m pytest
2829
- ./som.sh -cp Smalltalk TestSuite/TestHarness.som
2930

3031
# Interpreter
3132
- $RPYTHON --batch src/main_rpython.py
3233
- ./som-bc-interp -cp Smalltalk TestSuite/TestHarness.som
34+
- ./som-bc-interp -cp Smalltalk:TestSuite Examples/Benchmarks/TestSuite/TestTestSuite.som
3335

3436
- export SOM_INTERP=AST
3537

@@ -40,6 +42,7 @@ build-and-test-interpreters:
4042
# Interpreter
4143
- $RPYTHON --batch src/main_rpython.py
4244
- ./som-ast-interp -cp Smalltalk TestSuite/TestHarness.som
45+
- ./som-ast-interp -cp Smalltalk:TestSuite Examples/Benchmarks/TestSuite/TestTestSuite.som
4346

4447

4548
# Package and Upload
@@ -67,6 +70,8 @@ build-and-test-jit-bc:
6770
# JIT Compiled Version
6871
- $RPYTHON --batch -Ojit src/main_rpython.py
6972
- ./som-bc-jit -cp Smalltalk TestSuite/TestHarness.som
73+
- (cd Examples/Benchmarks/TestSuite && ./duplicate-tests.sh)
74+
- ./som-bc-jit -cp Smalltalk:TestSuite Examples/Benchmarks/TestSuite/TestTestSuite.som
7075

7176
# Package and Upload
7277
- lz4 som-bc-jit som-bc-jit.lz4
@@ -91,6 +96,8 @@ build-and-test-jit-ast:
9196
# JIT Compiled Version
9297
- $RPYTHON --batch -Ojit src/main_rpython.py
9398
- ./som-ast-jit -cp Smalltalk TestSuite/TestHarness.som
99+
- (cd Examples/Benchmarks/TestSuite && ./duplicate-tests.sh)
100+
- ./som-ast-jit -cp Smalltalk:TestSuite Examples/Benchmarks/TestSuite/TestTestSuite.som
94101

95102
# Package and Upload
96103
- lz4 som-ast-jit som-ast-jit.lz4

src/som/compiler/bc/method_generation_context.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,7 @@ def get_max_context_level(self):
276276

277277
def add_bytecode(self, bytecode, stack_effect):
278278
self._current_stack_depth += stack_effect
279-
if self._current_stack_depth > self.max_stack_depth:
280-
self.max_stack_depth = self._current_stack_depth
279+
self.max_stack_depth = max(self.max_stack_depth, self._current_stack_depth)
281280

282281
self._bytecode.append(bytecode)
283282
self._last_4_bytecodes[0] = self._last_4_bytecodes[1]

src/som/compiler/parser.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def _literal_integer(self, negate_value):
299299

300300
bigint = bigint_from_str(self._text)
301301
if negate_value:
302-
bigint.sign = -1
302+
bigint._set_sign(-1) # pylint: disable=protected-access
303303
result = BigInteger(bigint)
304304
except ValueError:
305305
raise ParseError(

src/som/vmobjects/object_with_layout.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ def _get_all_fields(self):
6464

6565
def _set_all_fields(self, field_values):
6666
assert not we_are_jitted()
67-
self._field1 = (
68-
self._field2
69-
) = self._field3 = self._field4 = self._field5 = nilObject
70-
self.prim_field1 = (
71-
self.prim_field2
72-
) = self.prim_field3 = self.prim_field4 = self.prim_field5 = 1234567890
67+
self._field1 = self._field2 = self._field3 = self._field4 = self._field5 = (
68+
nilObject
69+
)
70+
self.prim_field1 = self.prim_field2 = self.prim_field3 = self.prim_field4 = (
71+
self.prim_field5
72+
) = 1234567890
7373

7474
for i in range(0, self._object_layout.get_number_of_fields()):
7575
if field_values[i] is None:

0 commit comments

Comments
 (0)