summaryrefslogtreecommitdiff
path: root/yjit/src/options.rs
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2022-12-05 17:43:17 -0500
committerGitHub <noreply@github.com>2022-12-05 17:43:17 -0500
commit235fc50447c13b054d8849ef2fcdac55ef1f5f9c (patch)
treed04b088ab0c8cc13c63eb691b86a25c2ec3d494f /yjit/src/options.rs
parente4aba8f519ca0b63fb3da11d6573443545aaef9b (diff)
downloadruby-235fc50447c13b054d8849ef2fcdac55ef1f5f9c.tar.gz
YJIT: Remove --yjit-code-page-size (#6865)
Certain code page sizes don't work and can cause crashes, so having this value available as a command-line option is a bit dangerous. Remove it and turn it into a constant instead.
Diffstat (limited to 'yjit/src/options.rs')
-rw-r--r--yjit/src/options.rs20
1 files changed, 0 insertions, 20 deletions
diff --git a/yjit/src/options.rs b/yjit/src/options.rs
index 268e141ed6..d734bcc40b 100644
--- a/yjit/src/options.rs
+++ b/yjit/src/options.rs
@@ -8,10 +8,6 @@ pub struct Options {
// Note that the command line argument is expressed in MiB and not bytes
pub exec_mem_size: usize,
- // Size of each executable memory code page in bytes
- // Note that the command line argument is expressed in KiB and not bytes
- pub code_page_size: usize,
-
// Number of method calls after which to start generating code
// Threshold==1 means compile on first execution
pub call_threshold: usize,
@@ -54,7 +50,6 @@ pub struct Options {
// Initialize the options to default values
pub static mut OPTIONS: Options = Options {
exec_mem_size: 128 * 1024 * 1024,
- code_page_size: 16 * 1024,
call_threshold: 30,
greedy_versioning: false,
no_type_prop: false,
@@ -130,21 +125,6 @@ pub fn parse_option(str_ptr: *const std::os::raw::c_char) -> Option<()> {
}
},
- ("code-page-size", _) => match opt_val.parse::<usize>() {
- Ok(n) => {
- // Enforce bounds checks and that n is divisible by 4KiB
- if n < 4 || n > 256 || n % 4 != 0 {
- return None
- }
-
- // Convert from KiB to bytes internally for convenience
- unsafe { OPTIONS.code_page_size = n * 1024 }
- }
- Err(_) => {
- return None;
- }
- },
-
("call-threshold", _) => match opt_val.parse() {
Ok(n) => unsafe { OPTIONS.call_threshold = n },
Err(_) => {