Rob23oba

Results 15 issues of Rob23oba

### Describe the bug When you use a boolean expression inside of a binary operation like addition, subtraction, multiplication or modulo, the compiler will convert it into an int, but...

bug
compiler

This pr adds the command `run-wasm` and the option `--include-all-builtins`: - `run-wasm`: Runs a compiled wasm binary. Warns if the binary doesn't have debug information and provide error ids instead...

If you try to run `porf -e "Math.random(); Porffor.randomByte();"`, you get the error message: `CompileError: WebAssembly.Module(): Compiling function #1 failed: Invalid global index: 2 @+86`

This pr replaces encoding.js with a more optimized version which works with a wasm module (or arraybuffer). Some formats were changed to accomodate this, e.g.: immediates are no longer encoded,...

Changes allocation algorithm (subject to change however when a real heap comes in) and adds placeholder realloc / free which don't do anything different than malloc / nothing. This allocation...

This pull request adds basic support for the BigInt type (bigint literals, toString). However, this pull request also contains unfinished changes to memory allocation so bugs might occur (specifically, static...

Re-writes the command line parser (prefs.js) and adds a more helpful help message. Prefs is also renamed to Options, mostly so that I could make sure that nobody was using...

Reworks the rhemyn parser and extends it to additionally support the following: Regular expressions | Parsed object -------------------------|---------------------------------------------------------------- `^` | `{ type: 'Begin' }` `$` | `{ type: 'End' }`...

allocateBytes returns the pointer to the end of the allocation instead of the start if it doesn't allocate a new page. Test: `./porf -p "'a' + 'b'; let x =...

Allocating fails silently, i.e. without producing any error messages but causing potential memory corruption. Test: `./porf -e "for (let i = 0; i < 65536 + 10; i++) { print({...