Commit Graph

172 Commits

Author SHA1 Message Date
Noah
d8a73ead42 Make it unnecessary to import PyClassImpl for #[pymodule] 2020-09-30 11:33:22 -05:00
Jeong YunWon
59db19d1ea PyClass -> PyType 2020-09-26 07:32:38 +09:00
Jeong YunWon
39856bc500 PyTuple::_new to hide it from public api 2020-09-26 03:08:22 +09:00
Jeong YunWon
07f898e4f0 tuple internal to Box<[PyObjectRef]>
it will use 16bytes instead of 24bytes
2020-09-26 03:02:47 +09:00
Jeong YunWon
5c81e7b044 Reuse empty tuple singleton 2020-09-26 02:59:33 +09:00
Jeong YunWon
1f309322d7 Allow #[pyimpl(with(PyRef))] 2020-09-25 02:46:07 +09:00
Jeong YunWon
f29c158748 pyattr for pyclass 2020-09-25 02:27:54 +09:00
Jeong YunWon
874b5e5568 iter_use_idents for ident traversal 2020-09-25 02:12:12 +09:00
Jeong YunWon
c76126f951 tp_cmp optimization 2020-09-24 07:50:11 +09:00
Jeong YunWon
991b968294 tp_call prevent clone 2020-09-24 07:50:11 +09:00
Jeong YunWon
09ebd19857 optimize tp_hash 2020-09-24 01:55:05 +09:00
Jeong YunWon
5e69141884 slot call use trait function as its signature 2020-09-24 01:50:43 +09:00
Jeong YunWon
6f230ff7d7 optimize descr_get 2020-09-24 01:42:28 +09:00
Jeong YunWon
d59f9c3c4e tp_call optimization 2020-09-24 01:40:53 +09:00
Noah
6c3e4819ed Rework native function creation a bit 2020-09-20 22:36:35 -05:00
Jeong YunWon
52e19c2331 pyattr allows use group 2020-09-19 07:47:57 +09:00
Jeong YunWon
58e6a4702d ItemMeta::from_attr 2020-09-19 07:33:54 +09:00
Ben Lewis
c54b4bb833 Split py_compile_bytecode into py_compile and py_freeze. 2020-09-18 18:59:58 +12:00
Noah
3e6bd59275 Apply review suggestions and clean up a bit 2020-09-04 00:22:32 -05:00
Noah
f65f379df5 Revert pub field for ClassItemMeta 2020-08-30 17:14:11 -05:00
Noah
43b7a7bdbe Make into_struct_sequence not clone fields 2020-08-30 15:46:05 -05:00
Noah
5bc5da8da1 Move the PyStructSequence impl to a separate mod 2020-08-30 15:46:05 -05:00
Noah
2d49dcd66e Make PyClassDef::BASE a function 2020-08-30 15:46:05 -05:00
Noah
619f1a1de9 Make PyStructSequence a derive macro 2020-08-30 15:46:04 -05:00
Noah
79c0efc491 Make class.slots completely immutable 2020-08-30 15:46:04 -05:00
Jeong YunWon
f8a5cc4b23 Remove type clone functions from vm.ctx
which misleads to clone types when we don't need.
2020-08-23 20:26:37 +09:00
Jeong YunWon
fd3aba5033 doc using syn-ext 2020-08-23 19:39:28 +09:00
Jeong YunWon
0b59f20d96 pystruct_sequence uses make_class_with_base 2020-08-23 19:10:46 +09:00
Jeong YunWon
df5948e2db fixup pyclass 2020-08-23 19:10:46 +09:00
Jeong YunWon
5edaf12d2a pyclass_ident_and_attrs 2020-08-23 18:37:43 +09:00
Jeong YunWon
29dc4dabbb multiple error tracking 2020-08-23 18:30:14 +09:00
Jeong YunWon
2458307dc3 rewrite pyclass 2020-08-23 18:30:14 +09:00
Jeong YunWon
e4fa05ae70 attrs replacement technique 2020-08-23 18:24:46 +09:00
Jeong YunWon
8d46a96068 use meta item rather than parent name 2020-08-23 18:24:46 +09:00
Jeong YunWon
9d025b0e4e #[pyclass] now requires module field 2020-08-23 18:24:46 +09:00
Jeong YunWon
5e9df32b18 #[pyclass] must contains name 2020-08-23 18:24:46 +09:00
Jeong YunWon
d422de6f00 Rework derive and rewrite pymodule.rs 2020-08-23 18:24:46 +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
Noah
4d8ffc70ad Just use normal Box for PyNativeFunc 2020-08-22 16:18:26 -05:00
Jeong YunWon
7f658b57a4 PyClassDef MODULE_NAME 2020-08-23 06:10:47 +09:00
Jeong YunWon
2c1eff49d6 PyClass::extend_class cannot be called with bare py_clas! 2020-08-21 09:49:03 +09:00
Jeong YunWon
f35cae0d3e object init path checker 2020-08-21 09:47:02 +09:00
Jeong YunWon
23c2c58140 Move out read-only flags of slots. 2020-08-21 09:47:02 +09:00
Jeong YunWon
1ed00a4866 Allow use for #[pyattr] 2020-08-15 18:56:06 +09:00
Jeong YunWon
82b2a4d63d tp_name for pyclass/pystruct_sequence 2020-08-11 06:16:59 +09:00
Jeong YunWon
3b1bdc5c68 force pystruct_sequence to have only single module while pymodule overwrite module only when it doesn't exist 2020-08-11 06:16:37 +09:00
Jeong YunWon
f164b757d4 inject module name into class 2020-08-11 05:54:24 +09:00
Jeong YunWon
dbafdb18b9 dynamic repr for pystruct_seqeunce 2020-08-11 05:54:23 +09:00
Jeong YunWon
ad1da1d0d8 Remove derive::util::strip_prefix 2020-08-11 02:28:46 +09:00
Jeong YunWon
8baf999403 pyattr has priority to pyclass 2020-08-11 01:06:38 +09:00