Commit Graph

116 Commits

Author SHA1 Message Date
pca006132
dbe7203225 Reserve space for function args
A lot of function calls are method calls, this can avoid later
reallocation when pushing self argument.
2021-02-17 13:37:25 +08:00
Noah
b191c68b9c Pass kwargs to __prepare__ 2021-02-15 21:39:43 -06:00
Noah
8cdef9e1fa Use ahash in the vm 2021-01-08 18:08:21 -06:00
Noah
be40a5d7b9 Fix clippy lints for Rust 1.49 2021-01-02 19:30:57 -06:00
Noah
98c3df2a94 Manage the stack a bit more efficiently 2020-12-14 14:32:31 -06:00
Noah
2bdbe6b804 Inline some hot functions 2020-12-05 16:36:37 -06:00
Noah
3ff3a2c0a1 Move function/mod.rs back to function.rs 2020-11-27 00:49:11 -06:00
carbotaniuman
e572371a46 Fix behavior of pow builtin 2020-11-17 12:52:27 -06:00
carbotaniuman
6498d7922d Fix clippy maybe? 2020-11-14 13:11:47 -06:00
carbotaniuman
3a45839e01 Supress clippy lint that doesn't work 2020-11-11 19:17:39 -06:00
carbotaniuman
1aa603ac6a Format 2020-11-11 16:40:42 -06:00
carbotaniuman
49b5d37905 Fix min test case by doing mroe validation 2020-11-11 16:27:02 -06:00
Noah
374a956d03 Misc changes; exception chaining, PyBytesLike::into_buffer 2020-11-06 11:11:07 -06:00
Rodrigo Oliveira
6de2dc6328 Add macro call to allow function up to seven parameters 2020-10-27 23:39:41 -03:00
Noah
cb9c9ec4cf Add some utility methods to function::Args and PyBaseException 2020-10-16 20:49:57 -05:00
Jeong YunWon
19ed4f85e7 clean up vm::builtins 2020-10-13 15:42:11 +09:00
Jeong YunWon
9e6dfca9e9 Fix build with new builtins path 2020-10-11 21:16:16 +09:00
Jeong YunWon
4da1b62c18 PyFuncArgs -> FuncArgs
which does not represent a single python object
2020-10-11 09:38:07 +09:00
Jeong YunWon
b0445396f4 compactize invoke args 2020-10-11 09:38:06 +09:00
Jeong YunWon
0d7738c708 PyFuncArgs from rust tuple 2020-10-11 09:35:15 +09:00
Jeong YunWon
597b7bd098 PyFuncArgs::{new, with_kwargs_names} 2020-10-11 09:35:15 +09:00
Jeong YunWon
4640be4c0d PyFuncArgs Kwargs defaults to IndexMap 2020-10-11 09:35:15 +09:00
Jeong YunWon
83f6dd7060 PyFuncArgs from Args 2020-10-11 09:35:15 +09:00
Jeong YunWon
a089c9b6d3 TypeProcotol::lease_class() -> TypeProtocol::class() 2020-10-11 09:11:58 +09:00
Jeong YunWon
75161a63de Merge pull request #2248 from youknowone/lease-class
lease_class as much as possible
2020-10-10 13:38:19 +09:00
Noah
acd0bf5434 Make the FromArgs derive less verbose 2020-10-01 17:42:07 -05:00
Jeong YunWon
fe5767a975 lease_class as much as possible 2020-09-30 11:41:06 +09:00
Jeong YunWon
59db19d1ea PyClass -> PyType 2020-09-26 07:32:38 +09:00
Jeong YunWon
f81ad04ce3 PyString -> PyStr 2020-09-26 00:20:02 +09:00
Noah
469036788f misc change 2020-09-19 00:20:51 -05:00
Jeong YunWon
0f7ed21eda remove vm.get_none and clean up its use cases 2020-09-19 10:20:20 +09:00
Noah
d3e89761d6 Remove the impl IntoPyNativeFunc for Fn(vm, args) to simplify the rules 2020-09-11 21:01:14 -05:00
Noah
29566742d0 Have there be less type parameters to pass to IntoPyNativeFunc 2020-09-11 20:32:13 -05:00
Youngchan Lee
89579d3064 Pass function refs to single_or_tuple_any 2020-09-05 12:51:55 +09:00
Noah
4e80bfd158 Merge pull request #2141 from RustPython/coolreader18/pynativefunc-rework
Just use normal Box for PyNativeFunc
2020-08-22 22:17:37 -05:00
Jeong YunWon
bd3d4cfdb2 earlier returning for error 2020-08-23 06:54:25 +09:00
Noah
7218d1d998 Make more dyn Fn()s threading-optional 2020-08-22 16:18:26 -05:00
Noah
4d8ffc70ad Just use normal Box for PyNativeFunc 2020-08-22 16:18:26 -05:00
Jeong YunWon
f45d2f03ef avoid to_pystr to generate type name 2020-08-14 02:34:36 +09:00
Jeong YunWon
a846338395 BorrowValue for PyTuple 2020-08-09 14:55:09 +09:00
Jeong YunWon
61455ce261 Separate IntoPyObject and IntoPyResult 2020-08-04 22:59:34 +09:00
Jeong YunWon
1a653562b8 flat_option -> flatten
by following std::option::Option
2020-07-29 02:05:48 +09:00
Bolun Thompson
8cccf13c80 Implemented kwargs on __init_subclass__ 2020-07-20 20:14:12 -07:00
Jeong YunWon
437a81996f Merge pull request #1970 from youknowone/sub-1962
non-subprocess stuff from #1962
2020-06-22 03:57:47 +09:00
Noah
d40533be5f Add os.wait[pid] and associated functions/constants 2020-06-21 20:53:45 +09:00
Jeong YunWon
82a596bd21 Fix clippy warning 2020-06-21 00:05:02 +09:00
Noah
97c51be6b8 Add _thread.start_new_thread 2020-05-23 16:03:08 -05:00
Noah
37912dfbe0 Add closefd arg to open 2020-05-03 18:03:22 -05:00
Aviv Palivoda
affac62bce Make PyNativeFunc Send + Sync 2020-04-28 20:36:24 +03:00
Jeong YunWon
0d2b817dd3 single_or_tuple_any uses TryFromObject instead of PyValue 2020-04-16 15:38:48 +09:00