Commit Graph

146 Commits

Author SHA1 Message Date
Jeong YunWon
1047cb573d Update result-like to 0.4 2021-10-23 02:49:59 +09:00
Noa
09e9ea91e7 TryFrom, TryInto, FromIterator are in prelude now 2021-10-21 17:04:19 -05:00
Jeong YunWon
b759808736 PyObj -> PyObject 2021-10-21 17:55:29 +09:00
Noa
8dd18d97be PyObjectRef -> &PyObj, &PyRef<T> -> &Py<T> 2021-10-21 16:49:01 +09:00
Jeong YunWon
e3bb8404c8 use tuple rather than vec for FuncArgs 2021-10-14 17:31:31 +09:00
Jeong YunWon
616dfc19e2 vm.new_tuple to convert rust tuple to python tuple 2021-10-11 01:06:07 +09:00
snowapril
1deb59ce40 modify PyType::name caller codes to use BorrowedValue
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-10 16:07:24 +09:00
Jeong YunWon
c83eb12d0a Merge pull request #3258 from youknowone/ascii-buffer
ArgAsciiBuffer
2021-10-09 16:27:47 +09:00
Jeong YunWon
4fb1cdb316 PyObjectWrap 2021-10-08 01:56:00 +09:00
Ben Lewis
48e5feb994 Add AsciiBytesLike to accept both an ascii string or a buffer. 2021-10-07 23:23:32 +09:00
Jeong YunWon
04e25e8d2d vm/function/{byteslike -> buffer}.rs
those types are buffer utilities
byteslike is one of them
2021-10-07 23:19:37 +09:00
jfh
c0420721e0 Rename from ArgTypeLike to ArgIntoType, numlike to number. 2021-10-07 15:30:57 +03:00
jfh
b2a2238566 Add ArgBoolLike. 2021-10-07 12:56:01 +03:00
jfh
856f77fb77 Add ArgFloatLike. 2021-10-07 12:34:30 +03:00
jfh
7387324f59 Add ArgComplexLike 2021-10-07 12:06:26 +03:00
Jeong YunWon
38b62e2585 PyObjectRef::try_into_value
as counterpart of TryFromObject::try_from_object

This is useful when the type to infer is known
2021-10-06 20:15:13 +09:00
Jeong YunWon
92de3619fa move IntoPy{Object, Exception, Result} to vm::function
which are used to define function arguments - those functions are mostly placed in the crate
2021-10-06 19:10:16 +09:00
Jeong YunWon
d1e9ac85d8 move funciton::PyIterator -> protocol::PyIterIter 2021-10-04 04:53:46 +09:00
Noa
65c1be7d99 More inline(always), switch test to opt-level 3 + thin lto 2021-09-30 18:33:52 -05:00
Jeong YunWon
d2692554e4 clean up imports 2021-09-30 01:26:41 +09:00
Jeong YunWon
c3f46c773e Expose exception types under vm::builtins 2021-09-30 01:12:45 +09:00
Jeong YunWon
495ba77ae5 move vm/src/{byteslike.rs -> function/byteslike.rs} 2021-09-29 02:28:43 +09:00
Jeong YunWon
d9c17f2787 vm::function::{Args -> PosArgs} 2021-09-24 00:26:00 +09:00
Jeong YunWon
ffef73c1d7 split Arg{Callble,Iterable} from pyobject.rs 2021-09-22 21:01:44 +09:00
Lee Dogeon
63b1696458 Derive name from tp_name 2021-09-09 00:07:36 +09:00
sobolevn
5f0cddee81 Fixes typos in vm/ 2021-08-21 17:09:48 +03:00
Noah
3d9812e748 Remove remaining borrow_value() uses 2021-05-20 10:30:42 -05:00
Noah
99104faaf7 Re-export pyobject::* from the root of the crate 2021-05-20 10:24:07 -05:00
Padraic Fanning
984ea440c3 Fix manual_map Clippy warning 2021-05-07 17:16:53 -04:00
Noah
79fa1b104f WIP getmethod 2021-03-14 14:38:00 -05:00
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