216 Commits

Author SHA1 Message Date
pikastech
699a0feefd fix ci 2022-08-11 19:32:50 +08:00
pikastech
bb54c2e719 support setattr and getattr
run tests() in cases is ok
2022-08-11 17:39:38 +08:00
pikastech
e0eee73209 support dir() builtin, fix str disp in list... 2022-08-10 11:49:54 +08:00
pikastech
4f13d3a4b1 support callback from formal parameter 2022-08-06 16:57:35 +08:00
pikastech
874f3ff7ed syantex check for 'class' 'def' 2022-08-06 15:42:02 +08:00
pikastech
92dad784ce fix parse err like d['x'].foo() 2022-08-05 22:39:43 +08:00
pikastech
0c0d89231c avoid core dump when not ':' found 2022-08-05 11:18:54 +08:00
pikastech
525f08e088 fix for in dict 2022-08-02 13:52:20 +08:00
pikastech
446bc562cd accelerate for OUT ins 2022-08-01 10:06:49 +08:00
pikastech
6be2bc41b6 use pure_stack_arg 2022-07-31 17:18:29 +08:00
pikastech
4899884747 use u32 for mem info
add speed by using register in for-loop

fix ci_benchmark
2022-07-31 11:14:49 +08:00
pikastech
a40f68e9b2 use more inline in PikaVM
use static refcnt in PikaObj

use static _clsptr
2022-07-30 21:26:46 +08:00
pikastech
1d7bcf2a39 use __getitem__ __setitem__ instead of __get__ __set__ 2022-07-29 23:40:16 +08: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
8f9950d4ae support decode() and encode()
for PikaStdData.String() and PikaStdData.ByteArray()

use example/BuiltIn/encode_decode.py

fix CI
2022-07-14 12:02:38 +08:00
李昂
f69dcf4d6d !49 fix for loop continue position err
* fix for loop continue bug
* adding jmp_deepth in VM
2022-07-12 08:07:04 +00:00
李昂
76db2494a5 !46 try to support [][], not ok yeat
* fix typo in test
* Merge branch 'master' into slice
* adding slice to parser from suger
2022-07-11 03:14:14 +00:00
李昂
b463e812bf !42 Support PikaCV, can read data from Jpeg and convert to rgb888/rgb565
* add pikaCV-test.cpp
* read(Image) and convert to RGB565 is tested ok
* transfer can return res, but not assert
* format tjpgd
* add test for PikaCV
* add assert for newContent
* restore assets
* restore PikaCV.pyi
* restore PikaCV
* restore uint16_t
* add jpeg_test.py
* move ADC, GPIO, RGB ... to Device
* add jd_decomp
* convert_JPEGtoREG888 is not ok
* connecting tjpegdec
* Converter.toRGB565() .toRGB888() .toGRay() eachother is ok
* support Gray
* add PikaCV_Image, PikaCV_ImageFormat
* add classes for PikaCV
* add PikaCV
2022-07-08 09:33:53 +00:00
lyon
9a7c2a5fce add test for return None and print(None) in py 2022-07-06 11:31:03 +08:00
lyon
cfe0f5497d add errcode for returnNullStr 2022-07-06 11:03:08 +08:00
lyon
ed7eef878d add return Null str test 2022-07-06 10:54:04 +08:00
lyon
0793fafece Support invokedeepth < 9 -> 15 > 2022-07-05 15:59:11 +08:00
李昂
4a943b479c !41 Support chain invoke like < String('test').split() >
* support chain invoke ok
* add test for S(S.replace()).replace()
* parse to RUN .split
* try to support chain invoke, not ok
* can devide a chain
2022-07-05 06:23:49 +00:00
lyon
0b77191683 support 0bxx 2022-07-04 15:52:48 +08:00
pikastech
8aaf317689 fix print normal object 2022-06-30 17:33:06 +08:00
pikastech
3e371e9e57 fix a[1] = 1 not work inner function() 2022-06-24 16:08:27 +08:00
pikastech
ab795de30c pikaVM_runFile change to interpreter mode 2022-06-23 15:37:04 +08:00
pikastech
f30dd75da1 fix mem_lack for StdData_List 2022-06-16 01:18:11 +08:00
pikastech
d72bd7cacc add mem_lack check for task_test 2022-06-16 00:49:48 +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
bd3a4d1067 run example/UnitTest/main.py in gtest 2022-06-07 14:22:02 +08:00
OnceDay
09d77c0b7c Merge branch 'master' of gitee.com:onceday/pikascript 2022-06-04 22:13:20 +08:00
OnceDay
2fb387c7f3 Merge branch 'master' of gitee.com:onceday/pikascript 2022-06-04 22:10:45 +08:00
pikastech
905c33e131 support platformGetTick for Time() 2022-06-04 16:28:36 +08:00
pikastech
a27f974fb9 Merge branch 'dev' 2022-06-04 15:20:14 +08:00
onceday
130deafa01 support unix-time and utc-time with gmtime,localtime,mktime,asctime,ctime,time and so on. 2022-06-04 14:30:15 +08:00
purewind7
f1209ead44 add some methods for string 2022-06-02 20:26:35 +08:00
pikastech
b20d4f6e99 getObjectItem() tested ok 2022-06-02 17:22:14 +08:00
lyon
7482f84da2 Merge branch 'dev' 2022-06-02 15:46:55 +08:00
lyon
2d98f1c63e fix bug: can not run the function defind from module 2022-06-02 15:13:56 +08:00
lyon
879cc7b2e7 support startwith() and endwith() for String 2022-06-02 15:12:28 +08:00
lyon
da24a68566 support __del__() for C Module 2022-06-02 14:23:55 +08:00
lyon
64391b3333 fix memory leak when str(String('test')) 2022-06-01 15:12:35 +08:00
lyon
19a0b52ea3 use argType_isObject in not importent place 2022-06-01 14:39:59 +08:00
lyon
6f1a96ed37 test create list() by for_append 2022-06-01 11:59:12 +08:00
lyon
a97d6f3f76 support __str__ for String(), find mem leak when print(String('test')) 2022-06-01 11:46:59 +08:00
lyon
c0a925d42d support [:i] and [i:] for str and bytes 2022-05-31 20:17:26 +08:00
lyon
51540da289 fix parse error when '[' inner the string 2022-05-31 13:57:13 +08:00
lyon
e35d815bdd add test for c_buff 2022-05-30 19:27:35 +08:00