Explorar o código

+ print an error message, in case 'promising' exports are used on non-WebAssembly platform

Nikolay Nikolov %!s(int64=2) %!d(string=hai) anos
pai
achega
f800e40595
Modificáronse 4 ficheiros con 404 adicións e 391 borrados
  1. 2 1
      compiler/msg/errore.msg
  2. 3 2
      compiler/msgidx.inc
  3. 393 388
      compiler/msgtxt.inc
  4. 6 0
      compiler/pexports.pas

+ 2 - 1
compiler/msg/errore.msg

@@ -445,7 +445,7 @@ scan_e_unexpected_endif=02108_E_$ENDIF directive found without a matching $IF(N)
 #
 # Parser
 #
-# 03366 is the last used one
+# 03367 is the last used one
 #
 % \section{Parser messages}
 % This section lists all parser messages. The parser takes care of the
@@ -1645,6 +1645,7 @@ parser_w_ignoring_published_property=03365_W_This property will not be published
 % no sense are not supported
 % Declarations like \var{var i: Integer absolute i;} are not allowed
 parser_e_wasm_ref_types_can_only_be_passed_by_value=03366_E_WebAssembly reference types can only be passed by value
+parser_e_promising_exports_not_supported_on_current_platform=03367_E_Declaring exports as 'promising' is WebAssembly-specific and is not supported on the current platform
 %
 % \end{description}
 %

+ 3 - 2
compiler/msgidx.inc

@@ -480,6 +480,7 @@ const
   parser_e_syscall_format_not_support=03364;
   parser_w_ignoring_published_property=03365;
   parser_e_wasm_ref_types_can_only_be_passed_by_value=03366;
+  parser_e_promising_exports_not_supported_on_current_platform=03367;
   type_e_mismatch=04000;
   type_e_incompatible_types=04001;
   type_e_not_equal_types=04002;
@@ -1159,9 +1160,9 @@ const
   option_info=11024;
   option_help_pages=11025;
 
-  MsgTxtSize = 90741;
+  MsgTxtSize = 90851;
 
   MsgIdxMax : array[1..20] of longint=(
-    28,109,367,133,100,63,148,38,223,71,
+    28,109,368,133,100,63,148,38,223,71,
     65,20,30,1,1,1,1,1,1,1
   );

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 393 - 388
compiler/msgtxt.inc


+ 6 - 0
compiler/pexports.pas

@@ -186,6 +186,12 @@ implementation
                              include(options,eo_promising_last)
                            else
                              include(options,eo_promising_first);
+                         end
+                       else
+                         begin
+                           Message(parser_e_promising_exports_not_supported_on_current_platform);
+                           if not try_to_consume(_FIRST) then
+                             try_to_consume(_LAST);
                          end;
                      end;
                     if (DefString<>'') and UseDeffileForExports then

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio