42 Commits

Author SHA1 Message Date
pikastech
5b838a7da6 fix abs() MACRO_IF 2023-04-22 19:15:51 +08:00
pikastech
3d7a087598 add abs() builtin 2023-04-22 18:46:45 +08:00
pikastech
e9f832c517 enhance int() for int('1234', 8) 2023-03-17 14:28:10 +08:00
pikastech
ca65efd1fa fix args_foreach handler
add PikaGC class

add gc.onMarkObj

add GC DUMP

support gcdump()

improve gcdump
2023-03-09 16:52:57 +08:00
pikastech
6258ccebb2 add clear() builtin, fix REPL thread 2023-02-26 17:48:19 +08:00
lyon
85d989028e support bool type 2023-02-18 16:35:03 +08:00
lyon
cba8f7ec44 use type(d) == <type> in json.py 2023-01-24 00:20:43 +08:00
lyon
68fac66530 fix fn and arg scope, support type() for basic arg 2023-01-23 23:53:40 +08:00
lyon
d77e7f3f2d add filter for dir() 2023-01-22 23:16:38 +08:00
lyon
83ebe9d398 update PikaStdLib 2023-01-19 17:47:34 +08:00
lyon
9718b1a482 support help('modules') for py modules 2022-11-30 00:39:01 +08:00
pikastech
6d61bc07cc support print None
optimizing runbytecode

use _cache_bcf

arrange the run_bytecode and cache

more args for _do_pikaVM_runBytecode

support print(None)
2022-11-14 16:11:21 +08:00
pikastech
7582a37a73 support input() builtin 2022-10-09 19:46:05 +08:00
pikastech
9eb469e521 support eval() 2022-10-01 14:03:57 +08:00
pikastech
efd9abbf17 add mem check
add big_dict_update test
2022-09-27 21:30:30 +08:00
pikastech
76d03f3581 fix @PIKA_C_MACRO_IF
support 'hasattr' 'getattr' for c module
2022-09-26 11:39:33 +08:00
pikastech
74a51cd053 support hasattr(), proxy test ok 2022-09-26 10:14:01 +08:00
pikastech
f2e184aa81 support list(str) 2022-09-19 09:53:27 +08:00
pikastech
8acef2efde support pks_vm_exit() 2022-09-14 13:46:19 +08:00
pikastech
3a7796251f support range(a), range(a, b, step) 2022-09-12 20:01:30 +08:00
pikastech
c70947aa6e cut VM for nano mode 2022-09-10 23:16:59 +08:00
pikastech
d4a0b37958 support **keys in cmodule
support print('test', end='')
2022-09-02 00:33:50 +08:00
pikastech
ab32fd37ae fix stdlib.pyi macro 2022-08-24 13:26:06 +08:00
pikastech
04da2b93b6 supporting decorator to macro in pyi
update PikaObj.pyi

use @PIKA_C_MACRO_IF to cut sysobj
2022-08-24 13:01:11 +08:00
pikastech
bb54c2e719 support setattr and getattr
run tests() in cases is ok
2022-08-11 17:39:38 +08:00
pikastech
ac97532a7a support exec() builtin 2022-08-10 12:07:32 +08:00
pikastech
e0eee73209 support dir() builtin, fix str disp in list... 2022-08-10 11:49:54 +08:00
pikastech
1d7bcf2a39 use __getitem__ __setitem__ instead of __get__ __set__ 2022-07-29 23:40:16 +08:00
李昂
45a07c5773 !58 Support read() builtin
* support read(-1)
* add example
2022-07-15 02:06:23 +00:00
李昂
e7e501ab73 !56 Support tuple literal
* Merge branch 'master' into tuple
* sue SyntaxItemList
* cut the parser
* update preCompiler
* not use tiny_obj in stdlib
* use BUILTIN_STRUCT_ENABLE for list, dict, tuple
* add PikaStdData.Tuple()
* !51 Support bind .pyi from other *.py expect main.py
* fix overflow issue
* fix overflow issue and simplification code
* update PikaCV_Image.c.
2022-07-14 08:36:02 +00:00
pikastech
944503cd23 support return val from type() 2022-06-30 16:10:38 +08:00
pikastech
3e371e9e57 fix a[1] = 1 not work inner function() 2022-06-24 16:08:27 +08:00
pikastech
77f1879180 add id() built-in 2022-06-14 12:06:56 +08:00
李昂
6acc0f9ecd !25 support format output for print()
* test for format with tuple is ok
* 'format'%var is ok (tuple var is not ok)
* rename _cformat to cformat()
* optimize the memory usage of format_list
* add string-test.cpp
* cformat() is ok
* fix variable par load issue
* use test_common.h
* use test_common to simplify the gtest case
* Merge branch 'master' into dev
* fix float->double for bytecodegen
* update to /package
* Use double in C for float in python
2022-06-14 03:20:17 +00:00
李昂
b02672b130 !21 Support variable pars for print()
* update pre-compiler
* test passed for variable pars of print()
* variable pars is tested ok for print()
* skip arg_num check for variable
* support *val in the preCompiler
* add file
* Merge branch 'dev' of https://gitee.com/lyon1998/pikascript into dev
* fix warning
* both update ByteCodeGen
* use super instead of parent
* create PikaList C list struct
* use args inner the PikaStdData.List()
* use PikaDict in PikaStdData.Dict()
* support dict in c
* support dict in c
* clean Tinyobj
2022-06-11 14:56:51 +00:00
pikastech
a87da14c7d move print() and print_no_end from BaseObj to SysObj 2022-06-10 12:04:06 +08:00
lyon
ffe8e85db9 use __slice__ to call __get__ indirectly 2022-05-26 17:03:58 +08:00
lyon
6b63c13bef support bytes() built-in 2022-05-26 15:46:34 +08:00
lyon
d3fd9512b4 support and tested char() and ord() builtin-fun 2022-05-25 15:53:39 +08:00
lyon
09bb50a98c support hex() and tested ok 2022-05-25 15:42:25 +08:00
lyon
652962c4c3 use ... insetad of pass in PikaStdLib.pyi 2022-04-28 15:53:09 +08:00
lyon
8df290da3f use pyi instaed of py for C moudle 2022-04-28 11:47:37 +08:00