Repository navigation
fix: Use better swizzled methods prefix to avoid collisions with possible existing methods in the class hierarchy - #46
Merged
Conversation
…ible existing methods in the class hierarchy
edusperoni
added a commit
that referenced
this pull request
Nov 25, 2026
…or IDNA (#606) * perf(runtime): keep ada's symbols out of the framework's exports ada's functions had default visibility, so the NativeScript dylib exported them and -dead_strip kept all of ada as roots, including the ada::url parser, the URLPattern route-set compiler and the C API that the runtime never calls. Compile ada.cpp with -fvisibility=hidden and unexport the ada symbols that runtime TUs emit as weak inline definitions, which also keeps the linker from warning about mixed-visibility weak symbols. Release arm64: ada's linked bytes 400.8 KB -> 263.8 KB. * feat(runtime): optional system ICU for ada's Unicode tables NS_ADA_SYSTEM_IDNA (off by default) routes ada's UTS #46 host conversion and URLPattern's identifier code point check to libicucore (uidna_openUTS46, u_hasBinaryProperty), so ada's compressed Unicode tables dead-strip. libicucore is autolinked from system_idna.cpp only when the flag is on. The options mirror Chromium/WebKit/swift-foundation (nontransitional, CheckBidi, CheckJoiners; hyphen and DNS-length errors ignored) and all-ASCII domains are lowercased without ICU, as WHATWG and ada do. On iOS 26.0.1 (ICU 76.1) it passes WPT toascii 87/87 and IdnaTestV2 2665/2676; the misses are characters newer than Unicode 16. Older iOS ships older Unicode data, so host results follow the OS version. Release arm64 with the flag on: ada 263.9 KB -> 182.2 KB. * perf(runtime): parse each URL once and drop std::regex from console new URL(input, base) called ada::can_parse, which parses base and input, then parsed both again; it now parses each once. URL.canParse uses ada::parse too, so ada::can_parse and its second parser instantiation dead-strip. canParse also stops truncating its input at an embedded NUL, and a base whose toString() throws now propagates the exception instead of aborting. Console's stack-frame check used two std::regex patterns; a hand-written matcher with the same semantics (fuzzed against std::regex on 2M mutated frames) removes std::regex from the framework. Release arm64 __TEXT: -69 KB (ada -21.8 KB, Console -40.4 KB). * test(runtime): cover URL bases, canParse, IDN hosts and non-ASCII URLPattern names * fix(runtime): URL.canParse treats an undefined base as absent * fix(runtime): keep ada's non-ASCII domain length limit in the system ICU path
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #34 and #43 in which we have a collision with an existing method name for
UINavigationController.__viewWillappear:and which results in the following errors to be logged when starting up an application:The application might crash as a result of this.