Skip to content

Commit bd8cde7

Browse files
committed
[GR-16441] Add missing TruffleBoundary in PZipImporter.
PullRequest: graalpython/559
2 parents 65b4e5c + bf79e5f commit bd8cde7

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/zipimporter/PZipImporter.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ public PZipImporter(LazyPythonClass cls, PDict zipDirectoryCache, String separat
125125
private SearchOrderEntry[] defineSearchOrder() {
126126
return new SearchOrderEntry[]{
127127
new SearchOrderEntry(joinStrings(separator, "__init__.py"),
128-
EnumSet.of(EntryType.IS_PACKAGE, EntryType.IS_SOURCE)),
129-
new SearchOrderEntry(".py", EnumSet.of(EntryType.IS_SOURCE))
128+
enumSetOf(EntryType.IS_PACKAGE, EntryType.IS_SOURCE)),
129+
new SearchOrderEntry(".py", enumSetOf(EntryType.IS_SOURCE))
130130
};
131131
}
132132

@@ -135,6 +135,16 @@ private static String joinStrings(String a, String b) {
135135
return a + b;
136136
}
137137

138+
@TruffleBoundary
139+
private static <E extends Enum<E>> EnumSet<E> enumSetOf(E e1) {
140+
return EnumSet.of(e1);
141+
}
142+
143+
@TruffleBoundary
144+
private static <E extends Enum<E>> EnumSet<E> enumSetOf(E e1, E e2) {
145+
return EnumSet.of(e1, e2);
146+
}
147+
138148
public PDict getZipDirectoryCache() {
139149
return moduleZipDirectoryCache;
140150
}

mx.graalpython/mx_graalpython.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ def graalpython_gate_runner(args, tasks):
359359

360360
with Task('GraalPython sandboxed tests', tasks, tags=[GraalPythonTags.unittest_sandboxed]) as task:
361361
if task:
362-
run_python_unittests(python_gvm(["sandboxed"]), args=["--llvm.sandboxed"])
362+
run_python_unittests(python_gvm(["sandboxed"]), args=["--llvm.managed"])
363363

364364
with Task('GraalPython Python tests', tasks, tags=[GraalPythonTags.tagged]) as task:
365365
if task:
@@ -373,7 +373,7 @@ def graalpython_gate_runner(args, tasks):
373373

374374
with Task('GraalPython sandboxed tests on SVM', tasks, tags=[GraalPythonTags.svmunit_sandboxed]) as task:
375375
if task:
376-
run_python_unittests(python_svm(["sandboxed"]), args=["--llvm.sandboxed"])
376+
run_python_unittests(python_svm(["sandboxed"]), args=["--llvm.managed"])
377377

378378
with Task('GraalPython license header update', tasks, tags=[GraalPythonTags.license]) as task:
379379
if task:
@@ -522,7 +522,7 @@ def run_shared_lib_test(args=None):
522522
return status;
523523
}
524524
#if %s
525-
status = poly_context_builder_option(isolate_thread, builder, "llvm.sandboxed", "true");
525+
status = poly_context_builder_option(isolate_thread, builder, "llvm.managed", "true");
526526
if (status != poly_ok) {
527527
return status;
528528
}
@@ -998,10 +998,10 @@ def _register_vms(namespace):
998998
'-Dgraal.TruffleExperimentalSplittingAllowForcedSplits=false'
999999
]), SUITE, 10)
10001000
python_vm_registry.add_vm(GraalPythonVm(config_name=CONFIGURATION_SANDBOXED, extra_polyglot_args=[
1001-
'--llvm.sandboxed',
1001+
'--llvm.managed',
10021002
]), SUITE, 10)
10031003
python_vm_registry.add_vm(GraalPythonVm(config_name=CONFIGURATION_NATIVE, extra_polyglot_args=[
1004-
"--llvm.sandboxed=false"
1004+
"--llvm.managed=false"
10051005
]), SUITE, 10)
10061006
python_vm_registry.add_vm(GraalPythonVm(config_name=CONFIGURATION_DUMP, extra_polyglot_args=[
10071007
"--experimental-options", "-dump"

0 commit comments

Comments
 (0)