Commit graph

343 commits

Author SHA1 Message Date
3afc180451 forking. 2024-08-02 15:43:37 +05:00
Max Kuznetsov
c461a7fe60
Fix: stop execution when trying to slice an unsupported type (#443) 2024-02-25 07:47:25 +00:00
lack
47062da36a
Add os.arch and os.platform (#437)
* add  and

* .ignore
2024-02-24 13:24:35 +00:00
shikbupt
e9b03930ce
fix the import expr string output (#440) 2024-02-24 13:22:39 +00:00
Max Kuznetsov
9d35005ffe
Throw a runtime error when trying to slice an unsupported type (#442) 2024-02-24 13:21:20 +00:00
wlxwlxwlx
18b953c7be
increase size of jump operands (#438)
* [OpJumpFalse, OpAndJump, OpOrJump, OpJump], these four instructions have been changed to use 4 bytes to avoid precision loss and panic when the number of instructions exceeds the maximum of 16 bits (65535)

* update test cases

* update test cases

---------

Co-authored-by: 王录祥 <wanglx@smartsteps.com>
2023-12-20 13:13:23 -05:00
E Sequeira
da09c300a5
Revert "[OpJumpFalse, OpAndJump, OpOrJump, OpJump], these four instructions have been changed to use 4 bytes to avoid precision loss and panic when the number of instructions exceeds the maximum of 16 bits (65535) (#433)" (#436)
This reverts commit 18424deb5a.
2023-12-05 20:52:53 +00:00
wlxwlxwlx
18424deb5a
[OpJumpFalse, OpAndJump, OpOrJump, OpJump], these four instructions have been changed to use 4 bytes to avoid precision loss and panic when the number of instructions exceeds the maximum of 16 bits (65535) (#433)
Co-authored-by: 王录祥 <wanglx@smartsteps.com>
2023-12-05 19:30:50 +00:00
Aman Gupta Karmani
92cbb9bff0
Use any instead of interface{} (#419) 2023-08-22 09:56:27 +05:30
liuxiong
0177bdb4e1
fix json.indent docs (#429) 2023-08-22 09:45:00 +05:30
E Sequeira
48308d45d9
fix json decode (#424)
* fix json decode
2023-06-26 08:40:49 +01:00
E Sequeira
55f2519b16
update go version to fix goreleaser (#422) 2023-04-23 15:17:21 +01:00
Adrian Lee
f90bc00af2
bugfix: parse expect error when mis match braces (#421)
* bugfix: parse expect error when mis match braces

Change-Id: Iba1ad456d5b020375bb0416f44fb54bc2e346d62

* fix wrong test case in vm_test

Change-Id: Idcdaf7ecc93eb61d374249d11282b8286557d30d

---------

Co-authored-by: lihongyuan <lihongyuan.adrian@bytedance.com>
2023-04-23 07:37:59 +01:00
Mikael Ganehag Brorsson
82b543fd98
Better support for TZ locations in the times module (#397)
* Handle panics by deferring recover as an error

* Check for type in recover handler

* Added support for times.in_location

* Added support for location (TZ) to times.date

* Updated documentation
2023-01-31 09:51:04 +00:00
Wannes
ecc3d9181e
Added more math consts (#404) 2023-01-30 08:12:28 +00:00
gufeijun
3f4245d962
fix: solve precision problem when decode bigint in json (#399) 2023-01-30 08:10:04 +00:00
skelly
2edd39e0c3
Update objects.md (#401) 2023-01-30 06:43:17 +00:00
E Sequeira
7108e9c50d
fix golint (#407) 2023-01-28 15:30:26 +00:00
Sean Chittenden
f980e7e724
Downgrade exclusive lock to shared lock when cloning a script (#400) 2023-01-04 05:32:27 +00:00
I Putu Susila
a419bfc93a
fix slice low/high index shadowing variables in vm (#394) 2022-09-26 08:19:00 +01:00
I Putu Susila
dfcfd6661c
Use Object.Copy when cloning globals in Compiled (#393) 2022-09-25 15:30:50 +01:00
shiyuge
8a3f5bdb11
fix: copy SourceMap in vm OpClosure branch (#392) 2022-09-24 16:48:53 +01:00
shiyuge
e338512259
fix: do not invert token.Less to token.Greater in compiler (#391)
* fix: do not invert token.Less to token.Great in compiler

* unittest: do not invert token.Less to token.Great in compiler
2022-08-29 17:02:14 +01:00
E Sequeira
6fc8053992
fix runtime panics on self assignment (#387) 2022-07-20 16:09:43 +01:00
E Sequeira
818d6dc687
vim syntax highlighter (#383) 2022-06-15 17:04:19 +05:30
Józef Sokołowski
6fc27defb8
add support for parsing binary, octal and hex numbers (#364)
Fixes #363

Co-authored-by: Józef Sokołowski <jozef.sokolowski@gmail.com>
2022-06-15 09:50:39 +05:30
E Sequeira
9bf03596b1
limit to go 1.16+ (#382) 2022-06-12 21:32:53 +05:30
E Sequeira
131638ffeb
update goreleaser to fix releases (#381) 2022-06-11 12:49:14 +05:30
E Sequeira
71459c44f6
fix deadcode optimization (#378) 2022-06-10 11:15:34 +05:30
Nicolas Stenberg-Daniil
f90d433d21
Corrected/changed variable names of the base64 and hex imports (instead of fmt) to correspond with the module name itself. (#375) 2022-04-15 18:38:56 +01:00
Józef Sokołowski
0afdfdeb2f
Fix copying user functions (#366)
* fix copying user functions

Fixes #365

* remove EncodingId

Co-authored-by: Józef Sokołowski <jozef.sokolowski@gmail.com>
2022-02-08 08:55:33 -08:00
Michał Idzikowski
7b5d207914
fix documentation for enum.filter (#359)
* fix documentation for enum.filter

fixes https://github.com/d5/tengo/issues/358

* update stdlib code comment for enum.filter
2022-02-06 22:53:27 -08:00
daniel
1bcc1892c8
Update README.md 2022-01-16 18:50:06 -08:00
KEINOS
4846cf5243
add custom extension support for importing source file (#350)
* chore: add tests for custom extension

* feat: cusom source extension #286

* fix: path to test directory

* add getter + change setter name for file extension

* add tests of source file extension validation

* fix: add validation for file extension names

* fix: property importExt -> importFileExt

* fix: redundant check (no resetting)

* fix: failing test wich did not follow the new spec

* chore: add detailed description of the test

* chore: fix doc comment to be descriptive

* docs: add note about customizing the file extension
2021-11-13 15:13:39 -08:00
Mikael Ganehag Brorsson
a7666f0e7d
Handle panics by deferring recover as an error (#345)
* Handle panics by deferring recover as an error

* Check for type in recover handler
2021-11-13 15:10:47 -08:00
Bruno Franca dos Reis
3b65ddf2b8
Extract ModuleGetter interface for dynamic imports (#349)
* Extract ModuleGetter interface for dynamic imports

* ModuleGetter: add example in interop doc.
2021-11-06 17:34:48 -07:00
Ralph Caraveo III
d9b300cb70
For the OpMap VM instruction, since numElements is known just use the capacity hint. (#347) 2021-09-21 13:47:21 +01:00
daniel
de6dc1e9a9
Update README.md 2021-09-05 13:40:48 -07:00
daniel
ac805806f8
add Eval function (#338) 2021-07-05 01:49:38 -07:00
daniel
50af716288
Update README.md 2021-06-19 10:49:56 -07:00
Anders Xiao
885830428b
PR: builtin range function #326 (#328)
* builtin range function #326

* change empty range logic

* fix unit test error message

* fix github env (#329)

* fix ErrInvalidRangeStep comments

* fix github env (#329)

* builtin range function #326

* change empty range logic

* fix unit test error message

* fix ErrInvalidRangeStep comments

* fix lint

Co-authored-by: geseq <5458743+geseq@users.noreply.github.com>
2021-03-01 22:34:04 -08:00
geseq
c51d02f80e
fix github env (#329) 2021-03-02 07:10:36 +01:00
daniel
2565e0553d
fix issues with symbols in global scope blocks (#318) 2020-09-17 17:15:42 -07:00
daniel
15494e1691
fix local symbol resolution bug (#316)
* fix local symbol resolution bug

* 1
2020-09-13 19:33:48 -07:00
Ozan Hacıbekiroğlu
7834251c84
spread last call argument v2 (#302) 2020-06-08 18:54:24 +02:00
Ozan Hacıbekiroğlu
366c69902f
add string comparison support (#294)
* enable relative imports

* update per 1st review

* remove symlink stuffs

* fix cli run in make file

* make resolving import path explicit

* fix importDir

* add string comparison operators

* fix duplicates
2020-05-25 10:53:52 -07:00
daniel
d1dd01499f
fix a bug in bytecode optimization code (#292)
* fix a bug in bytecode optimization code

* add a test
2020-05-23 08:23:33 -07:00
daniel
d08a636e7c
add GitHub Actions (#293) 2020-05-22 23:09:56 -07:00
Ozan Hacıbekiroğlu
4ed75764ce
enable relative imports (#285)
* enable relative imports

* update per 1st review

* remove symlink stuffs

* fix cli run in make file

* make resolving import path explicit

* fix importDir
2020-05-22 13:57:38 -07:00
Ozan Hacıbekiroğlu
e059953c35
fix for in loop symbols (#290)
* fix for in loop symbols

* fix comments
2020-05-22 11:38:29 -07:00