mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 18:09:27 +02:00
fcl-passrc: renamed bsMethodCallChecks to bsObjectChecks
git-svn-id: trunk@38008 -
This commit is contained in:
parent
37a9467603
commit
afb4add9c7
@ -303,7 +303,7 @@ type
|
||||
bsWarnings,
|
||||
bsMacro,
|
||||
bsScopedEnums,
|
||||
bsMethodCallChecks // check type of Self
|
||||
bsObjectChecks // check methods 'Self' and object type casts
|
||||
);
|
||||
TBoolSwitches = set of TBoolSwitch;
|
||||
const
|
||||
@ -972,7 +972,7 @@ const
|
||||
'Warnings',
|
||||
'Macro',
|
||||
'ScopedEnums',
|
||||
'MethodCallChecks'
|
||||
'ObjectChecks'
|
||||
);
|
||||
|
||||
const
|
||||
|
@ -854,7 +854,7 @@ const
|
||||
bsWarnings,
|
||||
bsMacro,
|
||||
bsScopedEnums,
|
||||
bsMethodCallChecks
|
||||
bsObjectChecks
|
||||
];
|
||||
|
||||
btAllJSBaseTypes = [
|
||||
@ -5981,7 +5981,7 @@ begin
|
||||
|
||||
Result:=ConvertElement(Param,AContext);
|
||||
|
||||
if bsMethodCallChecks in AContext.ScannerBoolSwitches then
|
||||
if bsObjectChecks in AContext.ScannerBoolSwitches then
|
||||
begin
|
||||
if (C=TPasClassType)
|
||||
or (C=TPasClassOfType) then
|
||||
@ -9256,7 +9256,7 @@ begin
|
||||
end;
|
||||
|
||||
BodyPas:=ImplProc.Body;
|
||||
if (BodyPas<>nil) or (bsMethodCallChecks in ImplProcScope.ScannerBoolSwitches) then
|
||||
if (BodyPas<>nil) or (bsObjectChecks in ImplProcScope.ScannerBoolSwitches) then
|
||||
begin
|
||||
PosEl:=BodyPas;
|
||||
if PosEl=nil then
|
||||
@ -9271,7 +9271,7 @@ begin
|
||||
begin
|
||||
// method or class method
|
||||
FuncContext.ThisPas:=ProcScope.ClassScope.Element;
|
||||
if bsMethodCallChecks in FuncContext.ScannerBoolSwitches then
|
||||
if bsObjectChecks in FuncContext.ScannerBoolSwitches then
|
||||
begin
|
||||
// rtl.checkMethodCall(this,<class>)
|
||||
Call:=CreateCallExpression(PosEl);
|
||||
|
@ -89,9 +89,9 @@ type
|
||||
coShowUsedTools,
|
||||
coShowMessageNumbers, // not in "show all"
|
||||
coShowDebug, // not in "show all"
|
||||
coOverflowChecking,
|
||||
coRangeChecking,
|
||||
coMethodCallChecking,
|
||||
coOverflowChecks,
|
||||
coRangeChecks,
|
||||
coObjectChecks,
|
||||
coAssertions,
|
||||
coAllowCAssignments,
|
||||
coLowerCase,
|
||||
@ -719,12 +719,12 @@ begin
|
||||
Scanner.CurrentModeSwitches:=p2jsMode_SwitchSets[Compiler.Mode];
|
||||
Scanner.AllowedBoolSwitches:=msAllPas2jsBoolSwitches;
|
||||
bs:=[];
|
||||
if coOverflowChecking in Compiler.Options then
|
||||
if coOverflowChecks in Compiler.Options then
|
||||
Include(bs,bsOverflowChecks);
|
||||
if coRangeChecking in Compiler.Options then
|
||||
if coRangeChecks in Compiler.Options then
|
||||
Include(bs,bsRangeChecks);
|
||||
if coMethodCallChecking in Compiler.Options then
|
||||
Include(bs,bsMethodCallChecks);
|
||||
if coObjectChecks in Compiler.Options then
|
||||
Include(bs,bsObjectChecks);
|
||||
if coAssertions in Compiler.Options then
|
||||
Include(bs,bsAssertions);
|
||||
if coShowHints in Compiler.Options then
|
||||
@ -2618,16 +2618,16 @@ begin
|
||||
ReadSingleLetterOptions(Param,p,'orR',Enabled,Disabled);
|
||||
for i:=1 to length(Enabled) do begin
|
||||
case Enabled[i] of
|
||||
'o': Options:=Options+[coOverflowChecking];
|
||||
'r': Options:=Options+[coRangeChecking];
|
||||
'R': Options:=Options+[coMethodCallChecking];
|
||||
'o': Options:=Options+[coOverflowChecks];
|
||||
'r': Options:=Options+[coRangeChecks];
|
||||
'R': Options:=Options+[coObjectChecks];
|
||||
end;
|
||||
end;
|
||||
for i:=1 to length(Disabled) do begin
|
||||
case Disabled[i] of
|
||||
'o': Options:=Options-[coOverflowChecking];
|
||||
'r': Options:=Options-[coRangeChecking];
|
||||
'R': Options:=Options-[coMethodCallChecking];
|
||||
'o': Options:=Options-[coOverflowChecks];
|
||||
'r': Options:=Options-[coRangeChecks];
|
||||
'R': Options:=Options-[coObjectChecks];
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@ -3149,7 +3149,7 @@ begin
|
||||
l(' -C<x> : Code generation options. <x> is a combination of the following letters:');
|
||||
l(' o : Overflow checking');
|
||||
l(' r : Range checking');
|
||||
l(' R : Verify object method calls and object type casts');
|
||||
l(' R : Object checks. Verify method calls and object type casts.');
|
||||
l(' -F... Set file names and paths:');
|
||||
l(' -Fe<x> : Redirect output to <x>. UTF-8 encoded.');
|
||||
l(' -Fi<x> : Add <x> to include paths');
|
||||
|
@ -131,7 +131,7 @@ Put + after a boolean switch option to enable it, - to disable it
|
||||
-C<x> : Code generation options. <x> is a combination of the following letters:
|
||||
o : Overflow checking
|
||||
r : Range checking
|
||||
R : Verify object method call and object type casts
|
||||
R : Object checks. Verify method calls and object type casts.
|
||||
-F... Set file names and paths:
|
||||
-Fe<x> : Redirect output to <x>
|
||||
-Fi<x> : Add <x> to include paths
|
||||
@ -2380,10 +2380,11 @@ End.
|
||||
Note that <i>new Boolean(false)</i> is not <i>null</i> and the condition is true.
|
||||
</li>
|
||||
<li><i>function Assigned(V: jsvalue): boolean</i> returns true if<br>
|
||||
<i>(V!=undefined) && (V!=null) && (!rtl.isArray(V) || (V.length > 0))</i></li>
|
||||
<i>(V!=undefined) && (V!=null) && (!rtl.isArray(V) || (V.length > 0))</i></li>
|
||||
<li><i>function StrictEqual(const A: jsvalue; const B): boolean</i></li>
|
||||
<li><i>function StrictInequal(const A: jsvalue; const B): boolean</i></li>
|
||||
<li>Any array can be assigned to an <i>array of jsvalue</i>.</li>
|
||||
<li>is-operator: <i>jsvalue is class-type</i>, <i>jsvalue is class-of-type</i><br>
|
||||
<li>The unit JS provides many utility functions for JSValue, like <i>hasString,
|
||||
hasValue, isBoolean, isNumber, isInteger, isObject, isClass, isClassInstance, etc..</i></li>
|
||||
</ul>
|
||||
|
Loading…
Reference in New Issue
Block a user