Commit Graph

325 Commits

Author SHA1 Message Date
fanninpm
cc6baeddd6 Allow clippy::unnecessary_wraps lint, and rename "to_js" to "into_js" (#2452)
* Allow clippy::unnecessary_wraps lint

* Change PyResultExt to_js signature

* Change "to_js" to "into_js"

* Refactor "to_js" to "into_js"

* Continue refactoring "to_js" to "into_js"

* Move clippy::unnecessary_wraps to lib.rs

* Add allowed lint to jit/lib.rs

* Add allowed lint to vm/src/lib.rs
2021-02-13 19:07:07 -06:00
Noah
f49448a343 Merge pull request #2402 from RustPython/wasm-hooks
Add a way to inject modules to rustpython_wasm
2021-02-03 09:06:52 -06:00
Noah
20c33f8069 Declare ourselves as Python 3.9 2021-01-25 20:04:32 -06:00
Noah
be1bacd404 Add no-start-func feature 2021-01-20 12:56:30 -06:00
Noah
304a47af26 Add a way to inject modules to rustpython_wasm 2021-01-19 13:53:11 -06:00
Noah
a4aef93327 Make all builtin functions have names 2020-12-17 16:29:43 -06:00
Noah
150d5ae908 Fix snippet test+wasm errors 2020-12-05 16:36:37 -06:00
Noah
2f232ecbe3 Implement string interning for variable names 2020-11-09 15:51:57 -06:00
Noah
b30ca99a09 Implement string interning 2020-11-08 21:35:04 -06:00
Noah
70907babe6 Fix wasm + examples 2020-11-07 15:43:23 -06:00
Noah
4528f17210 compiler/porcelain wrapper 2020-11-07 15:43:23 -06:00
Noah
e44ea3f9a5 Fix wasm 2020-10-19 23:55:55 -05:00
Jeong YunWon
ecf1120bee Clean up static-type affected apis 2020-10-20 02:29:28 +09:00
Jeong YunWon
4add0220ae PyValue::class() returns ref 2020-10-20 02:29:20 +09:00
Jeong YunWon
5b32064cd6 trait StaticType 2020-10-20 01:43:39 +09:00
Noah
c61759bd92 Rework some of the _js module 2020-10-17 11:34:05 -05:00
Jeong YunWon
19ed4f85e7 clean up vm::builtins 2020-10-13 15:42:11 +09:00
Jeong YunWon
ca9326f95d expose bulitins items on builtins module and hide submodules 2020-10-12 11:43:24 +09:00
Jeong YunWon
9e6dfca9e9 Fix build with new builtins path 2020-10-11 21:16:16 +09:00
Jeong YunWon
4da1b62c18 PyFuncArgs -> FuncArgs
which does not represent a single python object
2020-10-11 09:38:07 +09:00
Jeong YunWon
b0445396f4 compactize invoke args 2020-10-11 09:38:06 +09:00
Jeong YunWon
b798caa012 Fix clippy error for wasm 2020-10-10 13:28:17 +09:00
Noah
acd0bf5434 Make the FromArgs derive less verbose 2020-10-01 17:42:07 -05:00
Jeong YunWon
59db19d1ea PyClass -> PyType 2020-09-26 07:32:38 +09:00
Jeong YunWon
f81ad04ce3 PyString -> PyStr 2020-09-26 00:20:02 +09:00
Jeong YunWon
0f7ed21eda remove vm.get_none and clean up its use cases 2020-09-19 10:20:20 +09:00
Ben Lewis
c54b4bb833 Split py_compile_bytecode into py_compile and py_freeze. 2020-09-18 18:59:58 +12:00
Noah
c7f5da6ddd Rework VM initialization some more; make more stuff private 2020-09-17 12:05:29 -05:00
Noah
18273da108 Interpreter struct for managing thread-local vm stack 2020-09-15 16:44:39 -05:00
Jeong YunWon
0d6c77cd67 PyObjectWeak as a struct 2020-09-14 20:39:42 +09:00
Jeong YunWon
125b40972d PyObjectRc as generic 2020-09-14 09:40:53 +09:00
Jeong YunWon
1a91adc865 PyObjectRc 2020-09-14 09:40:52 +09:00
Noah
d3e89761d6 Remove the impl IntoPyNativeFunc for Fn(vm, args) to simplify the rules 2020-09-11 21:01:14 -05:00
Jeong YunWon
a1a8d0320d Merge pull request #2163 from RustPython/coolreader18/immutable-slots
Make class.slots completely immutable
2020-09-06 01:09:41 +09:00
Youngchan Lee
46518e8702 .into_ref(vm).into_object() -> .into_object(vm) 2020-09-05 14:04:46 +09:00
Noah
619f1a1de9 Make PyStructSequence a derive macro 2020-08-30 15:46:04 -05:00
Noah
d912fdef41 Use async/await for wasm-bindgen-futures stuff 2020-08-23 21:23:31 -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
dded3ffc53 Remove redundant clone from new_class 2020-08-23 19:10:46 +09:00
Jeong YunWon
c9c1ac9532 Give module names for classes 2020-08-23 18:24:46 +09:00
Jeong YunWon
5e9df32b18 #[pyclass] must contains name 2020-08-23 18:24:46 +09:00
Noah
513bf1638b Don't pass --all to cargo in ci 2020-08-22 21:46:51 -05:00
Noah
794c91be6e Remove generational-arena dependency 2020-08-22 16:27:00 -05:00
Noah
7218d1d998 Make more dyn Fn()s threading-optional 2020-08-22 16:18:26 -05:00
Jeong YunWon
7b6ab8da72 Replace vm.new_{int,str,bool} with vm.new_pyobj 2020-08-10 02:16:29 +09:00
Jeong YunWon
ab37e455f3 BorrowValue for PyString 2020-08-09 14:14:55 +09:00
Jeong YunWon
67b5d61d1f Refactor DictKey 2020-08-04 02:12:56 +09:00
Jeong YunWon
84b5475d4c obj::objbyteinner::PyByteInner -> bytesinner::PyBytesInner 2020-07-27 08:38:53 +09:00
Noah
76df8773e7 Use PyRc in rustpython_wasm 2020-07-25 15:22:03 -04:00
Noah
642a1ee7ee Disable the threading feature for rustpython-wasm 2020-07-25 15:22:03 -04:00