Przeglądaj źródła

pastojs: refute to read olf precompiled records, comments

git-svn-id: trunk@40819 -
Mattias Gaertner 6 lat temu
rodzic
commit
64cb8424ee

+ 2 - 2
packages/pastojs/src/pas2jscompiler.pp

@@ -4253,8 +4253,8 @@ begin
   w('    m    : Enables macro replacements');
   w('    2    : Same as -Mobjfpc (default)');
   w('  -SI<x>  : Set interface style to <x>');
-  w('    -SIcom  : COM compatible interface (default)');
-  w('    -SIcorba: CORBA compatible interface');
+  w('    -SIcom  : COM, reference counted interface (default)');
+  w('    -SIcorba: CORBA interface');
   w('  -T<x>  : Set target platform');
   w('    -Tbrowser: default');
   w('    -Tnodejs : add pas.run(), includes -Jc');

+ 5 - 1
packages/pastojs/src/pas2jsfiler.pp

@@ -71,12 +71,13 @@ uses
 
 const
   PCUMagic = 'Pas2JSCache';
-  PCUVersion = 2;
+  PCUVersion = 3;
   { Version Changes:
     1: initial version
     2: - TPasProperty.ImplementsFunc:String -> Implements:TPasExprArray
        - pcsfAncestorResolved
        - removed msIgnoreInterfaces
+    3: changed records from function to objects
   }
 
   BuiltInNodeName = 'BuiltIn';
@@ -6634,6 +6635,9 @@ var
   Id: Integer;
   Scope: TPasRecordScope;
 begin
+  if FileVersion<3 then
+    RaiseMsg(20190109214718,El,'record format changed');
+
   Scope:=TPasRecordScope(Resolver.CreateScope(El,TPasRecordScope));
   El.CustomData:=Scope;
 

+ 3 - 3
utils/pas2js/docs/translation.html

@@ -199,8 +199,8 @@ Put + after a boolean switch option to enable it, - to disable it
     m     : Enables macro replacements
     2     : Same as -Mobjfpc (default)
   -SI&lt;x&gt;   : Set interface style to &lt;x&gt;
-    -SIcom   : COM compatible interface (default)
-    -SIcorba : CORBA compatible interface
+    -SIcom   : COM, reference counted interface (default)
+    -SIcorba : CORBA interface
   -T&lt;x&gt;   : Set target platform, case insensitive.
     -Tbrowser : default
     -Tnodejs  : add pas.run(), includes -Jc
@@ -734,7 +734,7 @@ function(){
         <ul>
           <li>operator overloading</li>
           <li>class constructor</li>
-          <li>COM interfaces as fields</li>
+          <li>reference counted interfaces as fields</li>
           <li>Interfaces as nested types</li>
           <li>default non array property</li>
         </ul>