Skip to content

Commit bd6531b

Browse files
committed
Merge commit 'd9dd0e517c2b48a6ccd4078107c09c50fde04c8e' into release/graal-vm/1.0
2 parents a978614 + d9dd0e5 commit bd6531b

File tree

790 files changed

+22556
-8066
lines changed

Some content is hidden

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

790 files changed

+22556
-8066
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,5 @@ Python3.g4.stamp
5454
## generated from: pyhocon -i ci.hocon -f json -o ci.json
5555
/ci.json
5656
/*.err
57+
/graalpython/include/*
58+
/graalpython/com.oracle.graal.python.test/src/tests/cpyext/As_FileDescriptor_Testfile

LICENSE

Lines changed: 1880 additions & 3 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
1-
# Graal.Python
1+
# Graal/Truffle-based implementation of Python
22

3-
A Python implementation on Graal in the early stages.
3+
GraalVM provides an early-stage experimental implementation of Python. A primary
4+
goal is to support SciPy and its constituent libraries. This Python
5+
implementation currently aims to be compatible with Python 3.7, but it is a long
6+
way from there, and it is very likely that any Python program that requires any
7+
imports at all will hit something unsupported. At this point, the Python
8+
implementation is made available for experimentation and curious end-users.
49

5-
For additional information, consult the `doc` directory.
10+
### Trying it
11+
12+
To try it, you can use the bundled releases from
13+
[www.graalvm.org](https://www.graalvm.org/downloads/). For more information and
14+
some examples of what you can do with it, check out the
15+
[reference](https://www.graalvm.org/docs/reference-manual/languages/python/).
16+
17+
### Licensing
18+
19+
This Graal/Truffle-based implementation of Python is copyright (c) 2017, 2018
20+
Oracle and/or its affiliates and is made available to you under the terms the
21+
Universal Permissive License v 1.0 as shown at
22+
[http://oss.oracle.com/licenses/upl](http://oss.oracle.com/licenses/upl). This
23+
implementation is in part derived from and contains additional code from 3rd
24+
parties, the copyrights and licensing of which is detailed in the
25+
[LICENSE](LICENSE) file.

ci.jsonnet

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
overlay: "fe68531f163967a8bef53a3c5569dc675133ef96",
2+
overlay: "4c51f4dae2d670a4895aaafbe47780ac2541c008",
33

44
// ======================================================================================================
55
//
@@ -201,15 +201,18 @@
201201
baseGraalGate + {tags:: "python-"+type} + getPlatform(platform) + {name: "python-"+ type +"-"+platform},
202202

203203
local styleGate = baseGraalGate + eclipseMixin + linuxMixin + {
204-
tags:: "style,fullbuild,license",
204+
tags:: "style,fullbuild,python-license",
205205
name: "python-style",
206206

207207
timelimit: TIME_LIMIT["1h"],
208208
},
209209

210-
local svmImportGate = function(source, platform="linux")
211-
local type = (if (source == true) then "source" else "binary");
212-
baseGate + getPlatform(platform) + {name: "python-svm-"+ type + "-import", tags:: "python-svm-" + type},
210+
local graalVmGate = baseGraalGate + linuxMixin {
211+
tags:: "python-graalvm",
212+
name: "python-graalvm",
213+
214+
timelimit: TIME_LIMIT["1h"],
215+
},
213216

214217
// ------------------------------------------------------------------------------------------------------
215218
//
@@ -246,10 +249,8 @@
246249
// style
247250
styleGate,
248251

249-
// svm builder gates
250-
svmImportGate(source=true),
251-
// TODO temporarily disabled
252-
// svmImportGate(source=false),
252+
// graalvm gates
253+
graalVmGate,
253254

254255
// deploy binaries
255256
deployGate(platform="linux"),

graalpython/benchmarks/src/benchmarks/ai-nqueen-timed.py

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,41 @@
11
#!/usr/bin/env python
2+
# Copyright 2008-2010 Isaac Gouy
3+
# Copyright (c) 2013, 2014, Regents of the University of California
4+
# Copyright (c) 2017, 2018, Oracle and/or its affiliates.
5+
# All rights reserved.
6+
#
7+
# Revised BSD license
8+
#
9+
# This is a specific instance of the Open Source Initiative (OSI) BSD license
10+
# template http://www.opensource.org/licenses/bsd-license.php
11+
#
12+
# Redistribution and use in source and binary forms, with or without
13+
# modification, are permitted provided that the following conditions are met:
14+
#
15+
# Redistributions of source code must retain the above copyright notice, this
16+
# list of conditions and the following disclaimer.
17+
#
18+
# Redistributions in binary form must reproduce the above copyright notice,
19+
# this list of conditions and the following disclaimer in the documentation
20+
# and/or other materials provided with the distribution.
21+
#
22+
# Neither the name of "The Computer Language Benchmarks Game" nor the name of
23+
# "The Computer Language Shootout Benchmarks" nor the name "nanobench" nor the
24+
# name "bencher" nor the names of its contributors may be used to endorse or
25+
# promote products derived from this software without specific prior written
26+
# permission.
27+
#
28+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
31+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
32+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
34+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
35+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
36+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38+
239
# 01/20/14
340
# Modified by Wei Zhang
441

@@ -68,4 +105,3 @@ def measure():
68105
main(7)
69106

70107
measure()
71-

graalpython/benchmarks/src/benchmarks/binarytrees.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,41 @@
1+
#!/usr/bin/env python
2+
# Copyright 2008-2010 Isaac Gouy
3+
# Copyright (c) 2013, 2014, Regents of the University of California
4+
# Copyright (c) 2017, 2018, Oracle and/or its affiliates.
5+
# All rights reserved.
6+
#
7+
# Revised BSD license
8+
#
9+
# This is a specific instance of the Open Source Initiative (OSI) BSD license
10+
# template http://www.opensource.org/licenses/bsd-license.php
11+
#
12+
# Redistribution and use in source and binary forms, with or without
13+
# modification, are permitted provided that the following conditions are met:
14+
#
15+
# Redistributions of source code must retain the above copyright notice, this
16+
# list of conditions and the following disclaimer.
17+
#
18+
# Redistributions in binary form must reproduce the above copyright notice,
19+
# this list of conditions and the following disclaimer in the documentation
20+
# and/or other materials provided with the distribution.
21+
#
22+
# Neither the name of "The Computer Language Benchmarks Game" nor the name of
23+
# "The Computer Language Shootout Benchmarks" nor the name "nanobench" nor the
24+
# name "bencher" nor the names of its contributors may be used to endorse or
25+
# promote products derived from this software without specific prior written
26+
# permission.
27+
#
28+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
31+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
32+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
34+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
35+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
36+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38+
139
# The Computer Language Benchmarks Game
240
# http://shootout.alioth.debian.org/
341
#

graalpython/benchmarks/src/benchmarks/binarytrees3.py

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,41 @@
1+
#!/usr/bin/env python
2+
# Copyright 2008-2010 Isaac Gouy
3+
# Copyright (c) 2013, 2014, Regents of the University of California
4+
# Copyright (c) 2017, 2018, Oracle and/or its affiliates.
5+
# All rights reserved.
6+
#
7+
# Revised BSD license
8+
#
9+
# This is a specific instance of the Open Source Initiative (OSI) BSD license
10+
# template http://www.opensource.org/licenses/bsd-license.php
11+
#
12+
# Redistribution and use in source and binary forms, with or without
13+
# modification, are permitted provided that the following conditions are met:
14+
#
15+
# Redistributions of source code must retain the above copyright notice, this
16+
# list of conditions and the following disclaimer.
17+
#
18+
# Redistributions in binary form must reproduce the above copyright notice,
19+
# this list of conditions and the following disclaimer in the documentation
20+
# and/or other materials provided with the distribution.
21+
#
22+
# Neither the name of "The Computer Language Benchmarks Game" nor the name of
23+
# "The Computer Language Shootout Benchmarks" nor the name "nanobench" nor the
24+
# name "bencher" nor the names of its contributors may be used to endorse or
25+
# promote products derived from this software without specific prior written
26+
# permission.
27+
#
28+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
31+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
32+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
34+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
35+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
36+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38+
139
# The Computer Language Benchmarks Game
240
# http://shootout.alioth.debian.org/
341
#
@@ -45,4 +83,4 @@ def main():
4583
main()
4684
duration = "%.3f\n" % (time.time() - start)
4785
#sys.stderr.write(duration)
48-
print("binarytrees: " + duration)
86+
print("binarytrees: " + duration)

graalpython/benchmarks/src/benchmarks/binarytrees3t.py

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,41 @@
1+
#!/usr/bin/env python
2+
# Copyright 2008-2010 Isaac Gouy
3+
# Copyright (c) 2013, 2014, Regents of the University of California
4+
# Copyright (c) 2017, 2018, Oracle and/or its affiliates.
5+
# All rights reserved.
6+
#
7+
# Revised BSD license
8+
#
9+
# This is a specific instance of the Open Source Initiative (OSI) BSD license
10+
# template http://www.opensource.org/licenses/bsd-license.php
11+
#
12+
# Redistribution and use in source and binary forms, with or without
13+
# modification, are permitted provided that the following conditions are met:
14+
#
15+
# Redistributions of source code must retain the above copyright notice, this
16+
# list of conditions and the following disclaimer.
17+
#
18+
# Redistributions in binary form must reproduce the above copyright notice,
19+
# this list of conditions and the following disclaimer in the documentation
20+
# and/or other materials provided with the distribution.
21+
#
22+
# Neither the name of "The Computer Language Benchmarks Game" nor the name of
23+
# "The Computer Language Shootout Benchmarks" nor the name "nanobench" nor the
24+
# name "bencher" nor the names of its contributors may be used to endorse or
25+
# promote products derived from this software without specific prior written
26+
# permission.
27+
#
28+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
31+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
32+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
34+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
35+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
36+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38+
139
# The Computer Language Benchmarks Game
240
# http://shootout.alioth.debian.org/
341
#
@@ -53,4 +91,4 @@ def measure():
5391
for run in range(1):
5492
main(16)
5593

56-
measure()
94+
measure()

graalpython/benchmarks/src/benchmarks/bm-ai.py

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,40 @@
11
#!/usr/bin/env python
2+
# Copyright 2008-2010 Isaac Gouy
3+
# Copyright (c) 2013, 2014, Regents of the University of California
4+
# Copyright (c) 2017, 2018, Oracle and/or its affiliates.
5+
# All rights reserved.
6+
#
7+
# Revised BSD license
8+
#
9+
# This is a specific instance of the Open Source Initiative (OSI) BSD license
10+
# template http://www.opensource.org/licenses/bsd-license.php
11+
#
12+
# Redistribution and use in source and binary forms, with or without
13+
# modification, are permitted provided that the following conditions are met:
14+
#
15+
# Redistributions of source code must retain the above copyright notice, this
16+
# list of conditions and the following disclaimer.
17+
#
18+
# Redistributions in binary form must reproduce the above copyright notice,
19+
# this list of conditions and the following disclaimer in the documentation
20+
# and/or other materials provided with the distribution.
21+
#
22+
# Neither the name of "The Computer Language Benchmarks Game" nor the name of
23+
# "The Computer Language Shootout Benchmarks" nor the name "nanobench" nor the
24+
# name "bencher" nor the names of its contributors may be used to endorse or
25+
# promote products derived from this software without specific prior written
26+
# permission.
27+
#
28+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
31+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
32+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
34+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
35+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
36+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
238

339
"""Simple, brute-force N-Queens solver."""
440

@@ -59,4 +95,3 @@ def measure():
5995

6096
if __name__ == "__main__":
6197
measure()
62-

0 commit comments

Comments
 (0)