Commit Graph

11525 Commits

Author SHA1 Message Date
Richard Feldman
064dc12145
fix typo in comment 2021-12-01 22:06:03 -05:00
Folkert
27269faa0b optimize alias to var conversion 2021-12-01 18:39:45 +01:00
Richard Feldman
e6bec46898
Merge pull request #2109 from rtfeldman/refactor-passed-function
refactor passed (to higher order lowlevel) funcion
2021-12-01 08:17:39 -05:00
Brian Carroll
a3827d6636
Merge pull request #2071 from rtfeldman/refcount-mono-ir
Start generating refcounting code as mono IR
2021-12-01 12:59:16 +00:00
Folkert de Vries
d37ddeb162
Merge pull request #2113 from rtfeldman/joshuawarner32/fix-indentation-within-parens
Fix formatting of if as an left-hand-side of an operator
2021-12-01 13:38:22 +01:00
Folkert de Vries
1c7671c9ab
Merge pull request #2111 from rtfeldman/joshuawarner32/multiline-string-asserts
Make assert output for fmt+parse tests more understandable
2021-12-01 13:35:20 +01:00
Folkert
834ba77046 missed a bool 2021-12-01 12:53:47 +01:00
Richard Feldman
68e2701948
Merge pull request #2106 from rtfeldman/arraystring
replaced ArrayString with arrayvec
2021-11-30 22:44:45 -05:00
Joshua Warner
3228a23c98 Fix formatting of if as an left-hand-side of an operator 2021-11-30 17:53:26 -08:00
Joshua Warner
fdeafe4bab Make assert output more understandable 2021-11-30 17:48:24 -08:00
Brian Carroll
6b30ab79ac Fix release build of Wasm backend 2021-12-01 00:03:01 +00:00
Folkert
bec74c36c5 refactor passed (to higher order lowlevel) funcion 2021-11-30 21:50:27 +01:00
Richard Feldman
68e206f42c
Merge pull request #2108 from rtfeldman/implement_num_to_str
Implement Num.toStr
2021-11-30 15:34:39 -05:00
rvcas
40090f20e6 test: update tests to use Num.toStr 2021-11-30 14:56:08 -05:00
rvcas
00bd77bf1d chore: update builtin docs 2021-11-30 14:55:41 -05:00
rvcas
023f7f44a7 chore: update examples that reference fromInt 2021-11-30 14:55:08 -05:00
rvcas
f995a07029 feat: Num.toStr
* add type for Num.toStr
  * create new lowlevel
  * delete types and Symbol for fromInt and fromFloat
  * leave LowLevel::{StrFromFloat,StrFromInt}
  * match on LowLevel::NumToStr and figure out the layout to decide
    which build function to delegate to
2021-11-30 14:52:06 -05:00
Richard Feldman
d29d05ea87
Merge pull request #2107 from Ivo-Balbaert/trunk
correcting 2 typos in README.md compiler folder
2021-11-30 14:04:53 -05:00
Ivo-Balbaert
ea742b93d5 correcting 2 typos in README.md compiler folder 2021-11-30 19:53:33 +01:00
Brian Carroll
2bb49f55f8 Doc comment for RefcountProcGenerator 2021-11-30 15:48:35 +00:00
Anton-4
038c296891 replaced ArrayString with arrayvec 2021-11-30 14:06:36 +01:00
Brian Carroll
45302d996b Update small string tests in wasm_str 2021-11-30 13:02:08 +00:00
Brian Carroll
1c3b76ba03 Fix a bug in generated refcount proc for str 2021-11-30 12:59:22 +00:00
Brian Carroll
ea64b6488c Add some disabled debugging statements 2021-11-30 12:59:03 +00:00
Brian Carroll
b1ba1d2db9 WasmBackend no longer needs any public fields, only methods 2021-11-30 10:58:03 +00:00
Brian Carroll
a08633fd36 Debugging improvements 2021-11-30 10:58:03 +00:00
Brian Carroll
8a137126fe Fix bug with linker info for refcount procs 2021-11-30 10:57:59 +00:00
Brian Carroll
22ccb6eca4 Prefix string constants with REFCOUNT_MAX 2021-11-30 09:57:31 +00:00
Brian Carroll
c2a2ff2957 Create Expr::to_pretty in mono IR 2021-11-30 09:57:26 +00:00
Brian Carroll
079a8311ec Delete HeapMemory variant of WasmLayout, just treat pointers as Primitive
When I created this (at the very beginning of the Wasm backend),
I didn't really have a clear reason for it. I just thought it might end up
making sense treat heap pointers differently from numbers, somehow.

But the semantic differences between pointers and other numbers is not relevant
to WasmLayout. The semantics are clear from where the Symbol appears in the IR.

Also we were storing heap pointers in locals, for no real reason.
And the fact that it's *different* meant a lot of new cases in match expressions,
to do the exact same thing as Primitives but with a pointless difference.

Until now, we haven't really used this variant in any of our tests.
But the refcount pointer needed it... and everything broke!
2021-11-30 09:57:00 +00:00
Brian Carroll
3581c7f5be Use readable debug names throughout refcount proc generator 2021-11-30 09:57:00 +00:00
Brian Carroll
820d9e0ab4 Register debug names for new Symbols, and refactor to avoid borrow-checker issues 2021-11-30 09:57:00 +00:00
Brian Carroll
e7d8c7c895 Make gen_wasm's Env mutable 2021-11-30 09:57:00 +00:00
Brian Carroll
f4d52f7084 Add alignment argument to Zig decref call 2021-11-30 09:57:00 +00:00
Brian Carroll
7b5fb2577b Delete unused bash scripts 2021-11-30 09:57:00 +00:00
Brian Carroll
38e3386b80 Formatting & comments 2021-11-30 09:57:00 +00:00
Brian Carroll
ebc1fd6880 Get rid of special ModuleId for refcounting code 2021-11-30 09:57:00 +00:00
Brian Carroll
9bb5335c8d Delete unused tests 2021-11-30 09:57:00 +00:00
Brian Carroll
2ad032f894 Integrate refcount proc generator with Wasm backend 2021-11-30 09:57:00 +00:00
Brian Carroll
61575cea7e Generate calls to refcount procs from Wasm backend 2021-11-30 09:57:00 +00:00
Brian Carroll
985fa9dade Generate refcounting code as IR 2021-11-30 09:57:00 +00:00
Brian Carroll
264927fb85 Wasm code gen for new refcount lowlevels 2021-11-30 09:57:00 +00:00
Brian Carroll
6e5acadfea Create new lowlevels for refcounting 2021-11-30 09:57:00 +00:00
Brian Carroll
c8278dcb1c Add a comment on REFCOUNT_MAX 2021-11-30 09:57:00 +00:00
Folkert de Vries
d67cc883ca
Merge pull request #2101 from rtfeldman/wasm_empty_array
WASM: EmptyArray
2021-11-30 10:17:33 +01:00
Richard Feldman
0b2aedf8ee
Add Yann S, Shahn H, and Tankor S to AUTHORS 2021-11-29 21:39:46 -05:00
Richard Feldman
090a30d995
Merge pull request #2104 from rtfeldman/tankorsmash-tutorial-patch-1
tweak small stuff in the tutorial
2021-11-29 21:30:08 -05:00
rvcas
6305947b1a fix: exclude gen-dev from gen_list test compilation 2021-11-29 18:08:12 -05:00
TankorSmash
0880435d6e
fix error in example 2021-11-29 15:08:03 -08:00
TankorSmash
5e4f8b579e
tweak small stuff in the tutorial
Added a tiny intro, reintroduce what I assume was the wikipedia link, tweak formatting by using coffeescript tags more
2021-11-29 15:00:04 -08:00