-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement new StableApiDefinition
string coderange methods
#443
Comments
StableApiDefinition
string coderange methods
The |
While TruffleRuby uses a different string representation than CRuby, it does support all of the code ranges. Code ranges are a little weird in that they're not directly exposed and should be an implementation detail, but they affect the semantics of several methods that practically they need to be implemented. I expound on that in a comprehensive blog post for those interested. You should get the same resolved code range in both TruffleRuby and CRuby. I say resolved because TruffleRuby will eagerly compute the code range in many cases. And, owing to a rope-based representation, there's no need to clear the code range in other cases. TruffleRuby supports native code range functionality like the |
@nirvdrum do the proposed method definitions make sense at least (even if we may need to no-op some)? Open to improvements here as well |
The function signatures look pretty good, but I'm not sure what's meant by "inline". Is that a naming convention used elsewhere? In CRuby, the code range is stored in the header bits. On JRuby and TruffleRuby it's stored in a field in the Ruby string object. I'll need to think about |
In order to support Truffleruby on magnus, we need to support string coderange operations, which currently relies on cruby internals.
The text was updated successfully, but these errors were encountered: