preparation for v5.0

This commit is contained in:
Valk Richard Li
2020-12-19 01:26:15 +08:00
parent 99189d4f95
commit 9f30440286
9 changed files with 329 additions and 2494 deletions

View File

@@ -44,6 +44,12 @@ I refactored parser and make it easier to maintain.
The EBNF is also refactored.
## Version 4.0
Parser in this version will pre-calculate some mathematical equations.
This will make bytecode vm running more quickly.
# Abstract Syntax Tree
## Version 1.2
@@ -64,6 +70,12 @@ Now you can add your own functions as builtin-functions in this interpreter!
I decide to save the ast interpreter after releasing v4.0. Because it took me a long time to think and write...
## Version 5.0
I change my mind.AST interpreter leaves me too much things to do.
If i continue saving this interpreter,it will be harder for me to make the bytecode vm become more efficient.
# Byte Code Interpreter
## Version 4.0
@@ -94,4 +106,10 @@ var (a,b,c)=(1,2,3);
0x00000004: pnum 0x00000002 (3)
0x00000005: load 0x00000002 (c)
0x00000006: nop 0x00000000
```
```
## Version 5.0
I decide to optimize bytecode vm in this version.
Because it takes more than 1.5s to count i from 0 to 4000000-1.This is not efficient at all!