-
Notifications
You must be signed in to change notification settings - Fork 0
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
new ICL mechanism (TIP 280+530 replacement) v3, partial string segments back-port #6
Open
sebres
wants to merge
16
commits into
core-8-6-branch
Choose a base branch
from
sebres-line-cont-tip280-530-v3
base: core-8-6-branch
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
…tLineInfo which is allocated with ByteCode now during compile process).
…r in Proc structure now)
…h an implementation of code- and string-segment objects (amend/review needed)
…s is NULL), fixed info.test
…object in compEnv.strSegPtr (env.test, exec.test)
… table (replacement of TIP 530 applied), still shimmering problem with list objects becoming continuation (amend expected); extend List to avoid possible shimmering issues on invisible continuations.
… with support of list-type (allows to find string segment of list)
…8, this change illustrating "broken" behavior of previous implementation of TclContinuations* routines: clLocPtr binding on the object address does not affected by in-place modification of the object (basically other object then), so if unshared string gets amended or previously not canonical unshared list gets new elements (or it shrinks), then its string representation changes, but it still retains its old clLocPtr (bound in global hash table on the address of object only), this is worse and can produce very unexpected results by delivering of invisible continuation lines (inclusive SF or panic "Derived ICL data for object using offsets from before the script").
…t, **ICL panic** in encoding.test)
…ible with this cut implementation)
…EGREP really create full (own) segment representation, that avoid rewrite of ICL in shared segments (supplied as clNext to TclContinuationsEnterDerived), todo: rewrite this without usage of TclContinuationsEnterDerived at all (wouldn't need if segments completely back-ported); + protect against several cases could occur very rarely;
sebres
changed the title
Sebres line cont tip280 530 v3
new ICL mechanism (TIP 280+530 replacement) v3, partial string segments back-port
Sep 19, 2019
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.
Interim artificial PR.
This will be rebased (partially) to fossil-repository, so this interim PR is temporary (review, comments, etc).
I'll provide an RFE as soon as it gets introduced in fossil repo.
Contents:
This is a replacement implementation of TIP 280 (and workaround TIP 530) with more faster and precise ICL (invisible continuation lines) for parsing, substitution and compilation routines.
The implementation does not have bottleneck (no global ICL hash table anymore), so don't have line continuations overhead (and thus supersedes TIP 530).
Due to certain incompatibility of some parts (back-porting from my featured branches) or many artificial tests (but also obvious bugs and mistakes in some Tcl-tests) this variant implements not whole intended functionality, I provided initially.
My other parser implementation is still more precise and faster (due to in-place wrapping continuations resp. escape sequences, so on demand), but as already said not quite compatible.
Therefore it is reverted/rewritten in some parts and almost 100% compatible now.
As for bugs in tests and original implementation - commit f80a3ec "fixes" the bug in test-case and illustrates why it is basically an error.
More info later...
Additionally it contains new internal primitives (string segments) which allow to share same code or string and its parts, unless object shimmering in unsupported type or NTS string representation is expected...
More info later...
Pros:
representation);
for example tcl-test suite running 10266 tests (filtered) within single interpreter consumed 185MB previously, where new version reserves only 140MB memory on same set of tests.
binding on the object address does not affected by inplace modification of object, so if previously not
canonical unshared list gets new elements (or it shrinks), then its string representation changes, but
it still retains its old clLocPtr (bound in global hash table on the address of object only),
this is worse and can produce very unexpected results by delivering of invisible continuation lines.
source/thread- or tpool-send/etc will be extended), similar handling used successfully in my own fork
already several years;
Cons:
The possible solutions are:
or at end of compile it cuts unneeded parts out, so splitting of large segments occurs already by parse);
it affects mostly internals only, example
Tcl_ObjHasBytes(objPtr)
(which is still internal) vs.objPtr->bytes