Skip to content

Commit ae06baa

Browse files
committed
[GR-44178] Add patch for cmake
PullRequest: graalpython/2630
2 parents d66a9a8 + ebdb454 commit ae06baa

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/ThreadModuleBuiltins.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ long getStackSize(long stackSize) {
206206
}
207207

208208
@Builtin(name = "start_new_thread", minNumOfPositionalArgs = 3, maxNumOfPositionalArgs = 4, constructsClass = PythonBuiltinClassType.PThread)
209+
@Builtin(name = "start_new", minNumOfPositionalArgs = 3, maxNumOfPositionalArgs = 4)
209210
@GenerateNodeFactory
210211
abstract static class StartNewThreadNode extends PythonBuiltinNode {
211212
@Specialization

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/bytecode/PBytecodeRootNode.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2278,7 +2278,11 @@ private Object bytecodeLoop(VirtualFrame virtualFrame, Frame localFrame, Bytecod
22782278
CompilerAsserts.partialEvaluationConstant(targetIndex);
22792279
chainPythonExceptions(virtualFrame, mutableData, pe);
22802280
if (targetIndex == -1) {
2281-
throw reraiseUnhandledException(virtualFrame, localFrame, initialStackTop, isGeneratorOrCoroutine, mutableData, bciSlot, beginBci, pe, tracingEnabled, profilingEnabled);
2281+
reraiseUnhandledException(virtualFrame, localFrame, initialStackTop, isGeneratorOrCoroutine, mutableData, bciSlot, beginBci, pe, tracingEnabled, profilingEnabled);
2282+
if (pe != null) {
2283+
throw pe;
2284+
}
2285+
throw e;
22822286
}
22832287
if (pe != null) {
22842288
pe.setCatchingFrameReference(virtualFrame, this, beginBci);
@@ -3042,7 +3046,7 @@ private void unboxVariables(Frame localFrame) {
30423046
}
30433047

30443048
@InliningCutoff
3045-
private PException reraiseUnhandledException(VirtualFrame virtualFrame, Frame localFrame, int initialStackTop, boolean isGeneratorOrCoroutine, MutableLoopData mutableData, int bciSlot,
3049+
private void reraiseUnhandledException(VirtualFrame virtualFrame, Frame localFrame, int initialStackTop, boolean isGeneratorOrCoroutine, MutableLoopData mutableData, int bciSlot,
30463050
int beginBci, PException pe, boolean tracingEnabled, boolean profilingEnabled) {
30473051
// For tracebacks
30483052
setCurrentBci(virtualFrame, bciSlot, beginBci);
@@ -3059,7 +3063,6 @@ private PException reraiseUnhandledException(VirtualFrame virtualFrame, Frame lo
30593063
LoopNode.reportLoopCount(this, mutableData.loopCount);
30603064
}
30613065
traceOrProfileReturn(virtualFrame, mutableData, PNone.NONE, tracingEnabled, profilingEnabled);
3062-
throw pe;
30633066
}
30643067

30653068
@InliningCutoff
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From 65894588b0355350f69774df8cd9873153c8bf27 Mon Sep 17 00:00:00 2001
2+
From: Michael Simacek <[email protected]>
3+
Date: Thu, 9 Feb 2023 16:33:15 +0100
4+
Subject: [PATCH] Use prebuilt cmake by default
5+
6+
---
7+
CMakeLists.txt | 3 ++-
8+
1 file changed, 2 insertions(+), 1 deletion(-)
9+
10+
diff --git a/CMakeLists.txt b/CMakeLists.txt
11+
index 7a3a134..89bf75e 100644
12+
--- a/CMakeLists.txt
13+
+++ b/CMakeLists.txt
14+
@@ -25,7 +25,8 @@ if(CMakePythonDistributions_SUPERBUILD)
15+
16+
#-----------------------------------------------------------------------------
17+
# Options
18+
- set(default ON)
19+
+ # GraalPy change
20+
+ set(default OFF)
21+
if(WIN32 OR APPLE)
22+
set(default OFF)
23+
endif()
24+
--
25+
2.39.1
26+

0 commit comments

Comments
 (0)