Commit graph

111 commits

Author SHA1 Message Date
Noah
410bd76f38 Fast locals part 1 2020-12-05 16:36:00 -06:00
Noah
df41efed8a Don't use a wildcard to prevent future mistakes 2020-11-24 11:57:14 -06:00
Noah
38c4c14ee3 Remove the need for a label_map in CodeObject 2020-11-23 14:41:56 -06:00
Noah
e37a55e74c Implement string interning for variable names 2020-11-09 15:51:57 -06:00
Noah
e9095a741d Split the ast from the parser, remove compiler dep on parser 2020-11-07 15:43:23 -06:00
Noah
4afbc082ed Use disassembly for snapshot testing 2020-10-19 23:55:56 -05:00
Noah
3f9dd3dd4c Remove optimization unit test 2020-10-19 23:55:56 -05:00
Noah
868fdfcc36 Fix clippy lints 2020-10-19 23:55:55 -05:00
Noah
ebee651a12 Update compiler to output codeobj.constants, use insta for snapshot testing 2020-10-19 23:55:55 -05:00
Tom Schuster
6d0978226e Basic block support in JIT 2020-10-17 17:42:02 +02:00
Noah
16a896d513 Fix accessing __doc__ while inside a class definition 2020-10-07 19:28:19 -05:00
Jeong YunWon
09b8414162 Fix nightly clippy 2020-10-01 07:08:55 +09:00
Jeong YunWon
6c96793f05 Fix dis.dis to prints inner constant codes like CPython 2020-09-21 06:09:55 +09:00
Noah
a251109090 Fix some minor things required for unittest 2020-08-20 04:18:21 +09:00
Jeong YunWon
f9fe1c0423 Revert "Merge pull request #2106 from RustPython/coolreader18/unittest-tests"
This reverts commit 96926daf6ffa2a8dbb374b3c6169b378bd0d67ef, reversing
changes made to 230f91582f98ff74abeb8759718e49c386e2b398.
2020-08-20 04:18:21 +09:00
Noah
7f0798b235 Fix some minor things required for unittest 2020-08-12 16:03:20 -05:00
lynskylate
f6eb1168bc Fix scope error 2020-08-08 01:53:13 +08:00
lynskylate
5ca3fc79f4 Try to use loadname local replace loadname free 2020-07-18 04:02:42 +08:00
Yiqun Ling
f6e25fc0cb Set annotation for function args 2020-07-14 18:58:58 +09:00
Jeong YunWon
1125a529e7 CompilerError always contains source_path 2020-07-14 13:48:39 +09:00
lynskylate
fae42a0533 Add annotation setup 2020-07-08 01:06:12 +08:00
lynskylate
e1999cb698 Remove needless return 2020-07-07 06:11:02 +08:00
lynskylate
a3b7a83741 Add annotation setup 2020-07-07 06:00:50 +08:00
Noah
f7216a144a Fix Rust 1.44 clippy warnings 2020-06-06 15:37:47 -05:00
Noah
6708cef2a4 Fix compilation on redox 2020-06-02 15:21:33 -05:00
TheAnyKey
097b6a1889 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
1257331101 Fix unpack_ex related messages 2020-05-30 01:07:38 +00:00
Jeong YunWon
0d139f9942 comprehension starred expression compatibility 2020-05-30 01:07:38 +00:00
Jeong YunWon
a77e0b8587 Distinguish MultipleStarArgs and InvalidStarArgs compile errors 2020-05-30 01:07:38 +00:00
Noah
1e12aa8afe Merge pull request #1834 from RustPython/coolreader18/jsontests
Add json output for CPython tests
2020-04-04 11:52:04 -05:00
Noah
8df7d73211 Fix clippy lints 2020-04-03 12:34:01 -05:00
Noah
9ac8969e0d Remove incognito from vm 2020-04-03 12:34:00 -05:00
Noah
ed09df8223 Make incognito a CodeFlag bit 2020-04-03 12:34:00 -05:00
Noah
a499fb775a Make from __future__ imports a syntactic construct in the compiler 2020-04-03 12:34:00 -05:00
Noah
330fdce246 Add "incognito" compilation 2020-04-03 12:34:00 -05:00
Noah
61dc0181e0 Move varargs information into CodeFlags 2020-04-02 09:02:18 -05:00
Noah
170719180a Apply review comments 2020-03-21 00:37:13 -05:00
Noah
7d6d5ff907 Fix syntax error tests 2020-03-21 00:35:36 -05:00
coolreader18
d5b9e6b93a Partially implement async generators 2020-03-21 00:33:46 -05:00
Noah
e9ff68c850 Improve compiler error creation 2020-03-13 23:26:07 -05:00
Noah
04606e9057 Make Location Copy and remove all location.clone()s 2020-03-13 21:49:10 -05:00
Jeong YunWon
867152880a positional only parameter support 2020-03-08 00:13:13 +09:00
Jeong YunWon
04c29f384e &str::to_string -> &str::to_owned for variables 2020-02-05 22:55:34 +09:00
Jeong YunWon
7860fc877d &str::to_string -> &str::to_owned for literals 2020-02-05 22:55:33 +09:00
Aviv Palivoda
de7f9efd54 Support expression in f-strings spec 2019-12-27 10:19:07 +02:00
Jeong YunWon
8adb8b5105 Fix clippy warnings 2019-12-21 18:49:48 +09:00
Jeong YunWon
23993c2833 implement SyntaxError attributes 2019-12-16 00:08:16 +09:00
yanganto
28fbdffdc8 Provide caret diagnostics for SyntaxError
visualize syntax error with caret diagnostics in shell, eval, exec,
when the error statement and error location are provided.
2019-11-22 09:17:50 +08:00
Noah
a51a3e0e4b Add a CompileContext 2019-11-07 00:04:51 -06:00
coolreader18
c39e0baab7 Add async for 2019-11-07 00:04:51 -06:00