-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LLVM String
s (UTF-8-interpreted byte buffers)
#142
Conversation
Since we decided not to grow strings and need a reference count, the buffer representation will have to be changed drastically. NOTE: This comment box marks the tip of |
07b9324
to
c151751
Compare
|
String
s (UTF-8-interpreted byte buffers)
2ee8ae4
to
2d234fb
Compare
My recent force push should only have introduced |
I will wait for this merge to complete before starting a new branch where |
f50fef0
to
e919dd0
Compare
effekt/shared/src/main/scala/effekt/generator/llvm/Transformer.scala
Outdated
Show resolved
Hide resolved
effekt/shared/src/main/scala/effekt/generator/llvm/Transformer.scala
Outdated
Show resolved
Hide resolved
effekt/shared/src/main/scala/effekt/generator/llvm/Transformer.scala
Outdated
Show resolved
Hide resolved
effekt/shared/src/main/scala/effekt/machine/PrettyPrinter.scala
Outdated
Show resolved
Hide resolved
effekt/shared/src/main/scala/effekt/generator/llvm/Transformer.scala
Outdated
Show resolved
Hide resolved
effekt/shared/src/main/scala/effekt/generator/llvm/Transformer.scala
Outdated
Show resolved
Hide resolved
effekt/shared/src/main/scala/effekt/generator/llvm/Transformer.scala
Outdated
Show resolved
Hide resolved
effekt/shared/src/main/scala/effekt/generator/llvm/Transformer.scala
Outdated
Show resolved
Hide resolved
effekt/shared/src/main/scala/effekt/generator/llvm/Transformer.scala
Outdated
Show resolved
Hide resolved
3fed1f2
to
a07065b
Compare
Valgrind reports no leaks on both `out/hello-world` and `out/strings-refcount`.
I think Effekt's string literals are buggy: "\n" is not being interpreted. Furthermore, I think our test driver meddles with newlines.
This patch is planned to later be re-instantiated on another branch.
Co-authored-by: Jonathan <jonathan@b-studios.de>
Previously, the reference count was left of the buffer's bytes. This did have the advantage that `struct Pos.obj` was the data pointer, but one had to shift for freeing.
228344e
to
ced412a
Compare
Adding
Strings
s to the LLVM backend.All strings are UTF-8 encoded;
stdout
-specific encodings are not respected.