diff options
| author | Alan Wu <XrXr@users.noreply.github.com> | 2023-03-02 16:21:05 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-02 16:21:05 -0500 |
| commit | 34026afd0434fc482b2a6419ec6aeece07dcf52f (patch) | |
| tree | 5114cfe00c280caa4648aa0c2af0f5d1aad3406e /yjit/src/core.rs | |
| parent | a9f4e5cc6099f2b2f6202e5ac252edddc07492f8 (diff) | |
YJIT: Delete stale `frozen_bytes` related code (#7423)
The code and comments in there have been disabled by comments for a long
time. The issues that the counter used to solve are now solved more
comprehensively by "runningness" [tracking][1] introduced by Code GC
and [delayed deallocation][2].
Having a single counter doesn't fit our current model where code pages
that could be touched or not are interleaved, anyway.
Just delete the code.
[1]: e7c71c6c9271b0c29f210769159090e17128e740
[2]: a0b0365e905e1ac51998ace7e6fc723406a2f157
Notes
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'yjit/src/core.rs')
| -rw-r--r-- | yjit/src/core.rs | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/yjit/src/core.rs b/yjit/src/core.rs index c364072ea1..edae7a58d7 100644 --- a/yjit/src/core.rs +++ b/yjit/src/core.rs @@ -1820,14 +1820,6 @@ pub fn gen_entry_point(iseq: IseqPtr, ec: EcPtr) -> Option<CodePtr> { /// Generate code for a branch, possibly rewriting and changing the size of it fn regenerate_branch(cb: &mut CodeBlock, branch: &mut Branch) { - // FIXME - /* - if (branch->start_addr < cb_get_ptr(cb, yjit_codepage_frozen_bytes)) { - // Generating this branch would modify frozen bytes. Do nothing. - return; - } - */ - // Remove old comments if let (Some(start_addr), Some(end_addr)) = (branch.start_addr, branch.end_addr) { cb.remove_comments(start_addr, end_addr) @@ -2425,9 +2417,6 @@ pub fn invalidate_block_version(blockref: &BlockRef) { // Some blocks exit on entry. Patching a jump to the entry at the // entry makes an infinite loop. } else { - // TODO(alan) - // if (block.start_addr >= cb_get_ptr(cb, yjit_codepage_frozen_bytes)) // Don't patch frozen code region - // Patch in a jump to block.entry_exit. let cur_pos = cb.get_write_ptr(); @@ -2468,12 +2457,6 @@ pub fn invalidate_block_version(blockref: &BlockRef) { assert_eq!(blockref, incoming_block); } - // TODO(alan): - // Don't patch frozen code region - // if (branch.start_addr < cb_get_ptr(cb, yjit_codepage_frozen_bytes)) { - // continue; - // } - // Create a stub for this branch target or rewire it to a valid block set_branch_target(target_idx as u32, block.blockid, &block.ctx, branchref, &mut branch, ocb); |
