Commit graph

6003 commits

Author SHA1 Message Date
Folkert
21ff434fe3 use unused values 2021-12-05 15:13:41 +01:00
Folkert
e0468363fb remove headers_parsed 2021-12-05 15:13:32 +01:00
Folkert
4af9539ce6 fixes by cargo clippy --fix 2021-12-05 15:04:28 +01:00
Joshua Warner
e3f2f8d9a4 keep indent state in fmt Buf 2021-12-04 18:26:32 -08:00
Richard Feldman
e872d00b13
Merge pull request #2128 from rtfeldman/joshuawarner32/check-format-stable
Check that formatting is stable/idempotent
2021-12-03 22:53:30 -05:00
Joshua Warner
4bbe1d308a rename expect_format_helper and add comment 2021-12-03 19:32:44 -08:00
Joshua Warner
5d3d4467c1 Fix indentation & stability in with formatting 2021-12-03 13:33:25 -08:00
Anton-4
e50fb25b38 forgot about Aarch64 2021-12-03 20:03:45 +01:00
Anton-4
4427779c7a set zig builtins target for compatibility 2021-12-03 19:57:19 +01:00
Joshua Warner
270cc49867 Also check formatting is stable in tests; ignore a test that's invalid / incorrect 2021-12-02 17:46:50 -08:00
Richard Feldman
4e91ce79de
Merge pull request #2121 from rtfeldman/optimize-alias-to-var
optimize alias to var conversion
2021-12-01 22:08:59 -05:00
Richard Feldman
064dc12145
fix typo in comment 2021-12-01 22:06:03 -05:00
Richard Feldman
23fda0819f
Merge pull request #2112 from rtfeldman/joshuawarner32/fix-defs-indenting
Fix fmt_spaces indenting in the context of 3 or more newlines
2021-12-01 21:58:58 -05:00
Richard Feldman
ed40a8fc1c
Merge pull request #2114 from rtfeldman/joshuawarner32/fix-det-indentation
Fix indentation within parens
2021-12-01 19:38:07 -05:00
Joshua Warner
6edb376fdd Modify test to make the problem clear 2021-12-01 16:14:27 -08:00
Joshua Warner
c6116ba3ca Fix fmt_spaces indenting in the context of 3 or more newlines 2021-12-01 16:14:27 -08:00
Joshua Warner
8ab7b121eb Use newline in places where it should obviously be used 2021-12-01 16:14:27 -08:00
Folkert
27269faa0b optimize alias to var conversion 2021-12-01 18:39:45 +01:00
Brian Carroll
72fa6217fb Refactor wasm lowlevels to make it easier to add more 128-bit ops 2021-12-01 15:09:23 +00: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
Joshua Warner
c0abf86f01 Fix indentation within parens 2021-11-30 17:55:50 -08: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
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
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
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