ruby-libjit
llvm-project
ruby-libjit | llvm-project | |
---|---|---|
1 | 429 | |
20 | 34,200 | |
- | 2.9% | |
- | 10.0 | |
over 13 years ago | 3 days ago | |
Ruby | LLVM | |
GNU General Public License v3.0 or later | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ruby-libjit
-
NativeJIT: A C++ expression –> x64 JIT
It's interesting to see C++ expressions being used to create what is I think an AST that then gets compiled. I would love to see some syntactic sugar, though. For example, `expression.Mul(rsquared, expression.Immediate(PI))` could be `rsquared * expression.Immediate(PI)`. With overloading, anything that is not a recognized type could be converted to an immediate, so it could simply be `rsquared * PI`. Simple control structures could be even implemented with lambdas.
I did this for ruby-libjit, and it made writing a JIT compiler much easier to read. Here's an example: https://github.com/cout/ruby-libjit/blob/master/sample/fib.r...
And a real-world example (one of the very earliest JIT compilers for ruby, written in ruby, dates back to the ruby 1.8.x days): https://github.com/cout/ludicrous/blob/master/lib/ludicrous/...
llvm-project
-
Zig 0.15.1 Release Notes
This reminds me of a similar issue in LLVM's `raw_svector_ostream`. Before a 2015 commit https://github.com/llvm/llvm-project/commit/3d1173ba1a53cab0... ,
-
D4d4
Huh? Quoting a bit more from the article:
> [W]e find this in ARM.cpp:
> trapInstr = {0xd4, 0xd4, 0xd4, 0xd4};
The only thing left to explain is that the trap instruction is used as padding, but you can’t tell from here if that’s obvious or not. Opening the actual code[1], we see that the occurrences of trapInstr are all along the lines of
> void ARM::writePlt( /* ... / ) {
> / ... */
> memcpy(buf + 12, trapInstr.data(), 4); // Pad to 16-byte boundary
which isn’t the absolute best, but seems clear enough (if of course you know what a PLT is, which you should if you’re writing a linker).
I do think this merits an explanation that we’re using (what’s intended to be) a trap because the traditional option of using a nop makes ASLR less effective. But then the commit message you’re quoting doesn’t mention that either.
[1] https://github.com/llvm/llvm-project/blob/b20c291baec94ba370...
-
Undefined Behavior in C and C++
Certainly compiler developers are only human, and many of them write C++ so they're humans working with a terrible programming language, I wouldn't sign up for that either (I have written small contributions to compilers, but not in C++). I still don't see "any excuses". I see more usual human laziness and incompetence, LLVM for example IMNSHO doesn't work hard enough to ensure their IR has coherent semantics and to deliver on those semantics.
The compiler bug I'm most closely following, and which I suspect you have your eye on too is: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119472 aka https://github.com/rust-lang/rust/issues/107975 https://github.com/llvm/llvm-project/issues/45725
But it seems like it's just that everybody fucked this up in similar ways, that's two different major compiler backends! I wouldn't be surprised if Microsoft (whose code we can't see) find that they don't get this quite right either.
-
My Ideal Array Language
My ideal array language is one in which array operations are function compositions, since arrays are functions. A functional view of array expressions naturally minimizes needless temporaries in most cases.
See https://github.com/llvm/llvm-project/blob/main/flang/docs/Ar....
-
Ask HN: What should I do with the domain github.mx
Lightweight UI for Github? (Idk if that exists).
e.g. client requests https://github.mx/llvm/llvm-project, your server fetches the data from https://github.com/llvm/llvm-project (using an API or scraping the site), and renders it in a cleaner UI with less HTML and JavaScript.
It would be useful for slow/outdated devices and places with low internet bandwidth. The URL concept is similar to https://github.dev/llvm/llvm-project which opens the project in a web-hosted VSCode (so vaguely the opposite approach).
-
Clang: -Wexperimental-lifetime-safety: Experimental C++ Lifetime Safety Analysis
- Testing: llvm-lit tests validate the analysis by checking the generated facts.
Example:
[LifetimeSafety] Introduce intra-procedural analysis in Clang
- commit: https://github.com/llvm/llvm-project/commit/3076794e924f
-
Strategies for Fast Lexers
https://github.com/llvm/llvm-project/issues/56435
-
jank Is C++
> still is the main company behind LLVM.
lol people really say whatever comes to their mind around here don't they? I'm pretty sure all of the companies associated with these targets would strongly disagree with you
https://github.com/llvm/llvm-project/tree/main/llvm/lib/Targ...
-
So you want to serialize some DER?
The most interesting part of this post is the bit about half way down, where Alex uses Claude to help identify a missing compiler optimization in LLVM... and then uses Claude Code to implement that optimization and gets a PR accepted to LLVM itself! https://github.com/llvm/llvm-project/pull/142869
-
NativeJIT: A C++ expression –> x64 JIT
it's mostly upstream now, no need to dig around in their repos
https://github.com/llvm/llvm-project/tree/main/clang/tools/c...
What are some alternatives?
NativeJIT - A C++ expression -> x64 JIT
zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.