-
-
Save smarr/20874439e84db3de33ab2174d686725c to your computer and use it in GitHub Desktop.
PySOM No GC support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/rlib/rgc.py b/src/rlib/rgc.py | |
index d5de78a..dfe48a0 100644 | |
--- a/src/rlib/rgc.py | |
+++ b/src/rlib/rgc.py | |
@@ -5,3 +5,6 @@ except ImportError: | |
def collect(): | |
pass | |
+ | |
+ def disable(): | |
+ pass | |
diff --git a/src/som/vm/universe.py b/src/som/vm/universe.py | |
index e795cab..788e755 100644 | |
--- a/src/som/vm/universe.py | |
+++ b/src/som/vm/universe.py | |
@@ -5,6 +5,7 @@ from rlib import jit | |
from rlib.string_stream import encode_to_bytes | |
from rlib.exit import Exit | |
from rlib.osext import path_split | |
+from rlib import rgc | |
from som.vmobjects.array import Array | |
from som.vmobjects.block_bc import block_evaluation_primitive | |
@@ -162,6 +163,8 @@ class Universe(object): | |
self._dump_bytecodes = True | |
elif arguments[i] in ["-h", "--help", "-?"] and not saw_others: | |
self._print_usage_and_exit() | |
+ elif arguments[i] == "--no-gc" and not saw_others: | |
+ rgc.disable() | |
else: | |
saw_others = True | |
remaining_args.append(arguments[i]) | |
@@ -204,6 +207,8 @@ class Universe(object): | |
std_println(" set search path for application classes") | |
std_println(" -d enable disassembling") | |
std_println(" -h print this help") | |
+ std_println("") | |
+ std_println(" --no-gc disable garbage collection") | |
# Exit | |
self.exit(0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment