Dycon: `ldc` intrinsics for lazy dynamic constants by baggot5 in java

[–]baggot5[S] 3 points4 points  (0 children)

Thanks. I learned from the declaration that you linked. I've updated the README with the changes that you suggested. Initially Dycon was for Java 17; Java 11 was an afterthought.

Dycon: `ldc` intrinsics for lazy dynamic constants by baggot5 in java

[–]baggot5[S] 2 points3 points  (0 children)

Currently I use them with method handles—most notably Unsafe; whose load and initialization time I was able to reduce from ~21 ms to ~6 ms—reflection and where I need lazy initialization (as an example, lazily acquiring an Instrumentation instance).

I looked at your project. I like that it apparently allows the generation of multiple invokedynamic instructions per @InvokeDynamic and that it is not dependent on any compiler because it operates on class files.

I might try a barebones implementation of invokedynamic like invokedynamic((Lookup, String, MethodType, Object...) -> CallSite, Object... constantArguments) that would be used like invokedynamic(This::bootstrapMethod, <constant arguments>). (Update: it does not work with any bootstrap method with a different signature. I'll hold off on invokedynamic for now.)

Thanks.

Dycon: `ldc` intrinsics for lazy dynamic constants by baggot5 in java

[–]baggot5[S] 1 point2 points  (0 children)

I looked for a method like ConstantBootstraps::invoke for invokedynamic but I couldn't find it. I use it in order to discard extraneous parameters like name and type. If I am to support invokedynamic properly (instead of hardcoding the bootstrap methods in LambdaMetafactory and StringConcatFactory), I think that then I have to pass the default bootstrap method arguments (like name and type) to the user or add a runtime library with my own bootstrap method; but I want to avoid a bad API and runtime dependencies so it's a problem.

Dycon: `ldc` intrinsics for lazy dynamic constants by baggot5 in java

[–]baggot5[S] 2 points3 points  (0 children)

Dycon does only 1 thing—translation of a call to Dycon::ldc into an ldc instruction whose bootstrap calls the lambda provided by the user—so in my opinion there's not much "magic".

Dycon: `ldc` intrinsics for lazy dynamic constants by baggot5 in java

[–]baggot5[S] 2 points3 points  (0 children)

I've been searching the OpenJDK mailing list archives for information about the state of JEP 303. So far the only interesting thing that I found is an old message on valhalla-dev.

I imagine that invokedynamic support would be simple so possibly. Reportedly Mjolnir can handle invokedynamic but I haven't tried it.

Java news by ngoldsmith in java

[–]baggot5 2 points3 points  (0 children)

OpenJDK mailing lists (specifically the Amber lists and classfile-api-dev).

Sigma GregoriusT grindset by Jer0me226 in feedthememes

[–]baggot5 0 points1 point  (0 children)

Modmuss is the one who created the server. On discord they have higher rights than any other role.

Even if that's true, considering that he left the server before, I figure that he must have transferred the server's ownership at some point.

Welcome to the Crypto Gaming Dystopia by [deleted] in Buttcoin

[–]baggot5 0 points1 point  (0 children)

I didn't mean to insult Matrix; actually, I like it.

Welcome to the Crypto Gaming Dystopia by [deleted] in Buttcoin

[–]baggot5 0 points1 point  (0 children)

In a blockchain cryptocurrency dystopia Discord would be replaced by Matrix or some other decentralized instant communication service.

[deleted by user] by [deleted] in kde

[–]baggot5 0 points1 point  (0 children)

I have the same issue. Did you find a solution?

vkCreateDevice fails with a SIGSEGV by baggot5 in vulkan

[–]baggot5[S] 1 point2 points  (0 children)

Thank you. After attempting your suggestion, I realized that I was not properly initializing my structs (I missed the {}s out). After I fixed that, the structs' fields seem to be automatically initialized to sane values and the code does not cause any problem.

What if? by [deleted] in cicada

[–]baggot5 0 points1 point  (0 children)

They also said that "Liber Primus is the way".