Commit Graph

198 Commits

Author SHA1 Message Date
Aviv Palivoda
56ef6ec5f8 Change to is_some 2019-04-29 20:08:15 +03:00
Aviv Palivoda
af7a89aa99 pop exception on context 2019-04-28 19:06:14 +03:00
Aviv Palivoda
60afbb4bf5 Don't pop exeption for context 2019-04-27 21:53:08 +03:00
Aviv Palivoda
4b9bafc824 Remove in_exc_handler for Raise 2019-04-27 14:33:24 +03:00
Aviv Palivoda
462c8233f3 Add exceptions stack to VirtualMachine 2019-04-27 14:21:01 +03:00
Windel Bouwman
240c1e42db Merge pull request #839 from RustPython/nonlocal
Add nonlocal support.
2019-04-17 14:02:04 +02:00
Windel Bouwman
6d1b807c77 Improve error message of unwrap operation on nonlocal scope. 2019-04-17 12:59:56 +02:00
ben
f2873a519d Merge branch 'master' into slice_new
# Conflicts:
#	tests/snippets/builtin_slice.py
#	vm/src/frame.rs
#	vm/src/obj/objrange.rs
#	vm/src/obj/objslice.rs
2019-04-17 19:44:46 +12:00
Windel Bouwman
6abf1511e9 Add nonlocal support. 2019-04-16 17:19:57 +02:00
Aviv Palivoda
3ec9b01928 Add exception __context__ 2019-04-14 18:54:43 +03:00
Aviv Palivoda
2c2925a684 Support reraise 2019-04-14 18:54:43 +03:00
Windel Bouwman
71b6e2abf0 Merge pull request #806 from RustPython/symbol-table
Initial version of symbol table builder.
2019-04-14 10:44:43 +02:00
ben
6650ad895a Fix a bunch of clippy warnings 2019-04-14 10:07:50 +12:00
Windel Bouwman
733d3a1d1f Merge master branch 2019-04-13 12:51:55 +02:00
Windel Bouwman
83ea419c63 Add load and store of global to name protocol. 2019-04-13 11:55:10 +02:00
Adam
78ab68a64e Merge pull request #817 from skinny121/function_metadata
Add __name__, __qualname__ and __module__ to functions and classes
2019-04-13 09:44:33 +01:00
coolreader18
22203975fa Merge pull request #821 from palaviv/excpetion-cause
Add exception cause
2019-04-12 16:08:54 -05:00
Aviv Palivoda
256abe63b6 Use vm.new_type_error 2019-04-12 23:08:26 +03:00
Windel Bouwman
76c597f2af Add global bytecode and testcase. 2019-04-12 19:24:23 +02:00
Aviv Palivoda
908f758cbe Print cause on exception 2019-04-12 15:50:17 +03:00
ben
63643e1fdb Implement generator.throw 2019-04-12 20:30:37 +12:00
Aviv Palivoda
6c4b092641 Support exception __cause__ 2019-04-12 10:50:45 +03:00
ben
2164cb5e65 Produce correct value for __qualname__ and add attributes to class. 2019-04-11 20:13:23 +12:00
ben
84eff4a7ac Add __name__ and __module__ to functions 2019-04-11 20:13:23 +12:00
Adam Kelly
ec5fd550de Implement IntoIterator for PyDictRef. 2019-04-09 11:30:52 +01:00
ben
5fd3cf2bcd Implemented keyword only defaults 2019-04-07 07:38:42 +12:00
Adam Kelly
7b2d92f495 Delete DictProtocol. impl ItemProtocol for PyDictRef. 2019-04-06 10:15:29 +01:00
ben
dda0d561ac Fix order of dict literal 2019-04-06 10:43:39 +13:00
Adam Kelly
0dce9bb96a Use item protocol when executing instructions. 2019-04-05 16:16:55 +01:00
Adam Kelly
ec94168a15 Remove objdict::get_key_value_pairs. 2019-04-05 16:16:55 +01:00
Adam Kelly
b943f4a4bb Historic real proper dictionary support. 2019-04-05 09:50:31 +01:00
Adam Kelly
c8eda3733d Eliminate ctx.set_attr. 2019-04-05 09:50:31 +01:00
Adam Kelly
bce4f1e483 Simplify/shrink the dict interface. 2019-04-05 09:39:59 +01:00
ben
ea2622ee7b Make slice.stop not an option 2019-04-02 17:25:51 +13:00
Adrian Wielgosik
016ecf204d Move iterator __contains__ to 'in' implementation 2019-04-01 19:45:00 +02:00
ben
5625f7e15e Allow arbitrary in slice, and convert slice.__new__ to new style 2019-03-31 09:58:02 +13:00
Adam Kelly
4a5592d461 Change types inside Scope to PyDictRef. 2019-03-26 15:16:49 +00: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
Adam Kelly
bbb7162472 Various dictionary changes.
* vm.ctx.new_dict returns a PyDictRef
* Special case for module goes away.
* Instances get a real dictionary.
2019-03-25 16:37:20 +00:00
Joey
f2d562a4cc pyint: use as_bigint() everywhere 2019-03-24 10:05:25 -07:00
ben
3f363585e8 Panic if value poped of stack isn't a code object. 2019-03-24 16:08:17 +13:00
ben
db8e648646 Make PyFunction.code a PyCodeRef, PyGenerator.frame a FrameRef, and
other improvements to increase use of specific ref types.
2019-03-24 13:41:37 +13:00
Adam Kelly
386f90fa25 Remove PyContext.get_attr. 2019-03-23 11:29:22 +00: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
coolreader18
b0d8935731 Merge branch 'master' into coolreader18/immutable-vm-ref 2019-03-22 07:21:45 -05:00