2151 Commits

Author SHA1 Message Date
blueloveTH
49045f2c48 add l and ll 2024-04-15 19:38:11 +08:00
blueloveTH
1cf67220f8 Update error.cpp 2024-04-14 21:53:00 +08:00
blueloveTH
d2052557f7 fix line_profiler 2024-04-14 21:39:10 +08:00
blueloveTH
6ec6c5290b some fix 2024-04-14 21:26:03 +08:00
blueloveTH
d87c9ff850 add breakpoint 2024-04-14 20:33:04 +08:00
blueloveTH
b6d62c9d89 add breakpoint 2024-04-14 20:14:51 +08:00
blueloveTH
aaa0d55361 add breakpoint 2024-04-14 18:31:14 +08:00
blueloveTH
c4cde994f8 fix a bug 2024-04-14 15:52:10 +08:00
blueloveTH
88d1d4e0a2 Update compiler.cpp 2024-04-14 15:32:00 +08:00
blueloveTH
5a8d9bb5f7 some fix 2024-04-14 15:25:01 +08:00
blueloveTH
bcff54fe78 some optimize 2024-04-14 15:15:41 +08:00
blueloveTH
1b53c51cdc Update io.cpp 2024-04-14 14:41:38 +08:00
blueloveTH
b4d5ebcfe5 Update io.cpp 2024-04-14 14:38:56 +08:00
blueloveTH
5eaef2c900 update os 2024-04-14 14:19:08 +08:00
blueloveTH
5d4294b457 add pkpy_set_main_argv 2024-04-14 13:29:20 +08:00
blueloveTH
d3989474a7 some optimize 2024-04-14 12:32:45 +08:00
blueloveTH
96eaeb49f5 some fix 2024-04-14 01:20:56 +08:00
blueloveTH
c07bf67714 some fix 2024-04-14 01:17:17 +08:00
blueloveTH
7a145b6c02 Merge branch 'main' of https://github.com/pocketpy/pocketpy 2024-04-14 00:11:11 +08:00
BLUELOVETH
4d2af4b83d
allow next to be compatible with cpython (#241)
* add `itertools`

* Update _generated.h

* allow `next` to be compatible with cpython
2024-04-14 00:08:41 +08:00
BLUELOVETH
6bf645d738
add itertools (#239) 2024-04-13 23:44:07 +08:00
blueloveTH
d70f8d8f18 Update compiler.cpp 2024-04-13 23:35:04 +08:00
blueloveTH
1cc24d40a2 add compile 2024-04-13 23:20:50 +08:00
blueloveTH
43fb6a966b Update error.cpp 2024-04-13 23:00:19 +08:00
blueloveTH
6028967abe Update error.cpp 2024-04-13 22:59:14 +08:00
blueloveTH
0d41d40456 add precompile 2024-04-13 22:55:49 +08:00
blueloveTH
9855f4e681 Update compiler.cpp 2024-04-13 21:37:06 +08:00
blueloveTH
e02292c03d add precompile 2024-04-13 21:35:25 +08:00
blueloveTH
790e87f688 add vec.__getitem__ 2024-04-13 14:25:18 +08:00
blueloveTH
2129392b0e Update dataclasses.cpp 2024-04-11 13:35:29 +08:00
blueloveTH
f53a46941a deprecate *non_tagged* 2024-04-11 11:50:15 +08:00
blueloveTH
b3c898672e Update vm.cpp 2024-04-11 11:31:46 +08:00
blueloveTH
1f4b72e010 fix function types 2024-04-11 11:21:35 +08:00
blueloveTH
49ee693d40 optimize for empty function 2024-04-11 01:31:45 +08:00
blueloveTH
335d35cbc9 some fix 2024-04-06 18:47:10 +08:00
blueloveTH
dcb5f38ddf make float always 64-bit 2024-04-06 17:54:53 +08:00
blueloveTH
2219809fb4 support bytes slice 2024-04-06 17:18:35 +08:00
blueloveTH
10ca25f6b0 add enum module 2024-04-06 17:00:50 +08:00
albertexye
936870c1f0
Perform boundary checks before searching to prevent security vulnerabilities (#237)
* perform boundary check before searching to prevent security vulnerabilities

* when a negative start index is passed to str.find, 0 is used instead

* a ValueError is raised when argument 'start' is a negative integer
2024-04-02 13:38:45 +08:00
albertexye
b1115a4c8f
Check the size of fillchar passed to str methods (ljust, rjust) (#236)
* check the size of fillchar passed to str methods (ljust, rjust)

* count characters using u8_length instead of size
2024-04-02 02:41:45 +08:00
blueloveTH
e86baa2e2f add optimized opcodes for FOR_ITERs 2024-03-29 01:29:32 +08:00
blueloveTH
41e9900b37 Update io.cpp 2024-03-29 00:40:54 +08:00
ykiko
8ca7e9f6cf
add bit_length method to int. (#233)
* add bit_length method to int.

* Update pocketpy.cpp

* Update 01_int.py

* Update 01_int.py

---------

Co-authored-by: BLUELOVETH <blueloveTH@foxmail.com>
2024-03-28 19:51:39 +08:00
blueloveTH
c77fef35a2 refactor defaultdict 2024-03-28 19:21:56 +08:00
blueloveTH
d7545071e5 optimize int() and float() 2024-03-28 17:50:23 +08:00
blueloveTH
79cafcf32c improve io 2024-03-28 15:48:59 +08:00
blueloveTH
eaf231fd9d refactor io 2024-03-28 15:20:23 +08:00
blueloveTH
d81a1c5415 add bytes.__add__ 2024-03-28 15:04:10 +08:00
albertexye
142e4fd45f
Sort names returned by the built-in dir method (#231)
* Sort names returned by the built-in dir method

* some fix

---------

Co-authored-by: blueloveTH <blueloveth@foxmail.com>
2024-03-27 16:07:35 +08:00
blueloveTH
636944632d fix a bug 2024-03-24 23:20:23 +08:00