From 31807bcb9311f5a4de98ce4da0db5390bd43d054 Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Fri, 29 Mar 2024 20:55:12 -0500 Subject: [PATCH] Eliminate TAINTED_F flag Other flags needed to be shifted, which I was afraid of before but now I have no fear. --- core/src/main/java/org/jruby/ObjectFlags.java | 4 ---- core/src/main/java/org/jruby/util/StringSupport.java | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/org/jruby/ObjectFlags.java b/core/src/main/java/org/jruby/ObjectFlags.java index 4b25eb54da8..cc702f23783 100644 --- a/core/src/main/java/org/jruby/ObjectFlags.java +++ b/core/src/main/java/org/jruby/ObjectFlags.java @@ -12,10 +12,6 @@ public interface ObjectFlags { int NIL_F = registry.newFlag(RubyBasicObject.class); int FROZEN_F = registry.newFlag(RubyBasicObject.class); - // Deprecated and unused but don't move due to checks elsewhere for the following flags - @Deprecated - int TAINTED_F = registry.newFlag(RubyBasicObject.class); - int CACHEPROXY_F = registry.newFlag(RubyModule.class); int NEEDSIMPL_F = registry.newFlag(RubyModule.class); int REFINED_MODULE_F = registry.newFlag(RubyModule.class); diff --git a/core/src/main/java/org/jruby/util/StringSupport.java b/core/src/main/java/org/jruby/util/StringSupport.java index abfa8c2beec..766f6bb1b86 100644 --- a/core/src/main/java/org/jruby/util/StringSupport.java +++ b/core/src/main/java/org/jruby/util/StringSupport.java @@ -72,8 +72,8 @@ public final class StringSupport { public static final int CR_UNKNOWN = 0; // We hardcode these so they can be used in a switch below. The assert verifies they match FlagRegistry's value. - public static final int CR_7BIT = 16; - public static final int CR_VALID = 32; + public static final int CR_7BIT = 8; + public static final int CR_VALID = 16; static { assert CR_7BIT == CR_7BIT_F : "CR_7BIT = " + CR_7BIT + " but should be " + CR_7BIT_F; assert CR_VALID == CR_VALID_F : "CR_VALID = " + CR_VALID + " but should be " + CR_VALID_F;