yanganto
d058b3debf
Set default stdout of wasm to console.log
...
The print function of wasm will be
- `console.log` by default or when giving undefined or "console"
- a dumb function when giving `null`
- the function when giving a function
Co-Authored-By: Noah <33094578+coolreader18@users.noreply.github.com >
2019-11-27 13:53:07 +08:00
Jeong YunWon
cb2a994b46
Result<T, PyObjectRef> -> PyResult<T>
2019-10-11 18:09:55 +09:00
j30ng
b056044b5a
Fix CI Build in Rust 1.38.0
2019-09-28 03:24:47 +09:00
Sang-Heon Jeon
545e9d39df
Fix int type casting error with negative base value
...
Change base type from u32 to PyIntRef
Fixed : #1405
2019-09-25 01:01:21 +09:00
Noah
0def37d78e
Make PyString.value private
2019-09-19 17:45:48 -05:00
coolreader18
d33d5ce5f6
Initialize attributes on new modules
2019-08-15 23:06:30 -05:00
Windel Bouwman
589c431c8c
Merge master branch
2019-08-15 18:59:29 +02:00
Marcin Pajkowski
e65e9ff7c3
Make func_ref an &PyObjectRef
2019-08-15 13:45:47 +02: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
coolreader18
4f9a71ff89
Change compile::compile() to take a Mode instead of an &Mode
2019-08-13 12:34:39 -05:00
coolreader18
ec6c016fa5
Fix wasm errors
2019-07-27 14:27:37 -05:00
Aviv Palivoda
6ca979e7be
Merge pull request #1159 from palaviv/freeze-stdlib
...
Allow stdlib freeze
2019-07-24 20:41:35 +03: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
Windel Bouwman
e922a6a952
Fix trailing newline issue #17
2019-07-21 14:00:55 +02:00
Aviv Palivoda
7226c925d2
Add hashmap macro to __exports
2019-07-20 22:25:46 +03:00
Windel Bouwman
704b15750e
Add optimize flag to ignore assert statements.
2019-07-12 18:41:25 +02:00
Maxim Kurnikov
347d48198e
fix remaining clippy warnings
2019-07-07 06:27:07 +03:00
Aviv Palivoda
10cad47b50
Remove wasm warnings
2019-07-06 16:14:29 +03:00
Aviv Palivoda
0be08fe9f4
Fix wasm syntax error
2019-07-06 13:30:06 +03:00
Aviv Palivoda
090cfed593
Use importlib import in WASM
2019-07-03 18:57:49 +03:00
Windel Bouwman
e05a75c363
Merge pull request #1092 from RustPython/bytecode-crate
...
Make parser and compiler optional features for vm crate.
2019-07-01 20:43:06 +02:00
Windel Bouwman
f816a50110
Change get_row() into row()
2019-06-30 20:23:01 +02:00
Windel Bouwman
3954dbe716
Make parser and compiler optional features for vm crate.
2019-06-30 20:11:40 +02:00
coolreader18
658b6ca9b9
Fix errors
2019-06-21 20:20:21 -05:00
coolreader18
298b05d56d
Don't convert errors from js to python
2019-06-21 20:20:21 -05:00
coolreader18
8cf38f5b25
Move classmethods on JsValue to be normal methods
2019-06-21 20:20:21 -05:00
coolreader18
072c8725fc
Fix get_prop on primitives
2019-06-21 20:20:21 -05:00
coolreader18
886f77bdff
Add PyJsValue::instanceof
2019-06-21 20:20:20 -05:00
coolreader18
a3735da489
Move confirm and prompt to browser.py
2019-06-21 20:20:20 -05:00
coolreader18
5627ab2345
Add PyJsValue::construct()
2019-06-21 20:20:20 -05:00
coolreader18
93cdd94ab7
Add browser.py module
2019-06-21 20:20:20 -05:00
coolreader18
56bcb02a5e
Add _js module and fix imports
2019-06-21 20:20:20 -05:00
coolreader18
650139b918
Merge pull request #1048 from RustPython/revert-1037-coolreader18/option-source_path
...
Revert "Make CodeObject.source_path an Option<String>", just add a parameter to import_codeobj
2019-06-21 11:49:03 -05:00
coolreader18
aefbae40e4
Revert "Make CodeObject.source_path an Option<String>"
2019-06-20 12:01:20 -05:00
coolreader18
0ac42ac9aa
Add convenience functions
2019-06-19 17:30:09 -05:00
coolreader18
9ac854aea5
Use serde_wasm_bindgen for wasm ser/de
2019-06-18 14:32:34 -05:00
coolreader18
a8d80193c7
Move PyObject serialization to its own file
2019-06-18 13:31:58 -05:00
coolreader18
b74b65d37e
Make CodeObject.source_path an Option<String>
2019-06-16 19:59:04 -05:00
coolreader18
45bb2bd263
Split off bytecode compilation into a separate crate
2019-06-12 21:43:43 -05:00
Maxim Kurnikov
0098e8485a
move PyFuncArgs.kwargs to IndexMap
2019-05-22 03:18:15 +03:00
Yonatan Goldschmidt
84684e5f7d
Don't use RefCell in tuple object
2019-05-19 23:57:32 +03:00
Jeong YunWon
509394080b
Inject __builtins__ to scope only when it doesn't exist
2019-05-11 03:05:18 +09:00
Jeong YunWon
f69c79bdc7
Add __builtins__ to globals()
2019-05-11 01:17:22 +09:00
Aviv Palivoda
c57fd1b96e
Remove closure
2019-05-03 23:52:02 +03:00
Aviv Palivoda
d121b422b6
Add browser.load_module
2019-05-03 16:15:18 +03:00
coolreader18
a6f3b9a5ff
Add PyCallable
2019-04-19 10:14:57 -05:00
Windel Bouwman
eb16f16566
Improve syntax error with line information.
2019-04-17 20:02:24 +02:00
Adrian Wielgosik
585e6e5428
Drop IntoPyNativeFunc impl to fix Nightly/Beta breakages.
2019-04-12 19:28:09 +02:00
Adam Kelly
e04275b199
Missed get_key_values_pairs removal in wasm.
2019-04-10 09:48:53 +01:00