Joey
7bfd2e6e84
Move function items out of pyobject module
2019-03-15 21:27:11 -07:00
Adrian Wielgosik
b334689e55
Remove Option from PyObject.typ; Refactor type hierarchy initialization.
2019-03-12 21:58:03 +01:00
Adam Kelly
0ff5155af9
Rename mk_module to make_module.
2019-03-10 17:10:51 +00:00
Adam Kelly
a72af4d967
Remove None and NotImplemented payloads and replace with NoPayload
2019-03-06 16:04:26 +00:00
Joey
990c29469a
Merge remote-tracking branch 'origin/master' into joey/fun-with-functions
...
Conflicts:
vm/src/pyobject.rs
2019-02-28 10:44:46 -08:00
Joey Hain
67f8c02087
cleanup
2019-02-27 20:05:04 -08:00
Joey Hain
713edc57ee
Convert some objstring methods to new style.
2019-02-27 19:53:31 -08:00
ricky han
0a2aa1e64b
fix compile
2019-02-26 17:39:56 -05:00
Windel Bouwman
c33abe91e9
Use py_module macro at more places.
2019-02-26 19:53:58 +01:00
Joey Hain
f10fa6db44
Remove outer RefCell from PyObjectRef
2019-02-25 21:01:37 -08:00
Ricky Han
cf400501a1
move set_item to DictProtocol
2019-02-25 16:32:50 -05:00
Joey
df76ffe116
Replace most relative imports with 2018-style crate
2019-02-20 08:50:53 -08:00
janczer
89e947a04f
Fix typos
2019-02-14 20:38:18 +01:00
ZapAnton
d86ffc40f6
Fixed the redundant_field_names clippy warnings
2019-02-12 16:07:24 +03:00
Windel Bouwman
b1e07f64be
Change to more usage of VirtualMachine in anticipation of proper dictionaries.
2019-02-10 15:39:33 +01:00
klemens
b109ea954a
Merge branch 'master' into spelling
2019-02-09 12:03:08 +01:00
klemens
79a7e5e42b
spelling fixes
2019-02-09 12:00:46 +01:00
ZapAnton
0e6fca0106
Fix the 'if_same_then_else' clippy warnings
...
Relevant clippy warning: https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
2019-02-08 20:04:30 +03:00
Adam Kelly
fd344ec1e0
Remove unnecessary to_bigint().unwrap() everywhere.
2019-02-06 17:38:01 +00:00
Windel Bouwman
328f81a28e
Merge pull request #266 from coolreader18/format-mk-module
...
Format module building in a more readable way
2019-01-30 18:09:17 +01:00
Windel Bouwman
892493e464
Rename PyObjectKind into PyObjectPayload
2019-01-30 18:06:27 +01:00
coolreader18
e9bfea834a
Format module building in a more readable way
2019-01-28 23:02:43 -06:00
coolreader18
5ecff1b37e
Remove unnecessary to_string conversions
2019-01-27 21:45:21 -06:00
coolreader18
8fee5a8800
Run cargo fmt --all
2018-12-27 00:12:08 -06:00
coolreader18
a77b7e0ce4
Have json.* throw an exception instead of panicking
2018-12-26 14:18:15 -06:00
Windel Bouwman
a29e882bc1
Store dict key as pyobject into hashmap.
2018-12-13 17:05:01 +01:00
Windel Bouwman
e657633e51
Move set_item to context struct.
2018-12-12 22:27:28 +01:00
Windel Bouwman
0215830aaa
Move set_attr and set_item to context.
2018-12-12 19:41:09 +01:00
Windel Bouwman
d72abebdd0
Unify object kinds tuple and list into sequence.
2018-11-03 12:26:31 +01:00
Windel Bouwman
039b5bbbb7
Implement dict __setitem__
2018-11-02 22:04:18 +01:00
Windel Bouwman
89cfdbe3dd
Use __setitem__ to store elements in list. Also refactor get_elements to return a reference to the elements, not a copy.
2018-10-31 23:18:26 +01:00
Windel Bouwman
cb4d66bd48
Added bit length method on int type.
2018-10-30 22:08:10 +01:00
Windel Bouwman
f6cced5d65
Change integer type into bigint
2018-10-30 21:01:31 +01:00
Windel Bouwman
1d854a8fbb
Modify isinstance call signature to take reference to a python reference.
2018-10-27 17:58:54 +02:00
Windel Bouwman
ce91a25106
Added -m option to main program.
2018-10-13 11:17:09 +02:00
Windel Bouwman
2d7b0e0d4b
Moved objbool into obj folder
2018-09-29 09:38:07 +02:00
Daniel Watkins
8c167ac4f5
Clean up unwrapping of string objects in json.loads
2018-09-02 16:49:50 -04:00
Daniel Watkins
0e33aa397a
Create objects with correct types in json.rs
...
Fixes #120 .
2018-09-02 14:13:02 -04:00
Daniel Watkins
a4a91f14d4
Convert PyObjectSerializer to store a PyContext
...
We don't actually need anything from the VirtualMachine other than the
context, so just use that directly.
2018-09-02 14:13:02 -04:00
Windel Bouwman
1a2a4adcef
Lets delete some clones
2018-09-02 19:41:37 +02:00
Adam Kelly
04b73d4628
Bool is a subclass of int, so doesn't need a special kind.
2018-09-02 14:10:36 +01:00
Adam Kelly
8d8816ce04
Merge branch 'master' into equality
2018-09-01 20:46:22 +01:00
Windel Bouwman
f563856dc4
Add some tuple class methods
2018-09-01 10:19:51 +02:00
Windel Bouwman
40cf7f4579
Move more objects to obj folder
2018-09-01 10:00:55 +02:00
Windel Bouwman
b2ab49376a
Change get_value to take a reference to a reference
2018-08-31 20:49:52 +02:00
Windel Bouwman
f453c749ec
Move builtin types to own directory
2018-08-31 20:31:25 +02:00
Daniel Watkins
406b9a1c57
Add PyObjectSerializer method to reduce clutter
2018-08-30 19:02:25 -04:00
Daniel Watkins
3dca52cc4a
Rework json.dumps to support subclasses
...
We can currently only construct instances of string subclasses, so
that's the only code path that is actually tested.
Fixes #91 .
2018-08-30 19:02:25 -04:00
Daniel Watkins
1c0e1ed6b5
Implement getters for PyContext types
...
Currently, all users of the *_type attributes on PyContext have to
immediately clone the pointer before they can use it; this pushes that
cloning in to getters to reduce the clone-clutter across the codebase.
2018-08-27 17:31:05 -04:00
Daniel Watkins
8f74759129
Modify arg_check! syntax to allow expansion of option types
2018-08-27 09:55:21 -04:00