Commit Graph

89 Commits

Author SHA1 Message Date
Tony Jinwoo Ahn
34f5a8793a Replace write! with writeln!
Instead of calling write! with an explicit newline character at the end,
prefer its alternative, writeln!.

Signed-off-by: Tony Jinwoo Ahn <tony.jinwoo.ahn@gmail.com>
2021-10-02 15:23:11 +09:00
Padraic Fanning
0ea56025ec Replace master with main
Fixes #3067
2021-09-15 17:54:54 -04:00
Nikita Sobolev
ba74a9a239 Fixes typos in all other files 2021-08-22 12:42:13 +09:00
Noah
8d5588df67 Merge pull request #2532 from Pluriscient/documentation/common-start
Documentation of VM & Bytecode
2021-04-18 15:12:29 -05:00
Pluriscient
b2c02838db Remove todos from vm 2021-04-15 14:54:36 +02:00
Noah
4129f0c5c0 Fix async for compilation 2021-04-11 17:38:44 -05:00
Eric van der Toorn
0bba55b3bf format bytecode file 2021-03-29 15:18:59 +02:00
Eric van der Toorn
99740d1e85 add documentation to most public parts of bytecode, along with examples 2021-03-27 14:46:31 +01:00
Noah
54ab9cb54a Add LoadMethod and CallMethod* opcodes 2021-03-15 09:45:07 -05:00
Noah
322aba324f Impl Eq+Hash for ConstantData, make CodeInfo.constants an IndexSet 2021-03-11 09:58:25 -06:00
Noah
86f907ec0d Fix SetupAsyncWith stack level handling 2021-02-20 21:04:30 -06:00
Padraic Fanning
0d7570391e Run rustfmt 2021-02-12 16:23:06 -05:00
Noah
58503cb0fa Serialize entire frozen hashmap to bytes 2021-01-29 00:46:51 -06:00
Jeong YunWon
0b58527c6a Merge pull request #2373 from RustPython/coolreader18/blockir
Have a block-based IR for compiling, calculate max stack size
2021-01-08 13:16:31 +09:00
Noah
be40a5d7b9 Fix clippy lints for Rust 1.49 2021-01-02 19:30:57 -06:00
Noah
559123c617 Don't push something on the stack when starting a generator 2020-12-23 17:40:33 -06:00
Noah
8f536b986d Use boxvec for frame.stack 2020-12-21 18:48:56 -06:00
Noah
32a1dd60be Have a block-based IR for compiling, calculate max stack size 2020-12-21 18:47:58 -06:00
Noah
2246f8b6f0 marshal can give better error messages on eof 2020-12-19 15:00:47 -06:00
Noah
3627e4ace1 Move bytecode.rs to lib.rs 2020-12-19 14:59:06 -06:00
Noah
f1807c7675 Remove bytecode lib.rs 2020-12-19 14:59:06 -06:00
Noah
a7363110ae Update lz4_flex version 2020-12-19 14:59:06 -06:00
Noah
5a56dd1a77 repr() functions with their names 2020-12-17 16:29:44 -06:00
Noah
1be79c93b0 Make Instruction only 8 bytes 2020-12-14 15:55:47 -06:00
Noah
e87144e2c5 Add flags to the MakeFunction instruction 2020-12-14 14:35:17 -06:00
Noah
9c895c268a Add label_arg{,_mut} methods 2020-12-14 14:25:20 -06:00
Noah
60b2884afa Use lz4_flex instead of lz-fear 2020-12-14 14:25:19 -06:00
Noah
f93934f0c6 Make Continue have the target it's continuing to 2020-12-14 14:25:19 -06:00
Noah
3280a1655a Optimize the size of Instruction 2020-12-14 14:25:19 -06:00
Noah
22e76f1a67 Use a boxed slice for codeobject fields 2020-12-05 16:36:37 -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
085a9d4f5e Don't use a wildcard to prevent future mistakes 2020-11-24 11:57:14 -06:00
Noah
8b0e806e39 Fix rustpython-jit to not use label_map 2020-11-23 20:10:46 -06:00
Noah
6082049cab Remove the need for a label_map in CodeObject 2020-11-23 14:41:56 -06:00
Noah
30b5fb22ef Use lz-fear to get streaming decompression for bytecode 2020-11-17 09:49:31 -06:00
Noah
2f232ecbe3 Implement string interning for variable names 2020-11-09 15:51:57 -06:00
Noah
b7a73fdc0c Capitalize boolean constants for dis 2020-10-30 14:05:53 -05:00
Noah
b8ebd445f4 Clean up remove map_basic 2020-10-19 23:55:56 -05:00
Noah
df28c022e1 Use disassembly for snapshot testing 2020-10-19 23:55:56 -05:00
Noah
a665edc421 Fix clippy lints 2020-10-19 23:55:55 -05:00
Noah
543c2a2256 Change CodeObject to be generic over the constant representation 2020-10-19 23:55:55 -05:00
Jeong YunWon
562bd6364b Merge pull request #2271 from RustPython/frozen-serde
Add derive(Serialize, Deserialize) to FrozenModule
2020-10-10 14:06:09 +09:00
Noah
656eb60aad Add derive(Serialize, Deserialize) to FrozenModule 2020-10-09 22:24:32 -05:00
Noah
93501935d0 Fix co.co_varnames to include vararg names 2020-10-07 19:28:18 -05:00
Noah
e5186004d4 Some more getattr related tweaks/optimizations 2020-09-25 19:48:09 -05:00
Jeong YunWon
9e78ec9ef9 Fix dis.dis to prints inner constant codes like CPython 2020-09-21 06:09:55 +09:00
Noah
fcad7e0091 Use lz4-compression instead of lz4-compress 2020-07-26 15:21:39 -05:00
lynskylate
a310f3c245 Add annotation setup 2020-07-08 01:06:12 +08: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