Skip to content
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

WIP: Test tools and tests for lowering (pass 1 - syntax desugaring) #32201

Closed
wants to merge 56 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
f5bc255
Test tools and some tests for syntax desugaring
c42f May 30, 2019
332fa1b
Lowering tests
c42f Jun 2, 2019
45eee71
Support interpolating aribtrary Exprs as reference ASTs
c42f Jun 2, 2019
34e9a56
Start testing loop structures
c42f Jun 2, 2019
4e8ece3
Start testing loops & functions
c42f Jun 3, 2019
827bfb1
More test for lowering of functions, declarations, tuples
c42f Jun 4, 2019
f169b0c
Fix translation of partially lowered lambdas
c42f Jun 4, 2019
cd57d4c
Test case: `for outer i = iter`
c42f Jun 4, 2019
3c320c2
Test case: Function keyword args
c42f Jun 4, 2019
714ed87
WIP: Tests for let blocks
c42f Jun 4, 2019
81df808
`let` with empty bindings as syntax for scope-block
c42f Jun 5, 2019
7745341
S-Expression parser. Very WIP.
c42f Jun 5, 2019
dfe4547
Test optionally generated functions
c42f Jun 5, 2019
ac777f5
Minor cleanup
c42f Jun 5, 2019
6e61c10
SExpressions: Parse various atoms, string macro unquote interpolation
c42f Jun 5, 2019
2139394
Very basic S-Expression deparse + some fixes
c42f Jun 5, 2019
098fecc
Try out S-Expressions as desugaring test reference
c42f Jun 5, 2019
c8cd625
Tweak S-Expression test infrastructure
c42f Jun 7, 2019
295a09a
A few small fixes
c42f Jun 12, 2019
62602dd
S-Expression util tweaks
c42f Jun 16, 2019
57afea5
Remove S-Expression alternative for now.
c42f Jun 16, 2019
cc6030a
Getindex lowering: additional special cases
c42f Jun 16, 2019
f31c479
List forms from expand-table + minor cleanups
c42f Jun 21, 2019
8010fd3
Rename internal Expr heads to use _ rather than -
c42f Jun 23, 2019
9f4c547
Hack: Change show() for exotic Expr heads to use @ Expr macro
c42f Jun 23, 2019
d1bfad9
Use macro @ Expr(...) to replace `$(Expr(...))`
c42f Jun 23, 2019
0cc233a
Fix @ Expr macro
c42f Jun 25, 2019
34a44b9
A few more tests for expand-let
c42f Jun 26, 2019
3533d15
Test set macro specifically for desugaring testsets
c42f Jun 26, 2019
29c9127
Finish testing lowering of `let`
c42f Jun 26, 2019
e3af5ff
Tests for macro lowering
c42f Jun 26, 2019
1cd0b00
Translate true and false in flisp ASTs to Julia
c42f Jun 27, 2019
8559e5a
fixup! Rename internal Expr heads to use _ rather than -
c42f Jun 27, 2019
08406ee
Clean up partially expanded forms in flisp rather than C
c42f Jun 27, 2019
218dc97
Fix lowering tests for neater lambda form variant
c42f Jun 27, 2019
f8e7311
A few more tests for function lowering
c42f Jun 27, 2019
bfaa529
Rearrange some tests by expr head
c42f Jun 28, 2019
ac5f10c
Begin implementing ref desugaring
c42f Jun 28, 2019
2e9a5ef
Bugfix: a.b is no longer effect free
c42f Jun 30, 2019
64139bb
Avoid traversing index list of refs twice
c42f Jun 30, 2019
7962228
Implement lowering of Expr(:ref)
c42f Jun 30, 2019
ba00a73
Remove ternary test - this is lowered by the parser.
c42f Jul 2, 2019
3f8f078
Implement a few more easy lowerings
c42f Jul 2, 2019
a83cae2
A few more function call tests
c42f Jul 2, 2019
dbde6b3
Desugaring of array concatenation
c42f Jul 2, 2019
ddc917b
Quote all code in lowering error messages with backticks
c42f Jul 2, 2019
6dbc694
Tests for `where` expansion
c42f Jul 2, 2019
1837861
Tests for do syntax
c42f Jul 7, 2019
dfe0c8d
More expansion; do, let + tidying
c42f Jul 7, 2019
c2a1b1a
Simplify flisp lowering of ||
c42f Jul 18, 2019
652e1c1
Expansion of && and ||
c42f Jul 14, 2019
19c88c7
Errors for braces notation
c42f Jul 19, 2019
4d8e456
Tests for desugaring of try
c42f Jul 19, 2019
3c08185
Lowering of try
c42f Jul 19, 2019
fafee6f
Arrange tests by input Expr head
c42f Jul 20, 2019
df61138
Move lowering test tools into their own file
c42f Jul 20, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions base/boot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ function (g::GeneratedFunctionStub)(@nospecialize args...)
return body
end
lam = Expr(:lambda, g.argnames,
Expr(Symbol("scope-block"),
Expr(:scope_block,
Expr(:block,
LineNumberNode(g.line, g.file),
Expr(:meta, :push_loc, g.file, Symbol("@generated body")),
Expand All @@ -535,7 +535,7 @@ function (g::GeneratedFunctionStub)(@nospecialize args...)
if g.spnames === nothing
return lam
else
return Expr(Symbol("with-static-parameters"), lam, g.spnames...)
return Expr(:with_static_parameters, lam, g.spnames...)
end
end

Expand Down
Loading