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

Add non-local scoping #138

Open
wants to merge 45 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
9709d9e
codegen: add scoping logic
BobVarioa Jul 26, 2024
4dbc250
codegen: remove todo
BobVarioa Jul 26, 2024
e3343ad
Merge branch 'main' of https://github.com/CanadaHonk/porffor into scopes
BobVarioa Jul 26, 2024
a99beb2
codegen: initalized -> initialized
BobVarioa Jul 26, 2024
175bdc8
Merge branch 'main' of https://github.com/CanadaHonk/porffor into scopes
BobVarioa Jul 26, 2024
76105bd
codegen: fix non-identifier binop side effects
BobVarioa Jul 27, 2024
96aeb5d
codegen: fix ifIdentifierErrors
BobVarioa Jul 27, 2024
abffaf0
codegen: fix `objectHack`ed type checks
BobVarioa Jul 27, 2024
7929a5b
codegen: fix various missing return errors in main
BobVarioa Jul 27, 2024
08ff8f9
codegen: add scoping to more places
BobVarioa Jul 28, 2024
0fb88ad
codegen: add initialization logic to non local variables
BobVarioa Jul 28, 2024
52e4126
codegen: fix initalization logic for function arguments
BobVarioa Jul 28, 2024
cb10831
codegen: fix some destructuring bugs
BobVarioa Jul 28, 2024
5b4f855
codegen: fix var and blockstatement interactions
BobVarioa Jul 28, 2024
9fcae7d
codegen: fix function arguments and blockstatements
BobVarioa Jul 28, 2024
21a3554
codegen: fix ifIdentifierErrors in delete
BobVarioa Jul 28, 2024
e0b9c79
codegen: revert fix some destructuring bugs
BobVarioa Jul 28, 2024
cc33542
codegen: add nested scopes to more places + minor changes to bare dec…
BobVarioa Jul 28, 2024
e65c2e7
codegen: revert function declaration lifting
BobVarioa Jul 28, 2024
9ce841c
codegen: misc bare declaration fixes
BobVarioa Jul 28, 2024
08e89c9
codegen: fix setVar typo
BobVarioa Jul 28, 2024
9fdee90
Merge branch 'main' of https://github.com/CanadaHonk/porffor into scopes
BobVarioa Jul 28, 2024
5e1a056
codegen: properly scope eval when in parameter lists
BobVarioa Jul 29, 2024
2e24918
codegen: properly handle variables assigned to and declared as functions
BobVarioa Jul 29, 2024
5b00faa
codegen: add scope support to if statements
BobVarioa Jul 29, 2024
f8cc8a9
codegen: handle var declaration nops better
BobVarioa Jul 29, 2024
a173b2f
codegen: small destructure fix
BobVarioa Jul 29, 2024
025ac6a
codegen: handle nested scopes in a much more performant way
BobVarioa Jul 29, 2024
b344659
codegen: add index to createVar
BobVarioa Jul 29, 2024
2dc1377
Merge branch 'main' of https://github.com/CanadaHonk/porffor into scopes
BobVarioa Jul 30, 2024
9cdd0e3
codegen: don't allow redeclaring builtin vars with functions
BobVarioa Jul 30, 2024
db5b734
codegen: switch variables to a map
BobVarioa Jul 30, 2024
3a32837
codegen: fix test262 harness hacks
BobVarioa Jul 30, 2024
d2b7e7e
meta: update readme to reflect var changes
BobVarioa Jul 30, 2024
e0c54ed
Merge branch 'main' of https://github.com/CanadaHonk/porffor into scopes
BobVarioa Jul 30, 2024
04e8c25
codegen: lift vars out of block scopes
BobVarioa Jul 30, 2024
5c199cf
codegen: eagerly throw reference errors
BobVarioa Jul 30, 2024
9cab97e
codegen: variable tweaks for precompile
BobVarioa Jul 30, 2024
e060ce2
codegen: remove debug code
BobVarioa Aug 1, 2024
43a49ec
codegen: eagerly lift functions
BobVarioa Aug 2, 2024
3921843
Merge branch 'main' of https://github.com/CanadaHonk/porffor into scopes
BobVarioa Aug 12, 2024
725de03
codegen: fix merge issue
BobVarioa Aug 12, 2024
a8d10a6
codegen: update minor precompile bugs
BobVarioa Aug 12, 2024
facf3c1
Merge branch 'main' of https://github.com/CanadaHonk/porffor into scopes
BobVarioa Aug 13, 2024
ae3185d
codegen: fix more merge issues
BobVarioa Aug 13, 2024
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ These include some early (stage 1/0) and/or dead (last commit years ago) proposa
- Constructors (`new Foo`)
- Classes (`class A {}`)
- Await (`await promise`)
- Non-local variables (`let foo = 0; function bar() { return foo; }`)

### Built-ins

Expand Down
Loading