• src/sbbs3/js_global.c jsexec.c mailsrvr.c main.cpp sbbs_ini.c sbbsdefs

    From Rob Swindell@VERT to Git commit to main/sbbs/master on Sat Mar 6 13:49:25 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/2c7f3bc699f32ec7f017b82e
    Modified Files:
    src/sbbs3/js_global.c jsexec.c mailsrvr.c main.cpp sbbs_ini.c sbbsdefs.h services.c startup.h websrvr.c
    Log Message:
    Allow fine-grained control over JavaScript compiler options via *.ini

    JavaScriptOptions bit-field can be set in sbbs.ini and jsexec.ini to over-ride the default JS compiler options which have been changed from 0 to (options previously only used by JSDoor):
    JIT | METHODJIT | COMPILE_N_GO | PROFILING

    * JIT - TraceMonkey
    * METHODJIT - J„gerMonkey
    * COMPILE_N_GO - compile-time scope chain resolution of consts
    * PROFILING - Choose between TraceMonkey and J„gerMonkey at compile-time based on profiling results

    Other options available but not enabled by default:
    * STRICT - warn on debious practice (i.e. similar to "use strict")
    * WERROR - convert warnings to errors
    * VAROBJFIX - use last object on scope chain as the ECMA 'variables object'
    * RELIMIT - Throw exception on any regular expression which backtracks more than n^3 times, where n is length of the input string
    * ANONFUNFIX - Disallow function () {} in statement context per ECMA-262 Edition 3.
    * METHODJIT_ALWAYS - Always whole-method JIT, don't tune at run-time.

    Also:
    - Fixed JS warning string formatting (missing space separator).
    - Removed an extraneous new-line in lprintf() call in mailsrvr.
    - Added basic assertEq() global method to jsexec, required when running SpiderMonkey test scripts.

    ---
    ž Synchronet ž Vertrauen ž Home of Synchronet ž [vert/cvs/bbs].synchro.net