Commit Graph

9 Commits

Author SHA1 Message Date
Thakee Nathees
0cfdfa7415 New fibers are not added to temp list -- fixed 2022-05-25 00:06:44 +05:30
Thakee Nathees
8e04748f86 some builtin class methods were added
- check a string contains another with `in` keyword
- Number: isint, isbyte
- String: find, replace, split, startswith, endswith, strip
- Map: clear, has, get, pop
- list: insert, clear, find, pop
- removed str_sub builtin function as its redunent since we have
  range slice over strings.
- moved lower, upper attributes of strings as methods
2022-05-23 23:47:28 +05:30
Thakee Nathees
6a22653263 Minor code enhancements (read bellow)
- Warnings were fixed
- Libraries are registered internally when PKVM created
  and cleanedup when PKVM freed (if PK_NO_LIBS not defined)
- Lang.clock() moved to time module and sleep, epoch time
  were added.
- Support both upper case and lower case hex literals
- Support hex excaped characters inside strings (ex: "\x41")
- Native api for import modules added `pkImportModule(...)`
- pkAllocString, pkDeallocString are changed to pkRealloc.
- NewInstance, DeleteInstance functions now take PKVM however
  delete function should not allocate any memory since it's
  invoked at the GC execution.
2022-05-21 04:15:30 +05:30
Thakee Nathees
e3cab82978 amalgamation added and libs moved to src/libs/ 2022-05-20 04:49:50 +05:30
Thakee Nathees
f5e2f15d23 negative index, range slice and more
... string concat with .. operator
    exponent operator with ** operator
2022-05-08 23:19:33 +05:30
Thakee Nathees
3c107d4da2 native interface refactored 2022-05-05 12:54:15 +05:30
Thakee Nathees
1c7ddf07ad memory trace for vmRealloc implemented.
a little python script have written to check for memory leaks
from the trace report. Which is at scripts/leak_detect.py
2022-05-03 16:56:59 +05:30
Thakee Nathees
e47d982883 super class method call implemented 2022-05-01 20:24:07 +05:30
Thakee Nathees
4e9091b5ec scripts are moved to scritps/ directory 2022-05-01 14:12:27 +05:30