github ponylang/ponyc 0.44.0

latest releases: 0.58.6, 0.58.5, 0.58.4...
3 years ago

Fixed a compile-time crash related to Pony-specific optimizations

Ticket #3784 tracked an issue related the MergeMessageSend optimization pass, which does Pony-specific optimizations within the LLVM optimizer pipeline.

It turned out that this pass was not written to handle the case of being run on a code block that contained sections of code that had already been optimized by this pass, and in such a case it failed an assertion error, crashing the compiler on such a program.

The fix was to disable running the pass on blocks in which we could detect signs of the optimization of that pass already being present.

Programs that were previously compiling okay should not see any difference in behavior or performance - the only programs that could potentially benefit from the skipped optimization were crashing, so there is no regression in their behavior.

Split FilePath construction into two methods

FilePath previously had only one constructor, the default create, which used a union of (AmbientAuth | FilePath). The first half of this union AmbientAuth could never error, while the second FilePath could error. By splitting construction into two methods, we now have a default create constructor which cannot error and a new from constructor which can error. The default create constructor now accepts a new "files" package root authority FileAuth as well as the global root authority AmbientAuth, while the new from constructor uses FilePath.

The result of this change is that three user changes are needed, namely around create, from, and mkdtemp. Any place where previously AmbientAuth was accepted now also accepts FileAuth.

Prior to this change, create could be used with AmbientAuth as in:

let ambient: AmbientAuth = ...
let filepath: FilePath = FilePath(ambient, path)?

After this change, create can be used with AmbientAuth or FileAuth -- note that this can no longer fail:

let ambient: AmbientAuth = ...
let filepath: FilePath = FilePath(ambient, path)

or

let fileauth: FileAuth = ...
let filepath: FilePath = FilePath(fileauth, path)

Prior to this change, create could be used with FilePath as in:

let filepath: FilePath = ...
let subpath = FilePath(filepath, path)?

After this change, construction with an existing FilePath must use from:

let filepath: FilePath = ...
let subpath = FilePath.from(filepath, path)?

Prior to this change, mkdtemp could be used with AmbientAuth or FilePath as in:

let ambient: AmbientAuth = ...
let tempdir = FilePath.mkdtemp(ambient, prefix)?

or

let filepath: FilePath = ...
let tempdir = FilePath.mkdtemp(filepath, prefix)?

After this change, mkdtemp can also use FileAuth -- note can still fail:

let fileauth: FileAuth = ...
let tempdir = FilePath.mkdtemp(fileauth, prefix)?

[0.44.0] - 2021-09-03

Fixed

  • Fix a compile-time crash related to Pony-specific optimizations. (PR #3831)

Changed

  • Update FilePath constructors to allow a non-partial way to create a FilePath (PR #3819)

Don't miss a new ponyc release

NewReleases is sending notifications on new releases.