Skip to content

Commit 7d63eb0

Browse files
committed
Merge branch 'master'
2 parents c347c7c + cadf050 commit 7d63eb0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1527
-536
lines changed

ci.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ local const = import 'ci_common/constants.libsonnet';
33
local builder = import 'ci_common/builder.libsonnet';
44

55
{
6-
overlay: "9c948fac4c5424a79d957f0e62bed7cc71489ed2",
6+
overlay: "2c03a4e4ad99df9c60094b0b54b5555ceaaf7a19",
77

88
// ======================================================================================================
99
//

graalpython/benchmarks/src/micro/c-call-classmethod.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
22
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
33
#
44
# The Universal Permissive License (UPL), Version 1.0
@@ -45,7 +45,9 @@
4545
} NativeCustomObject;
4646
4747
PyObject* nc_classmethod(PyObject* class, PyObject* args) {
48-
return PyTuple_GET_ITEM(args, 0);
48+
PyObject* item = PyTuple_GET_ITEM(args, 0);
49+
Py_INCREF(item);
50+
return item;
4951
}
5052
5153
static struct PyMethodDef nc_methods[] = {
@@ -74,7 +76,7 @@
7476
0,
7577
0,
7678
Py_TPFLAGS_DEFAULT,
77-
"",
79+
0,
7880
0, /* tp_traverse */
7981
0, /* tp_clear */
8082
0, /* tp_richcompare */
@@ -140,4 +142,3 @@ def measure(num):
140142

141143
def __benchmark__(num=1000000):
142144
measure(num)
143-

graalpython/benchmarks/src/micro/c-instantiation.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
22
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
33
#
44
# The Universal Permissive License (UPL), Version 1.0
@@ -71,7 +71,7 @@
7171
0,
7272
0,
7373
Py_TPFLAGS_DEFAULT,
74-
"",
74+
0,
7575
0, /* tp_traverse */
7676
0, /* tp_clear */
7777
0, /* tp_richcompare */
@@ -140,4 +140,3 @@ def measure(num):
140140

141141
def __benchmark__(num=1000000):
142142
measure(num)
143-

graalpython/benchmarks/src/micro/c-list-iterating-obj.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
22
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
33
#
44
# The Universal Permissive License (UPL), Version 1.0
@@ -129,7 +129,7 @@
129129
0,
130130
0,
131131
Py_TPFLAGS_DEFAULT,
132-
"",
132+
0,
133133
0, /* tp_traverse */
134134
0, /* tp_clear */
135135
0, /* tp_richcompare */
@@ -197,4 +197,3 @@ def measure(num):
197197

198198
def __benchmark__(num=1000000):
199199
measure(num)
200-

graalpython/benchmarks/src/micro/c-magic-bool.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
22
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
33
#
44
# The Universal Permissive License (UPL), Version 1.0
@@ -129,7 +129,7 @@
129129
0,
130130
0,
131131
Py_TPFLAGS_DEFAULT,
132-
"",
132+
0,
133133
0, /* tp_traverse */
134134
0, /* tp_clear */
135135
0, /* tp_richcompare */
@@ -202,4 +202,3 @@ def measure(num):
202202

203203
def __benchmark__(num=1000000):
204204
measure(num)
205-

graalpython/benchmarks/src/micro/c-magic-iter.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
22
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
33
#
44
# The Universal Permissive License (UPL), Version 1.0
@@ -118,7 +118,7 @@
118118
0,
119119
0,
120120
Py_TPFLAGS_DEFAULT,
121-
"",
121+
0,
122122
0, /* tp_traverse */
123123
0, /* tp_clear */
124124
0, /* tp_richcompare */
@@ -160,7 +160,7 @@
160160
0,
161161
0,
162162
Py_TPFLAGS_DEFAULT,
163-
"",
163+
0,
164164
0, /* tp_traverse */
165165
0, /* tp_clear */
166166
0, /* tp_richcompare */
@@ -249,7 +249,7 @@ def count(num):
249249
val0 = next(it)
250250
val1 = next(it)
251251
val2 = next(it)
252-
252+
253253
return (val0, val1, val2)
254254

255255

@@ -260,4 +260,3 @@ def measure(num):
260260

261261
def __benchmark__(num=1000000):
262262
measure(num)
263-

graalpython/benchmarks/src/micro/c_arith-binop.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
22
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
33
#
44
# The Universal Permissive License (UPL), Version 1.0
@@ -63,7 +63,7 @@
6363
0, /* tp_as_buffer */
6464
Py_TPFLAGS_DEFAULT |
6565
Py_TPFLAGS_BASETYPE, /* tp_flags */
66-
"", /* tp_doc */
66+
0, /* tp_doc */
6767
0, /* tp_traverse */
6868
0, /* tp_clear */
6969
0, /* tp_richcompare */

graalpython/benchmarks/src/micro/c_arith_binop_2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
22
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
33
#
44
# The Universal Permissive License (UPL), Version 1.0
@@ -153,7 +153,7 @@
153153
0, /* tp_as_buffer */
154154
Py_TPFLAGS_DEFAULT |
155155
Py_TPFLAGS_BASETYPE, /* tp_flags */
156-
"", /* tp_doc */
156+
0, /* tp_doc */
157157
0, /* tp_traverse */
158158
0, /* tp_clear */
159159
0, /* tp_richcompare */

graalpython/benchmarks/src/micro/c_member_access.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
22
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
33
#
44
# The Universal Permissive License (UPL), Version 1.0
@@ -88,7 +88,7 @@
8888
0, /* tp_as_buffer */
8989
Py_TPFLAGS_DEFAULT |
9090
Py_TPFLAGS_BASETYPE, /* tp_flags */
91-
"", /* tp_doc */
91+
0, /* tp_doc */
9292
0, /* tp_traverse */
9393
0, /* tp_clear */
9494
0, /* tp_richcompare */

graalpython/com.oracle.graal.python.cext/include/pyconfig.h

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -41,6 +41,8 @@
4141
#ifndef Py_PYCONFIG_H
4242
#define Py_PYCONFIG_H
4343

44+
// required for __UINT32_MAX__ etc.
45+
#include <limits.h>
4446

4547
// defines based on Clang defines
4648
#define SIZEOF_DOUBLE __SIZEOF_DOUBLE__
@@ -60,13 +62,21 @@
6062
#define SIZEOF_VOID_P __SIZEOF_POINTER__
6163
#define SIZEOF_WCHAR_T __SIZEOF_WCHAR_T__
6264
#define SIZEOF__BOOL 1
63-
#define INT_MIN ((-__INT32_MAX__)-1)
64-
#define INT_MAX __INT32_MAX__
65+
# ifndef UINT_MAX
6566
#define UINT_MAX __UINT32_MAX__
67+
#endif
68+
# ifndef SHRT_MIN
6669
#define SHRT_MIN ((-__INT16_MAX__)-1)
70+
#endif
71+
# ifndef SHRT_MAX
6772
#define SHRT_MAX __INT16_MAX__
73+
#endif
74+
# ifndef USHRT_MAX
6875
#define USHRT_MAX __UINT16_MAX__
76+
#endif
77+
# ifndef CHAR_BIT
6978
#define CHAR_BIT __CHAR_BIT__
79+
#endif
7080
// #define Py_LIMITED_API 1
7181
#define _Py_BEGIN_SUPPRESS_IPH
7282
#define _Py_END_SUPPRESS_IPH

0 commit comments

Comments
 (0)