Commit Graph

59 Commits

Author SHA1 Message Date
Jeong YunWon
6ddb690e09 Remove _vm parameter when it is not required 2020-02-06 11:07:51 +09:00
Jeong YunWon
c0b235ed66 cleanup property and get descriptor codes 2020-02-06 03:56:40 +09:00
Jeong YunWon
7d0d313aa5 &str::to_string -> &str::to_owned for variables 2020-02-05 22:55:34 +09:00
Jeong YunWon
1bac582921 &str::to_string -> &str::to_owned for literals 2020-02-05 22:55:33 +09:00
Jeong YunWon
d31d0c6510 Merge pull request #1685 from youknowone/slot-name
pyslot guess slot name from function name
2020-01-15 11:51:16 +09:00
Jeong YunWon
8c7e01b4f6 pyslot guess slot name from function name 2020-01-15 10:28:39 +09:00
Jeong YunWon
cdc39701d8 Add PyBuiltinDescriptor for descriptors 2020-01-14 15:37:15 +09:00
Jeong YunWon
c1306726c4 Fix clippy warnings 2019-12-21 18:49:48 +09:00
coolreader18
0297189af4 Fix super w/ attributes 2019-10-28 10:55:32 -05:00
Jeong YunWon
6c0f852b62 Refactor pymethod return types to be smaller as possible 2019-10-11 03:27:23 +09:00
Noah
d22cac2dd8 Rename new slots to tp_new 2019-09-29 23:14:37 -05:00
coolreader18
c46b5b50bd Fix weirdness with type.__new__()/type()/metaclass.__new__() 2019-09-29 23:14:31 -05:00
Aviv Palivoda
b9132e3893 Convert objsuper to new arg style 2019-08-31 22:46:13 +03:00
lynskylate
a0ee8114f0 Add __repr__ __str__ for super 2019-08-17 01:17:25 +08:00
Windel Bouwman
d06dec77ea Attempt to reduce the size of the pyobject.rs files by splitting out builtin types. 2019-08-14 19:08:47 +02:00
Windel Bouwman
42dca4433a Implement do_eq for String impl of DictKey. Also move get_item_option to dict type. 2019-07-28 21:39:21 +02:00
Windel Bouwman
f994b0580f Move get_item_option back into ItemProtocol 2019-07-23 23:31:09 +02:00
Windel Bouwman
e138a7303d Move get_item_option to PyDictRef struct. 2019-07-23 21:27:37 +02:00
Windel Bouwman
f7320cf545 Move Scope struct to its own file, making the frame module private in the process. 2019-07-23 20:39:47 +02:00
ben
1f8181b561 Update formatting to be consistent with rustfmt included in 1.34 2019-04-14 09:40:59 +12:00
Adam Kelly
7b2d92f495 Delete DictProtocol. impl ItemProtocol for PyDictRef. 2019-04-06 10:15:29 +01:00
Adam Kelly
c8eda3733d Eliminate ctx.set_attr. 2019-04-05 09:50:31 +01:00
Joey Hain
8bdc766bed Use name field directly 2019-03-25 19:32:58 -07:00
Joey Hain
6474a4a6ef Remove objtype::get_type_name() 2019-03-25 19:18:07 -07:00
Joey Hain
cc4f3fdb40 Clean up TypeProtocol 2019-03-25 19:18:01 -07:00
coolreader18
12564da369 Rustfmt? 2019-03-23 22:46:21 -05:00
coolreader18
ec433cdbb9 Fix rustfmt again (?) 2019-03-23 22:17:21 -05:00
coolreader18
946103bca8 Merge branch 'master' into coolreader18/wasm-browser-dom 2019-03-23 20:12:26 -05:00
coolreader18
0f2889a0e5 Fix weird rustfmt 2019-03-23 19:46:46 -05:00
coolreader18
cecc2e1835 Merge pull request #732 from palaviv/super-classmethod
Support classmethod super
2019-03-23 14:17:06 -05:00
coolreader18
9050799cc4 Merge branch 'master' into coolreader18/wasm-browser-dom 2019-03-23 13:22:07 -05:00
Aviv Palivoda
1d820a9586 Use payload_is 2019-03-23 20:01:11 +02:00
Aviv Palivoda
2f9a49d077 Support classmethod super 2019-03-23 19:56:00 +02:00
Windel Bouwman
fa8d3524bf Use extend_class macro even more 2019-03-23 17:49:49 +01:00
coolreader18
430bc4bac2 Fix vm.import when there are no frames on stack 2019-03-23 09:35:53 -05:00
ben
c1d5ce715f Change isinstance/issubclass to accept PyClassRef instead of PyCObject.
Also changed PyValue::class to return a PyClassRef.
2019-03-23 19:32:31 +13:00
ben
5c7812734d Use more specific ref type than PyObjectRef in PyContext 2019-03-23 13:00:12 +13:00
Aviv Palivoda
2c8657c3b3 Add load_cell to NameProtocol 2019-03-22 16:37:28 +02:00
Aviv Palivoda
84e89d37e2 Use __class__ cell in super 2019-03-22 16:37:28 +02:00
Aviv Palivoda
6230a25c4b Use first argument in super 2019-03-22 16:37:28 +02:00
coolreader18
a9051ab462 Convert all &mut VirtualMachine to &VirtualMachine 2019-03-22 01:48:14 -05:00
Aviv Palivoda
c3d0fddfcf Add PySuper 2019-03-19 18:08:43 +02:00
Aviv Palivoda
50cc9fa91f super works in class methods 2019-03-18 22:00:54 +02:00
Joey
7bfd2e6e84 Move function items out of pyobject module 2019-03-15 21:27:11 -07:00
ben
b1a070acc2 Only use real isinstance/issubclass for builtins and move the real
versions to the vm.
2019-03-04 19:55:58 +13:00
ben
5779124f11 rustfmt 2019-02-28 20:40:32 +13:00
ben
e30d91febc Swap naming of is{instance, subclass} <-> real_is{instance, subclass} 2019-02-28 20:32:57 +13:00
ben
52c32fab3a Call __instancecheck__ and __subclasscheck__ as part of isinstance and issubclass 2019-02-28 20:30:31 +13:00
Joey
df76ffe116 Replace most relative imports with 2018-style crate 2019-02-20 08:50:53 -08:00
Adrian Wielgosik
21299ecf3d Refactor arg_check macro 2019-02-13 21:05:23 +01:00