Commit Graph

175 Commits

Author SHA1 Message Date
Noah
7c58f4a0c8 Fast locals part 3 2020-12-05 16:36:35 -06:00
Noah
92b8e59158 Fast locals part 2 2020-12-05 16:36:00 -06:00
Noah
97029af713 Fast locals part 1 2020-12-05 16:36:00 -06:00
Noah
479610f3cb Move compiler snapshots 2020-12-05 16:36:00 -06:00
Noah
085a9d4f5e Don't use a wildcard to prevent future mistakes 2020-11-24 11:57:14 -06:00
Noah
6082049cab Remove the need for a label_map in CodeObject 2020-11-23 14:41:56 -06:00
Noah
2f232ecbe3 Implement string interning for variable names 2020-11-09 15:51:57 -06:00
Noah
b3851c8eb8 Split the ast from the parser, remove compiler dep on parser 2020-11-07 15:43:23 -06:00
Noah
b7a73fdc0c Capitalize boolean constants for dis 2020-10-30 14:05:53 -05:00
Noah
df28c022e1 Use disassembly for snapshot testing 2020-10-19 23:55:56 -05:00
Noah
0b36b14a00 Remove optimization unit test 2020-10-19 23:55:56 -05:00
Noah
a665edc421 Fix clippy lints 2020-10-19 23:55:55 -05:00
Noah
4c8fdc49c7 Update compiler to output codeobj.constants, use insta for snapshot testing 2020-10-19 23:55:55 -05:00
Tom Schuster
023bf6c3ba Basic block support in JIT 2020-10-17 17:42:02 +02:00
Noah
eb584816f9 Fix __class__ nonlocal resolution 2020-10-07 19:33:11 -05:00
Noah
3feb26a7ab Fix accessing __doc__ while inside a class definition 2020-10-07 19:28:19 -05:00
Jeong YunWon
3cd0a1118d Fix nightly clippy 2020-10-01 07:08:55 +09:00
Jeong YunWon
9e78ec9ef9 Fix dis.dis to prints inner constant codes like CPython 2020-09-21 06:09:55 +09:00
minoring
e24a723ee1 Refactor checks for symbol in register_name 2020-09-06 11:40:32 +09:00
minoring
dadf430c75 Modify nonlocal to be declared multiple times
Related to #2183
2020-09-05 22:42:52 +09:00
minoring
4a0ee1d253 Fix nonlocal checks
Related to #2189
2020-09-05 22:41:24 +09:00
Noah
1385c06e25 Fix some minor things required for unittest 2020-08-12 16:03:20 -05:00
Yiqun Ling
230f91582f Add nested and optimized for symtable 2020-08-13 04:12:28 +09:00
lynskylate
36e7e9cded Fix load context 2020-08-08 13:08:13 +08:00
lynskylate
edc727f44f Fix scope error 2020-08-08 01:53:13 +08:00
lynskylate
fd11b64cee Merge remote-tracking branch 'origin/master' into try-to-use-local 2020-08-07 01:18:56 +08:00
lynskylate
7e69e5ef2c Fix scope change 2020-08-02 03:43:19 +08:00
lynskylate
0d83cab37a Optimize code 2020-08-01 02:05:44 +08:00
Yiqun Ling
12df480cc9 Apply suggestions from code review
Co-authored-by: Jeong YunWon <youknowone@users.noreply.github.com>
2020-08-01 01:29:11 +08:00
lynskylate
8a6ac64f03 Introduce symtable test and add is_annotation for symbol 2020-07-31 02:11:00 +08:00
lynskylate
1f0928d8b9 Try to use loadname local replace loadname free 2020-07-18 04:02:42 +08:00
Yiqun Ling
6b361bb409 Set annotation for function args 2020-07-14 18:58:58 +09:00
Jeong YunWon
1c0925b4d9 CompilerError always contains source_path 2020-07-14 13:48:39 +09:00
lynskylate
a310f3c245 Add annotation setup 2020-07-08 01:06:12 +08:00
lynskylate
3945c31f4f Remove needless return 2020-07-07 06:11:02 +08:00
lynskylate
c609a6d33c Add annotation setup 2020-07-07 06:00:50 +08:00
TheAnyKey
d17fcc4514 Merge branch 'master' into TheAnyKey/p38_named_expression_completion_step2 2020-06-22 00:34:00 +02:00
TheAnyKey
d96b97a039 fixed scoping issue, commented test with references to original version 2020-06-21 22:18:43 +00:00
TheAnyKey
2a172a6fa1 commented and cleaned up 2020-06-14 12:06:39 +00:00
TheAnyKey
ddd8151792 completion of error handling for named expressions and scope handling improvements 2020-06-13 21:16:51 +00:00
Noah
f284b4ca95 Merge pull request #1951 from TheAnyKey/TheAnyKey/p38_named_expression_completion
Fix scope issue for non-locals
2020-06-10 16:36:12 -05:00
Noah
74f261a22c Fix Rust 1.44 clippy warnings 2020-06-06 15:37:47 -05:00
Noah
2576321c2e Fix compilation on redox 2020-06-02 15:21:33 -05:00
TheAnyKey
1773d2bc14 fixed scoping issue for nonlocals - now also indirect outer scopes are supported 2020-06-01 22:47:28 +00:00
TheAnyKey
fd2e0aa41e Implement Py38 named expression (PEP 572) (#1934)
* Initial implementation of named expression and  import  according CPython tests

* added new instruction with inversed evaluation order for dict comprehension, in other cases use regular evaluation order

* added further aspects to implementation, cleaned up, imported test from CPython

* implemented first parts of scoping enhancement and extended checks

* completion of name resolution ongoing, now more test passing, still warinings and cleanup required

* further optimization of name resolution in nested scopes

* Initialize the vm with imports from _io instead of io

* Add the OpenBSD support that I am smart enough to

* adapted grammer to full support, most test are passing now, esp. all invalids are passed. Cleaned up in symboltable

* more conditional compiling, this time for errors

* rustfmt was not pleased

* premature push, whoops

* Add expected_failure result type to jsontests

* Initial implementation of named expression and  import  according CPython tests

* added new instruction with inversed evaluation order for dict comprehension, in other cases use regular evaluation order

* added further aspects to implementation, cleaned up, imported test from CPython

* implemented first parts of scoping enhancement and extended checks

* completion of name resolution ongoing, now more test passing, still warinings and cleanup required

* further optimization of name resolution in nested scopes

* adapted grammer to full support, most test are passing now, esp. all invalids are passed. Cleaned up in symboltable

* Fixed nameing convention violation and removed unnecessary information from symbol resolution. Added some more comments.

* Fixed nameing convention violation and removed unnecessary information from symbol resolution. Added some more comments.

Co-authored-by: Noah <33094578+coolreader18@users.noreply.github.com>
Co-authored-by: Reuben Staley <lighthousemaniac@gmail.com>
2020-06-01 11:22:15 +02:00
Jeong YunWon
9338dcdf45 Fix unpack_ex related messages 2020-05-30 01:07:38 +00:00
Jeong YunWon
7bce7baf4a Fix SyntaxError visualize order: message first location later 2020-05-30 01:07:38 +00:00
Jeong YunWon
e4be376336 comprehension starred expression compatibility 2020-05-30 01:07:38 +00:00
Jeong YunWon
09d849ab0a Distinguish MultipleStarArgs and InvalidStarArgs compile errors 2020-05-30 01:07:38 +00:00
Jeong YunWon
9b3fa53f88 Merge pull request #1843 from RustPython/coolreader18/clippy-fixes
Fix some clippy lints that were previously 'allow'ed
2020-04-27 00:10:01 +09:00