-
Notifications
You must be signed in to change notification settings - Fork 32
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
openjdk8/vectors/simple/20230905a #625
Open
easye
wants to merge
36
commits into
armedbear:master
Choose a base branch
from
easye:openjdk8/vectors/simple/20230905a
base: master
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.
Open
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
easye
force-pushed
the
openjdk8/vectors/simple/20230905a
branch
from
September 9, 2023 07:48
3dff6fc
to
afae575
Compare
(INCOMPLETE) Start of exploration on simplifying and improving support for sequences, vectors, and arrays by using generics and functions shipped as part of openjdk8. Goals: 1) Simplify class structure with parameterized types 2) Use openjdk8 methods like Arrays.fill(), sort() et. al. 3) Reduce memory use for "oversized" buffers 4) Optimize speed of basic operations TODO need some benchmarks to test before/after
INCOMPLETE: after finishing implementation, needs to be wired into MAKE-ARRAY to be useful.
TODO: wire getDescription() for our type menagerie Using the BuiltinClass hierarchy causes problems, so getDescription() is one way to indicate what implementation class is actually handling a specialization of sequence types.
It should work, as it references the upper-case operators, which should thunk down to the AREF, etc. methods in BasicVectorBuffer, but I could be wrong about the inheritance.
This doesn't seem to help anything.
Mark BasicVector as abstract.
easye
force-pushed
the
openjdk8/vectors/simple/20230905a
branch
from
November 21, 2023 22:27
4c3adfb
to
b9164fa
Compare
easye
added a commit
to easye/slime
that referenced
this pull request
Nov 30, 2023
Java bytes are signed, which means that accessing such a value from Lisp should be converted into a negative value between [-127 0) for bytes with a the high bit set [128 255). The in-progress changes to use unsigned-byte currently inadvertantly "fixes" direct use of such values to set places in UNSIGNED-BYTE arrays. <armedbear/abcl#625>
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.
Overhaul of underlying sequence code starting with
simple-vector
Use openjdk8 library to greater effect:
java.nio.Buffer
,java.util.array
build copy, fill, replace functions.A work in progress…
Supersedes #624.
--
Previous work using generics didn't really pan out. Use strategy of single class with switch on Java enumeration to bring code-paths "closer" together.
Notes on previous approach:
*** Use of generics doesn't seem to help implementation BasicVectorBuffer
One has to "record" the specialization via adding the class to the
constructor anyways.
The parameterized type can't be used as discriminator type for
different functions by arguments, as type erasure makes things an
Object anyways.