|
@@ -169,6 +169,7 @@ Works:
|
|
- mode delphi: proctype:=proc
|
|
- mode delphi: proctype:=proc
|
|
- mode delphi: functype=funcresulttype
|
|
- mode delphi: functype=funcresulttype
|
|
- nested functions
|
|
- nested functions
|
|
|
|
+ - reference to
|
|
- class-of
|
|
- class-of
|
|
- assign := nil, var
|
|
- assign := nil, var
|
|
- call class method
|
|
- call class method
|
|
@@ -243,8 +244,6 @@ Works:
|
|
- use 0o for octal literals
|
|
- use 0o for octal literals
|
|
|
|
|
|
ToDos:
|
|
ToDos:
|
|
-- documentation: $mod, Self, createCallBack on method,proc,nested
|
|
|
|
-- reference to
|
|
|
|
- RTTI
|
|
- RTTI
|
|
- open array param
|
|
- open array param
|
|
- codetools function typeinfo
|
|
- codetools function typeinfo
|
|
@@ -293,8 +292,11 @@ Not in Version 1.0:
|
|
- option range checking -Cr
|
|
- option range checking -Cr
|
|
- option overflow checking -Co
|
|
- option overflow checking -Co
|
|
- optimizations:
|
|
- optimizations:
|
|
|
|
+ - add $mod only if needed
|
|
|
|
+ - add Self only if needed
|
|
- set operators on literals without temporary arrays, a in [b], [a]*b<>[]
|
|
- set operators on literals without temporary arrays, a in [b], [a]*b<>[]
|
|
- use a number for small sets
|
|
- use a number for small sets
|
|
|
|
+ - nested procs without var, instead as "function name(){}"
|
|
-O1 insert local/unit vars for global type references:
|
|
-O1 insert local/unit vars for global type references:
|
|
at start of intf var $r1;
|
|
at start of intf var $r1;
|
|
at end of impl: $r1=path;
|
|
at end of impl: $r1=path;
|
|
@@ -414,6 +416,7 @@ type
|
|
pbifnRTTINewProcSig,// rtl.newTIProcSig
|
|
pbifnRTTINewProcSig,// rtl.newTIProcSig
|
|
pbifnRTTINewProcVar,// typeinfo of tkProcVar $ProcVar
|
|
pbifnRTTINewProcVar,// typeinfo of tkProcVar $ProcVar
|
|
pbifnRTTINewRecord,// typeinfo creator of tkRecord $Record
|
|
pbifnRTTINewRecord,// typeinfo creator of tkRecord $Record
|
|
|
|
+ pbifnRTTINewRefToProcVar,// typeinfo of tkRefToProcVar $RefToProcVar
|
|
pbifnRTTINewSet,// typeinfo of tkSet $Set
|
|
pbifnRTTINewSet,// typeinfo of tkSet $Set
|
|
pbifnRTTINewStaticArray,// typeinfo of tkArray $StaticArray
|
|
pbifnRTTINewStaticArray,// typeinfo of tkArray $StaticArray
|
|
pbifnSetCharAt,
|
|
pbifnSetCharAt,
|
|
@@ -467,6 +470,7 @@ type
|
|
pbitnTIPointer,
|
|
pbitnTIPointer,
|
|
pbitnTIProcVar,
|
|
pbitnTIProcVar,
|
|
pbitnTIRecord,
|
|
pbitnTIRecord,
|
|
|
|
+ pbitnTIRefToProcVar,
|
|
pbitnTISet,
|
|
pbitnTISet,
|
|
pbitnTIStaticArray
|
|
pbitnTIStaticArray
|
|
);
|
|
);
|
|
@@ -506,6 +510,7 @@ const
|
|
'newTIProcSig',
|
|
'newTIProcSig',
|
|
'$ProcVar',
|
|
'$ProcVar',
|
|
'$Record',
|
|
'$Record',
|
|
|
|
+ '$RefToProcVar',
|
|
'$Set',
|
|
'$Set',
|
|
'$StaticArray',
|
|
'$StaticArray',
|
|
'setCharAt', // rtl.setCharAt
|
|
'setCharAt', // rtl.setCharAt
|
|
@@ -559,6 +564,7 @@ const
|
|
'tTypeInfoPointer',
|
|
'tTypeInfoPointer',
|
|
'tTypeInfoProcVar',
|
|
'tTypeInfoProcVar',
|
|
'tTypeInfoRecord',
|
|
'tTypeInfoRecord',
|
|
|
|
+ 'tTypeInfoRefToProcVar',
|
|
'tTypeInfoSet',
|
|
'tTypeInfoSet',
|
|
'tTypeInfoStaticArray'
|
|
'tTypeInfoStaticArray'
|
|
);
|
|
);
|
|
@@ -2461,7 +2467,9 @@ begin
|
|
TIName:=Pas2JSBuiltInNames[pbitnTISet]
|
|
TIName:=Pas2JSBuiltInNames[pbitnTISet]
|
|
else if C.InheritsFrom(TPasProcedureType) then
|
|
else if C.InheritsFrom(TPasProcedureType) then
|
|
begin
|
|
begin
|
|
- if TPasProcedureType(TypeEl).IsOfObject then
|
|
|
|
|
|
+ if TPasProcedureType(TypeEl).IsReferenceTo then
|
|
|
|
+ TIName:=Pas2JSBuiltInNames[pbitnTIRefToProcVar]
|
|
|
|
+ else if TPasProcedureType(TypeEl).IsOfObject then
|
|
TIName:=Pas2JSBuiltInNames[pbitnTIMethodVar]
|
|
TIName:=Pas2JSBuiltInNames[pbitnTIMethodVar]
|
|
else
|
|
else
|
|
TIName:=Pas2JSBuiltInNames[pbitnTIProcVar];
|
|
TIName:=Pas2JSBuiltInNames[pbitnTIProcVar];
|
|
@@ -7740,7 +7748,9 @@ begin
|
|
if not HasTypeInfo(El,AContext) then exit;
|
|
if not HasTypeInfo(El,AContext) then exit;
|
|
|
|
|
|
// module.$rtti.$ProcVar("name",function(){})
|
|
// module.$rtti.$ProcVar("name",function(){})
|
|
- if El.IsOfObject then
|
|
|
|
|
|
+ if El.IsReferenceTo then
|
|
|
|
+ FunName:=FBuiltInNames[pbifnRTTINewRefToProcVar]
|
|
|
|
+ else if El.IsOfObject then
|
|
FunName:=FBuiltInNames[pbifnRTTINewMethodVar]
|
|
FunName:=FBuiltInNames[pbifnRTTINewMethodVar]
|
|
else
|
|
else
|
|
FunName:=FBuiltInNames[pbifnRTTINewProcVar];
|
|
FunName:=FBuiltInNames[pbifnRTTINewProcVar];
|