Browse Source

* Changed the WebAssembly exception mode switches:
-CTwasmexceptions becomes -CTlegacyexceptions
-CTexnrefexceptions becomes -CTwasmexceptions
In other words, -CTwasmexceptions now selects the newer exnref exceptions
proposal, while the previous exceptions mode (which retains compatibility with
earlier browser versions) is still available as -CTlegacyexceptions.

Nikolay Nikolov 3 days ago
parent
commit
d766dbca4e
2 changed files with 4 additions and 3 deletions
  1. 2 2
      compiler/globtype.pas
  2. 2 1
      compiler/msg/errore.msg

+ 2 - 2
compiler/globtype.pas

@@ -476,8 +476,8 @@ interface
          (name: 'FARPROCSPUSHODDBP';   hasvalue: false; isglobal: false; define: 'FPC_FAR_PROCS_PUSH_ODD_BP'),
          (name: 'FARPROCSPUSHODDBP';   hasvalue: false; isglobal: false; define: 'FPC_FAR_PROCS_PUSH_ODD_BP'),
          (name: 'NOEXCEPTIONS';        hasvalue: false; isglobal: true ; define: 'FPC_WASM_NO_EXCEPTIONS'),
          (name: 'NOEXCEPTIONS';        hasvalue: false; isglobal: true ; define: 'FPC_WASM_NO_EXCEPTIONS'),
          (name: 'BFEXCEPTIONS';        hasvalue: false; isglobal: true ; define: 'FPC_WASM_BRANCHFUL_EXCEPTIONS'),
          (name: 'BFEXCEPTIONS';        hasvalue: false; isglobal: true ; define: 'FPC_WASM_BRANCHFUL_EXCEPTIONS'),
-         (name: 'EXNREFEXCEPTIONS';    hasvalue: false; isglobal: true ; define: 'FPC_WASM_EXNREF_EXCEPTIONS'),
-         (name: 'WASMEXCEPTIONS';      hasvalue: false; isglobal: true ; define: 'FPC_WASM_LEGACY_EXCEPTIONS'),
+         (name: 'WASMEXCEPTIONS';      hasvalue: false; isglobal: true ; define: 'FPC_WASM_EXNREF_EXCEPTIONS'),
+         (name: 'LEGACYEXCEPTIONS';    hasvalue: false; isglobal: true ; define: 'FPC_WASM_LEGACY_EXCEPTIONS'),
          (name: 'WASMTHREADS';         hasvalue: false; isglobal: true ; define: 'FPC_WASM_THREADS'),
          (name: 'WASMTHREADS';         hasvalue: false; isglobal: true ; define: 'FPC_WASM_THREADS'),
          (name: 'SATURATINGFLOATTOINT';hasvalue: false; isglobal: false; define: 'FPC_WASM_SATURATING_FLOAT_TO_INT')
          (name: 'SATURATINGFLOATTOINT';hasvalue: false; isglobal: false; define: 'FPC_WASM_SATURATING_FLOAT_TO_INT')
        );
        );

+ 2 - 1
compiler/msg/errore.msg

@@ -4161,7 +4161,8 @@ J*3CTlowercaseprocstart_  Lowercase the first character of procedure/function/me
 A*3CTthumbinterworking_ Generate Thumb interworking-safe code if possible
 A*3CTthumbinterworking_ Generate Thumb interworking-safe code if possible
 W*3CTnoexceptions_        Disable the exception support. Raising an exception will abort the program.
 W*3CTnoexceptions_        Disable the exception support. Raising an exception will abort the program.
 W*3CTbfexceptions_        Enable the branchful exception support for WebAssembly
 W*3CTbfexceptions_        Enable the branchful exception support for WebAssembly
-W*3CTwasmexceptions_      Enable the native WebAssembly exceptions support
+W*3CTwasmexceptions_      Enable the native WebAssembly exceptions support (current proposal - exceptions with exnref)
+W*3CTlegacyexceptions_    Enable the native WebAssembly exceptions support (legacy proposal, compatible with earlier browser versions)
 W*3CTwasmthreads_         Enable WebAssembly threads support (experimental)
 W*3CTwasmthreads_         Enable WebAssembly threads support (experimental)
 W*3CTsaturatingfloattoint_ Use saturating (non-trapping) float-to-int conversion instructions
 W*3CTsaturatingfloattoint_ Use saturating (non-trapping) float-to-int conversion instructions
 J*2Cv_Var/out parameter copy-out checking
 J*2Cv_Var/out parameter copy-out checking