coldacid,
@coldacid@shitposter.club avatar

back in the day you could write a function that ends in a call to another function in the same module, and the compiler could optimize out the stack frame for that call

I don't think you can do that with metadata-rich managed code systems like Java or .NET

icedquinn,
@icedquinn@blob.cat avatar

@coldacid why not? the JIT uses that metadata too

coldacid,
@coldacid@shitposter.club avatar

@icedquinn it's the JIT (or AOT "compiler") that would have to perform that optimization, not the actual code compiler

icedquinn,
@icedquinn@blob.cat avatar

@coldacid
> actual code compiler
compilers tend to go through several layers ("intermediate representation.") MSIL basically just becomes that MIR instead.

coldacid,
@coldacid@shitposter.club avatar

@icedquinn MSIL and Java bytecode are just ML/assembly for their respective virtual machines

icedquinn,
@icedquinn@blob.cat avatar

@coldacid you'll see the same thing in the rust and clang compilers. usually language -> parse tree -> ast -> ever degrading cycles of turning the graph in to a stream of code (MIR) -> eventually ends up in things like SSA form (LLVM IR)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • Hentai
  • doujinshi
  • announcements
  • general
  • All magazines