Constant-time Reference Counting in Effekt#1299
Conversation
…C instead of LLVM because of better debug possibilities
|
Hey @danielflat, thanks for the PR. |
|
hi @jiribenes, yes. I closed the other ones. |
phischu
left a comment
There was a problem hiding this comment.
Looks very good so far, impressive work.
I still need to review llvm/Transformer.scala.
| // only relevant for macOS | ||
| val arch: String = System.getProperty("os.arch") | ||
| assert(!OS.contains("mac") || List("aarch64", "x86_64").contains(arch), "If you have a macbook -> It should have either an aarch64 or x86_64 architecture.") | ||
|
|
||
| val libraries = C.config.clangLibraries.toOption.map(file).orElse { | ||
| OS match { | ||
| case os if os.contains("mac") => Some(file("/opt/homebrew/lib")) | ||
| case os if os.contains("mac") && arch.equals("aarch64") => Some(file("/opt/homebrew/lib")) | ||
| case os if os.contains("mac") => Some(file("/usr/local/lib")) | ||
| case os if os.contains("win") => None | ||
| case os if os.contains("linux") => Some(file("/usr/local/lib")) | ||
| case os => None | ||
| } | ||
| } | ||
| val includes = C.config.clangIncludes.toOption.map(file).orElse { | ||
| OS match { | ||
| case os if os.contains("mac") => Some(file("/opt/homebrew/include")) | ||
| case os if os.contains("mac") && arch.equals("aarch64") => Some(file("/opt/homebrew/include")) | ||
| case os if os.contains("mac") => Some(file("/usr/local/include")) |
There was a problem hiding this comment.
Someone with a Mac should test and approve this
There was a problem hiding this comment.
fwiw, this works on my machine (though I use nix-darwin, so I'm not the best guinea pig)
| ) | ||
|
|
||
| override lazy val withoutOptimizations: Set[File] = Set( | ||
| examplesDir / "ctrc" / "nooptimized", |
There was a problem hiding this comment.
Why are the tests in a folder nooptimized? I can't find the "optimized" folder.
I personally would not add any tests at all. Others surely disagree.
There was a problem hiding this comment.
Yes, there is no optimized folder because during the thesis, it was helpful to work with the pure program rather than the optimized one. These tests were done to "debug" better through Effekt.
It would be cool if we could test stronger by asserting the number of used chunks or other invariants. Then these tests would have more value
|
If kept separate, the CRTC tests should likely be grouped with LLVM tests (i.e. added to both Lines 227 to 251 in 12001cf |
…C instead of LLVM because of better debug possibilities
…al-constant-time-rc
c42ca0a to
cad45d6
Compare
cad45d6 to
a1985c8
Compare
f617df0 to
42d07eb
Compare
@phischu Here is my final PR for my thesis. Can you check it, please?