Commit Graph

62 Commits

Author SHA1 Message Date
Jeong Yunwon
84e2b52240 Deref for ArgIntoFloat 2022-04-29 10:47:59 +09:00
Jeong Yunwon
bb19b7c43a Move string intern to PyContext 2022-04-23 06:06:53 +09:00
Jeong Yunwon
5a606647c0 PyObjectView -> Py 2022-04-23 05:21:57 +09:00
Jeong Yunwon
66b6a06997 PyValue -> PyPayload 2022-04-23 05:20:31 +09:00
Jeong Yunwon
c4b80b3a24 IntoObject::into_object() and PyValue::into_pyobject(vm) 2022-04-19 00:38:18 +09:00
Jeong Yunwon
fee3bf2722 AsPyObject -> AsObject because fn as_object 2022-04-18 07:19:35 +09:00
Jeong Yunwon
e356d51af1 move ToPy* to convert 2022-04-18 07:17:24 +09:00
Jeong Yunwon
f6d70c8176 Into{PyObject,PyException,Pyresult} -> To{..}
The naming convention was wrong
2022-04-18 06:04:47 +09:00
Jeong Yunwon
75e589cbc1 isinstance -> fast_isinstance 2022-04-17 20:32:34 +09:00
Jeong Yunwon
29ba8956a9 Remove TypeProtocol::clone_class() 2022-04-17 20:10:24 +09:00
Jeong Yunwon
aa76a34963 merge TypeProtocol in AsPyObject 2022-04-17 19:26:10 +09:00
Jeong Yunwon
625f8675ae Introduce AsPyObject to replace IdProtocol 2022-04-17 10:32:01 +09:00
Jeong Yunwon
86a8831124 vm::funciton::arithmetic 2022-04-16 00:49:05 +09:00
Jeong Yunwon
6357a1acbe clean up imports and useless allow attributes 2022-04-15 23:58:20 +09:00
Kangzhi Shi
7b8c4091b5 fix hang on __index__ 2022-03-12 16:12:34 +09:00
Kangzhi Shi
6b17fa1d3d fix rebase 2022-03-12 16:12:12 +09:00
Kangzhi Shi
e3247dae7a refactor use SliceableSequence for array 2022-03-12 16:12:12 +09:00
Kangzhi Shi
01a8e01ec8 refactor BufferResizeGuard 2022-03-12 16:12:12 +09:00
Kangzhi Shi
4be3c4f598 refactor PySliceableSequence -> SlicableSequenceOp 2022-03-12 16:12:12 +09:00
Kangzhi Shi
b4907f0703 refactor sliceable incomplete sequence protocol for list 2022-03-12 16:12:12 +09:00
Kangzhi Shi
6a996b04c8 move obj downcast to AsMapping 2021-12-01 20:16:18 +02:00
Kangzhi Shi
ca4e8f50e8 refactor ItemProtocol -> Object Protocol 2021-11-27 13:00:37 +02:00
Steve Shi
908b239572 Refactor and new sequence traits, generic sequence operation (#3445)
* refactor sequence generic mutable sequence item equal op

* sequence generic for pydeque

* replace usize::MAX with Optioned

* sequence op for array

* fix overflow error instead memory error for  index overflow

* fixup

* optimize reserve vec for imul
2021-11-22 09:21:23 +02:00
Steve Shi
742ea0c4fa Reimpl Buffer Protocol and memoryview support ndarray with shape, stride and suboffset (#3340)
* Fix buffer protocol and memoryview

* Fix io and array the right way to use buffer protocol

* fix rebase

* fix memoryview and introduce VecBuffer

* fix deadlock

* fix memoryview avoid double release buffer

* impl ndim buffer support

* first implement nd array for buffer and memoryview

* fix slice adjust_indices

* fix adjust_indices introduct SaturatedSliceIterator

* fix memoryview cmp

* fix adjust_indices positive_order

* fix bug mark passed test

* fix clippy

* fix set_item_slice deadlock, optimize buffer

* Delete @test_113974_tmp

* Remove vec_buffer_type

* rusty names

* impl memoryview multi index

* add comments

Co-authored-by: Jeong YunWon <jeong@youknowone.org>
2021-11-13 07:17:11 +02:00
Noa
358ce09b5c Run cargo upgrade 2021-10-30 19:42:35 -05:00
Noa
09e9ea91e7 TryFrom, TryInto, FromIterator are in prelude now 2021-10-21 17:04:19 -05:00
Jeong YunWon
f76877347a Py -> PyObjectView 2021-10-21 18:04:13 +09:00
Jeong YunWon
b759808736 PyObj -> PyObject 2021-10-21 17:55:29 +09:00
Jeong YunWon
d4feb2a6c5 incref -> to_owned 2021-10-21 17:29:34 +09:00
Noa
8dd18d97be PyObjectRef -> &PyObj, &PyRef<T> -> &Py<T> 2021-10-21 16:49:01 +09:00
Noa
27540e1d35 Add unparse feature to ast 2021-10-17 21:55:27 -05:00
jfh
7bc10da154 Relocate vm.get_attribute to obj.get_attr. 2021-10-17 10:30:21 +03:00
Jeong YunWon
22b3679529 as_mapping never fails 2021-10-15 05:45:54 +09:00
Jeong YunWon
8cdde9150e Rename slot traits to drop Slot prefix 2021-10-14 13:44:22 +09:00
Jeong YunWon
7cae6d24fe Refactor PyType creation 2021-10-14 13:37:45 +09:00
jfh
0539d33ce4 Export saturated index via slicable, use better naming conventions. 2021-10-13 07:05:26 +03:00
jfh
72ad7120ab Saturate slice before getting a lock on the underlying collection. 2021-10-12 10:00:50 +03:00
jfh
fac6e3168c Use SaturatedIndices instead of convert_slice. 2021-10-12 09:18:12 +03:00
Jeong YunWon
05dca7a7c8 ctx.new_list returns PyLsitRef 2021-10-12 01:22:36 +09:00
Jeong YunWon
a42d547a3f new_{utf8_str, ascii_literal} -> new_str again 2021-10-11 21:28:14 +09:00
jfh
a7bd654d0d Use PyTupleRef in reduce return type. 2021-10-11 09:56:00 +03:00
Kangzhi Shi
ea69dc53d2 remove test that fail on CPython 2021-10-10 14:48:30 +02:00
Kangzhi Shi
cbd7c59329 Fix unicode array pickling 2021-10-10 14:43:34 +02:00
Kangzhi Shi
de47cd0acb Impl __reduce_ex__ with _array_reconstructor 2021-10-10 14:43:20 +02:00
Kangzhi Shi
ff0adc1204 Impl __reduce__ for array 2021-10-10 14:43:16 +02: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
4fb1cdb316 PyObjectWrap 2021-10-08 01:56:00 +09:00
jfh
c0420721e0 Rename from ArgTypeLike to ArgIntoType, numlike to number. 2021-10-07 15:30:57 +03:00
jfh
856f77fb77 Add ArgFloatLike. 2021-10-07 12:34:30 +03:00
Jeong YunWon
f9fbc486d8 Merge pull request #3136 from youknowone/buffer-writable
ResizeGuard -> BufferResizeGuard
2021-10-06 22:25:01 +09:00