V7 v3.0 Release Notes

Release Date: 2016-05-19 // almost 8 years ago
    • Error reporting improved significantly:
      • Added complete stack traces, with filenames and line numbers
      • When non-callable value is called, v7 gives some context instead of plain "value is not a function"
    • 🏗 All build flags are documented
    • C API changed:
      • Getting C entities from JS values (v7_val_t):
      • v7_to_number() -> v7_get_double()
      • v7_to_boolean() -> v7_get_bool()
      • v7_to_cstring() -> v7_get_cstring()
      • v7_get_string_data() -> v7_get_string()
      • v7_to_foreign() -> v7_get_ptr()
      • These functions now take the v7 argument:
      • v7_mk_number()
      • v7_get_double()
      • v7_mk_boolean()
      • v7_get_bool()
      • v7_mk_foreign()
      • v7_get_ptr()
      • Added v7_get_int()
      • v7_mk_undefined() is deprecated, use the macro V7_UNDEFINED instead
      • v7_mk_null() is deprecated, use the macro V7_NULL instead
    • ➕ Added MSP432 CCS projects for v7 examples
    • Implemented v7 user data and destructors
    • Implemented Object.isFrozen() and Object.isSealed()
    • 🐛 Bug fixes and refactoring

Previous changes from v2.0

    • 📜 Parser's stack usage does not grow as expression nesting grows, it allows v7 to run in stack-constrained environment;
    • Interpreter is reimplemented completely: instead of AST-based VM runtime with long jumps, the bytecode is generated and then evaluated. Again, it allowed to get rid of deep stack usage and make the whole runtime more straightforward;
    • Freezing: the ability to take a snapshot of v7's RAM usage, and then put that snapshot in flash instead. This way, the whole standard library can reside in flash, therefore saving several kilobytes of RAM, which is very expensive on embedded devices;
    • The ability to run from unmanaged (typically, mmap-ed) memory. This way, scripts can be precompiled, put in flash, and run straight from there. Again, it saves RAM;
    • API is cleaned up;
    • 🛠 Lots of bugfixes and stability improvements.