porffor 0.14.0-a24ac8cf2 → 0.14.0-a3af2f547

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/CONTRIBUTING.md +9 -3
  2. package/asur/index.js +1 -1
  3. package/bf_bun +0 -0
  4. package/bf_deno +0 -0
  5. package/bf_porf +0 -0
  6. package/bf_porf_fast +0 -0
  7. package/bf_porf_lto +0 -0
  8. package/compiler/2c.js +65 -2
  9. package/compiler/assemble.js +14 -0
  10. package/compiler/builtins/annexb_string.ts +1 -0
  11. package/compiler/builtins/array.ts +84 -4
  12. package/compiler/builtins/base64.ts +1 -0
  13. package/compiler/builtins/boolean.ts +3 -1
  14. package/compiler/builtins/crypto.ts +1 -0
  15. package/compiler/builtins/date.ts +2 -0
  16. package/compiler/builtins/error.js +22 -0
  17. package/compiler/builtins/escape.ts +1 -2
  18. package/compiler/builtins/function.ts +2 -0
  19. package/compiler/builtins/int.ts +2 -0
  20. package/compiler/builtins/math.ts +410 -0
  21. package/compiler/builtins/number.ts +2 -0
  22. package/compiler/builtins/object.ts +2 -0
  23. package/compiler/builtins/set.ts +7 -6
  24. package/compiler/builtins/string.ts +1 -0
  25. package/compiler/builtins/symbol.ts +63 -0
  26. package/compiler/builtins.js +37 -8
  27. package/compiler/codegen.js +514 -256
  28. package/compiler/decompile.js +1 -1
  29. package/compiler/generated_builtins.js +535 -59
  30. package/compiler/index.js +1 -1
  31. package/compiler/parse.js +1 -1
  32. package/compiler/precompile.js +5 -4
  33. package/compiler/prefs.js +6 -2
  34. package/compiler/prototype.js +180 -157
  35. package/compiler/wrap.js +82 -40
  36. package/demos/bf/hello.bf +1 -0
  37. package/demos/bf/mandelbrot.bf +1 -0
  38. package/demos/bf/node.js +56 -0
  39. package/demos/bf/porf.js +57 -0
  40. package/demos/bf/porf.ts +59 -0
  41. package/demos/cat/porf.js +6 -0
  42. package/package.json +1 -1
  43. package/runner/index.js +5 -4
  44. package/runner/repl.js +18 -2
  45. package/w.js +1 -0
@@ -119,7 +119,7 @@ export const highlightAsm = asm => asm
119
119
  .replace(/(local|global|memory)\.[^\s]*/g, _ => `\x1B[31m${_}\x1B[0m`)
120
120
  .replace(/(i(8|16|32|64)x[0-9]+|v128)(\.[^\s]*)?/g, _ => `\x1B[34m${_}\x1B[0m`)
121
121
  .replace(/(i32|i64|f32|f64|drop)(\.[^\s]*)?/g, _ => `\x1B[36m${_}\x1B[0m`)
122
- .replace(/(return_call|call|br_if|br|return|rethrow|throw)/g, _ => `\x1B[35m${_}\x1B[0m`)
122
+ .replace(/(return_call|call_indirect|call|br_if|br|return|rethrow|throw)/g, _ => `\x1B[35m${_}\x1B[0m`)
123
123
  .replace(/(block|loop|if|end|else|try|catch_all|catch|delegate)/g, _ => `\x1B[95m${_}\x1B[0m`)
124
124
  .replace(/unreachable/g, _ => `\x1B[91m${_}\x1B[0m`)
125
125
  .replace(/ \-?[0-9\.]+/g, _ => ` \x1B[33m${_.slice(1)}\x1B[0m`)