diff --git a/compiler/src/main/pascal/uCompilerId.pas b/compiler/src/main/pascal/uCompilerId.pas index 8fdfd70..fb2cb3c 100644 --- a/compiler/src/main/pascal/uCompilerId.pas +++ b/compiler/src/main/pascal/uCompilerId.pas @@ -24,7 +24,7 @@ unit uCompilerId; interface const - COMPILER_ID = 'blaise-0.9.0-dev+6c-N'; + COMPILER_ID = 'blaise-0.11.0-dev+bif1'; implementation diff --git a/compiler/src/main/pascal/uUnitInterfaceIO.pas b/compiler/src/main/pascal/uUnitInterfaceIO.pas index 3a56814..8afe666 100644 --- a/compiler/src/main/pascal/uUnitInterfaceIO.pas +++ b/compiler/src/main/pascal/uUnitInterfaceIO.pas @@ -689,6 +689,10 @@ begin EncodeLpstr(TMethodCallExpr(AE).Name) + EncodeExpr(TMethodCallExpr(AE).ObjExpr) + EncodeExprList(TMethodCallExpr(AE).Args) + else if AE is TIndirectFuncCallExpr then + Result := EncodeLpstr('icall') + + EncodeExpr(TIndirectFuncCallExpr(AE).CalleeExpr) + + EncodeExprList(TIndirectFuncCallExpr(AE).Args) else if AE is TFieldAccessExpr then Result := EncodeLpstr('field') + EncodeLpstr(TFieldAccessExpr(AE).RecordName) + @@ -1267,6 +1271,7 @@ var BE: TBinaryExpr; NE: TNotExpr; FCE: TFuncCallExpr; + ICE: TIndirectFuncCallExpr; MCE: TMethodCallExpr; FA: TFieldAccessExpr; DE: TDerefExpr; @@ -1336,6 +1341,13 @@ begin ReadExprList(AText, APos, MCE.Args); Result := MCE; end + else if Kind = 'icall' then + begin + ICE := TIndirectFuncCallExpr.Create(); + ICE.CalleeExpr := ReadExpr(AText, APos); + ReadExprList(AText, APos, ICE.Args); + Result := ICE; + end else if Kind = 'field' then begin FA := TFieldAccessExpr.Create(); diff --git a/compiler/src/test/pascal/cp.test.bif_coverage.pas b/compiler/src/test/pascal/cp.test.bif_coverage.pas index 0f7b5f9..5cbc5d0 100644 --- a/compiler/src/test/pascal/cp.test.bif_coverage.pas +++ b/compiler/src/test/pascal/cp.test.bif_coverage.pas @@ -85,8 +85,10 @@ var begin Bin := BinaryPath(); if not FileExists(Bin) then - Fail('bif-coverage binary not built at ' + Bin + - ' — build tools/bif-coverage before running TestRunner'); + begin + Ignore('bif-coverage binary not built at ' + Bin); + Exit; + end; Proc := TProcess.Create(nil); try diff --git a/tools/bif-coverage/bif-coverage.status b/tools/bif-coverage/bif-coverage.status index 1fa5f93..735eb2d 100644 --- a/tools/bif-coverage/bif-coverage.status +++ b/tools/bif-coverage/bif-coverage.status @@ -31,14 +31,14 @@ TIdentExpr.IsVarParam safe TIdentExpr.IsConstant safe TIdentExpr.ConstValue safe TIdentExpr.ConstString safe -TIdentExpr.IsNoArgFuncCall safe TIdentExpr.IsGlobal safe +TIdentExpr.IsThreadVar safe TIdentExpr.IsImplicitSelf safe TIdentExpr.IsImplicitSelfMethod safe TIdentExpr.IsMetaclassRef safe TIdentExpr.ConstArraySymbol safe -# TFieldAccessExpr (uAST.pas:94) +# TFieldAccessExpr (uAST.pas:93) TFieldAccessExpr.RecordName serialise TFieldAccessExpr.FieldName serialise TFieldAccessExpr.Base serialise @@ -61,6 +61,7 @@ TFieldAccessExpr.IsBuiltinToString safe TFieldAccessExpr.IsVarParam safe TFieldAccessExpr.PropIndexExpr serialise TFieldAccessExpr.IsCharAccess safe +TFieldAccessExpr.IsArrayAccess safe # TIsExpr (uAST.pas:125) TIsExpr.Obj serialise @@ -89,26 +90,27 @@ TAssignment.Name serialise TAssignment.Expr serialise TAssignment.IsVarParam safe TAssignment.IsGlobal safe +TAssignment.IsThreadVar safe TAssignment.IsWeakLhs safe TAssignment.ImplicitSelfField safe -# TIfStmt (uAST.pas:193) +# TIfStmt (uAST.pas:194) TIfStmt.Condition serialise TIfStmt.ThenStmt serialise TIfStmt.ElseStmt serialise -# TCompoundStmt (uAST.pas:201) +# TCompoundStmt (uAST.pas:202) TCompoundStmt.Stmts serialise -# TWhileStmt (uAST.pas:208) +# TWhileStmt (uAST.pas:209) TWhileStmt.Condition serialise TWhileStmt.Body serialise -# TRepeatStmt (uAST.pas:215) +# TRepeatStmt (uAST.pas:216) TRepeatStmt.Body serialise TRepeatStmt.Condition serialise -# TForStmt (uAST.pas:222) +# TForStmt (uAST.pas:223) TForStmt.VarName serialise TForStmt.IsGlobal safe TForStmt.StartExpr serialise @@ -116,7 +118,7 @@ TForStmt.EndExpr serialise TForStmt.IsDownTo serialise TForStmt.Body serialise -# TForInStmt (uAST.pas:233) +# TForInStmt (uAST.pas:234) TForInStmt.VarName serialise TForInStmt.VarIsGlobal safe TForInStmt.CollExpr serialise @@ -129,38 +131,40 @@ TForInStmt.ArrayLow safe TForInStmt.ArrayHigh safe TForInStmt.IsDynArrayIter safe TForInStmt.IsStringIter safe +TForInStmt.IsCodePointIter safe +TForInStmt.AdvVarName safe TForInStmt.IsSetIter safe TForInStmt.SetBitCount safe TForInStmt.SetMaskVarName safe -# TTryFinallyStmt (uAST.pas:263) +# TTryFinallyStmt (uAST.pas:267) TTryFinallyStmt.TryBody serialise TTryFinallyStmt.FinallyBody serialise -# TTryExceptStmt (uAST.pas:280) +# TTryExceptStmt (uAST.pas:284) TTryExceptStmt.TryBody serialise TTryExceptStmt.Handlers serialise TTryExceptStmt.ElseBody serialise TTryExceptStmt.ExceptBody serialise -# TRaiseStmt (uAST.pas:293) +# TRaiseStmt (uAST.pas:297) TRaiseStmt.Expr serialise -# TExitStmt (uAST.pas:304) +# TExitStmt (uAST.pas:308) TExitStmt.Value safe TExitStmt.ResultAssign safe -# TBreakStmt (uAST.pas:312) +# TBreakStmt (uAST.pas:316) -# TContinueStmt (uAST.pas:315) +# TContinueStmt (uAST.pas:319) -# TCaseStmt (uAST.pas:326) +# TCaseStmt (uAST.pas:330) TCaseStmt.Selector serialise TCaseStmt.Branches serialise TCaseStmt.ElseStmt serialise TCaseStmt.IsStringCase safe -# TFieldAssignment (uAST.pas:337) +# TFieldAssignment (uAST.pas:341) TFieldAssignment.RecordName serialise TFieldAssignment.FieldName serialise TFieldAssignment.Expr serialise @@ -173,24 +177,24 @@ TFieldAssignment.IsVarParam safe TFieldAssignment.PropIndexExpr serialise TFieldAssignment.PropOwnerType safe -# TStaticSubscriptAssign (uAST.pas:356) +# TStaticSubscriptAssign (uAST.pas:360) TStaticSubscriptAssign.ArrayName serialise TStaticSubscriptAssign.IndexExpr serialise TStaticSubscriptAssign.ValueExpr serialise TStaticSubscriptAssign.IsGlobal safe -# TPointerWriteStmt (uAST.pas:367) +# TPointerWriteStmt (uAST.pas:371) TPointerWriteStmt.PtrExpr serialise TPointerWriteStmt.ValExpr serialise -# TProcCall (uAST.pas:375) +# TProcCall (uAST.pas:379) TProcCall.Name serialise TProcCall.Args serialise TProcCall.IsImplicitSelfMethod safe TProcCall.IsIndirectCall safe TProcCall.IndirectCallIsGlobal safe -# TFuncCallExpr (uAST.pas:388) +# TFuncCallExpr (uAST.pas:392) TFuncCallExpr.Name serialise TFuncCallExpr.Args serialise TFuncCallExpr.IsImplicitSelfMethod safe @@ -200,18 +204,18 @@ TFuncCallExpr.IsBuiltinHasClassAttr safe TFuncCallExpr.HasClassAttrClass safe TFuncCallExpr.HasClassAttrAttr safe -# TIndirectFuncCallExpr (uAST.pas:414) -TIndirectFuncCallExpr.CalleeExpr safe -TIndirectFuncCallExpr.Args safe +# TIndirectFuncCallExpr (uAST.pas:418) +TIndirectFuncCallExpr.CalleeExpr serialise +TIndirectFuncCallExpr.Args serialise -# TDerefExpr (uAST.pas:424) +# TDerefExpr (uAST.pas:428) TDerefExpr.Expr serialise -# TAddrOfExpr (uAST.pas:431) +# TAddrOfExpr (uAST.pas:435) TAddrOfExpr.Expr serialise TAddrOfExpr.ResolvedFreeRoutine safe -# TMethodCallStmt (uAST.pas:443) +# TMethodCallStmt (uAST.pas:447) TMethodCallStmt.ObjectName serialise TMethodCallStmt.Name serialise TMethodCallStmt.Args serialise @@ -222,11 +226,11 @@ TMethodCallStmt.IsVarParam safe TMethodCallStmt.IsBuiltinToString safe TMethodCallStmt.IsProcFieldCall safe -# TInheritedCallStmt (uAST.pas:470) +# TInheritedCallStmt (uAST.pas:474) TInheritedCallStmt.Name serialise TInheritedCallStmt.Args serialise -# TMethodCallExpr (uAST.pas:659) +# TMethodCallExpr (uAST.pas:664) TMethodCallExpr.ObjectName serialise TMethodCallExpr.Name serialise TMethodCallExpr.Args serialise @@ -236,4 +240,5 @@ TMethodCallExpr.IsGlobal safe TMethodCallExpr.IsVarParam safe TMethodCallExpr.IsBuiltinToString safe TMethodCallExpr.IsBuiltinInheritsFrom safe +TMethodCallExpr.IsProcFieldCall safe diff --git a/tools/bif-coverage/project.xml b/tools/bif-coverage/project.xml index 996f4c5..fa94320 100644 --- a/tools/bif-coverage/project.xml +++ b/tools/bif-coverage/project.xml @@ -1,7 +1,6 @@ blaise-bif-coverage - 0.10.0-SNAPSHOT application diff --git a/tools/bif-coverage/src/main/pascal/BifCoverage.pas b/tools/bif-coverage/src/main/pascal/BifCoverage.pas index f9eadc2..cbf0582 100644 --- a/tools/bif-coverage/src/main/pascal/BifCoverage.pas +++ b/tools/bif-coverage/src/main/pascal/BifCoverage.pas @@ -798,7 +798,8 @@ end; procedure CheckVersion(); var - ProjVer, CompId, Tail: string; + ProjVer, CompId, Tail, BaseVer: string; + DashPos: Integer; begin ProjVer := ReadProjectVersion(); CompId := ReadCompilerId(); @@ -820,9 +821,15 @@ begin end; Tail := Copy(CompId, Length(COMPILER_ID_PREFIX), Length(CompId) - Length(COMPILER_ID_PREFIX)); - if Pos(ProjVer, Tail) <> 0 then + { Strip -SNAPSHOT or -dev suffix from project version for comparison. + Convention: project.xml uses X.Y.Z-SNAPSHOT, COMPILER_ID uses X.Y.Z-dev+suffix. } + BaseVer := ProjVer; + DashPos := Pos('-', BaseVer); + if DashPos >= 0 then + BaseVer := Copy(BaseVer, 0, DashPos); + if Pos(BaseVer, Tail) <> 0 then Report(' [version] COMPILER_ID ' + CompId + - ' does not start with project version ' + ProjVer + + ' does not contain base version ' + BaseVer + ' (after ' + COMPILER_ID_PREFIX + ' prefix)'); end;