Commit Graph

23 Commits

Author SHA1 Message Date
nocturn9x 56938897d6 Fixed precedence of is added beta support for the as operator for casting 2021-01-12 12:10:15 +01:00
nocturn9x 1e353ef1cc Fixed a precedence bug with the is operator and added getBoolean to OpCode.Not in the VM 2021-01-12 09:55:41 +01:00
nocturn9x 410a557ce5 Fixed a bug with the compiler where it would crash with incomplete assignment expressions 2021-01-11 08:06:55 +01:00
nocturn9x 87fa674b15 Fixed a minor bug when calling natives with variadic arguments. Improved tests/runtests.nim and integrated the test suite in the build script. Added type(), round() and toInt() builtins to JAPL as well as the identity operator (revision needed). Got rid of an unused parameter inside frame.nim and cleaned up the VM's code by no longer using var parameters for the VM. Exception objects are now added to the VM's objects stack and variables used for debugging purposes are now only declared/modified when the debug flags are turned on 2021-01-09 18:03:47 +01:00
Productive2 2d2ef61fa1 Added bitwise operator tests
Fixed bitwise not crashing compiler when used as a binary op
2021-01-05 20:32:50 +01:00
Mattia aaf2e66528
Merge pull request #28 from Productive2/master
Testing suite + debugger bugs + some binary operator fixes
2021-01-05 14:56:44 +01:00
nocturn9x cb5eb78ff7 Fixed a bug in the debugger regarding the output of the global scope. Re-added the del statement + small fixes 2021-01-05 14:55:37 +01:00
Productive2 8fe70d2f95 Fixed debugger bugs
Made exponentiation larger precedence than unary
2021-01-05 13:15:43 +01:00
Productive2 9e4329981c Made exponentiation higher precedence than multiplication
Fixed shebang
2021-01-05 13:02:14 +01:00
Productive2 586522ce44 Added Natives
Added stdlib.nim
Added print
2021-01-05 00:32:17 +01:00
Productive2 67d4b77c8f Beginning of a multibyte conversion helper 2021-01-04 23:49:30 +01:00
Productive2 383af42d76 Fix VM's SetGlobal pop
Fix Wrong loop constants
2021-01-04 23:22:27 +01:00
nocturn9x cead00061b Added interning for compile-time strings, made gc:markAndSweep the default option in the build tool and fixed a bug with the compiler where it would not free its memory if it encountered an error 2020-12-28 10:09:52 +01:00
nocturn9x 1e8b4632e9 Attempt to fix function calls by using ref seqs (failed, lol). Now all math operations on nan raise a TypeError 2020-12-26 17:01:03 +01:00
nocturn9x 9e9dc3ac75 Removed a lot of redundant dereferencing in the compiler and fixed runtime objects memory leaking. Fixed some typos 2020-12-21 22:43:40 +01:00
nocturn9x d27cc60891 Moved the templates inside vm.run into separate procedures. Fixed a couple of logical mistakes and renamed SliceRange to Slice and Slice to GetItem. Added the cache optimization to other singletons (nil, nan, inf) 2020-12-21 21:53:45 +01:00
nocturn9x 18823ccf0d Fixed some of the bugs with function calls (recursion needs revision) and locals resolution. JumpIfFalse now always pops its operand even when the condition isn't met. Fixed a lot of typos inside types/jobject.nim caused by copy-paste errors and got rid of newString in favor of asStr 2020-12-21 18:37:08 +01:00
nocturn9x 09e543d786 Fixed typos, minor improvements, added isCallable for objects 2020-10-26 22:55:20 +01:00
Productive2 44aab6f5fc a few minor changes, so it compiles 2020-10-25 17:47:53 +01:00
Productive2 26f035a998 Merge remote-tracking branch 'upstream/master' 2020-10-25 15:10:32 +01:00
Productive2 08ecf2a1ad Add more compiler debug; fix endScope() 2020-10-25 15:08:26 +01:00
nocturn9x b93643e5b5 Moved object structure to a single file + random stuff idk I'm tired 2020-10-25 15:08:08 +01:00
nocturn9x 673b88f9de Huge refactoring for the type system and object structure, VM needs opcode refactoring 2020-10-25 12:45:03 +01:00