mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 12:49:33 +02:00
compiler: add dispinterfaces to most of places where something is comparing to usual interfaces since they are not very different things
git-svn-id: trunk@14751 -
This commit is contained in:
parent
e82edfb0fb
commit
009ef9184d
@ -979,7 +979,7 @@ implementation
|
||||
end;
|
||||
objectdef :
|
||||
begin
|
||||
if is_class_or_interface_or_objc(def) then
|
||||
if is_class_or_interface_or_dispinterface_or_objc(def) then
|
||||
result := OS_ADDR
|
||||
else
|
||||
result:=int_cgsize(def.size);
|
||||
|
@ -219,7 +219,7 @@ implementation
|
||||
pointerdef :
|
||||
begin
|
||||
if ((rd.typ in [orddef,enumdef,pointerdef,classrefdef,procvardef]) or
|
||||
is_class_or_interface_or_objc(rd)) then
|
||||
is_class_or_interface_or_dispinterface_or_objc(rd)) then
|
||||
begin
|
||||
allowed:=false;
|
||||
exit;
|
||||
@ -850,7 +850,7 @@ implementation
|
||||
end;
|
||||
subscriptn :
|
||||
begin
|
||||
if is_class_or_interface_or_objc(tunarynode(p).left.resultdef) then
|
||||
if is_class_or_interface_or_dispinterface_or_objc(tunarynode(p).left.resultdef) then
|
||||
newstate := vs_read;
|
||||
p:=tunarynode(p).left;
|
||||
end;
|
||||
@ -1004,7 +1004,7 @@ implementation
|
||||
pointerdef :
|
||||
gotpointer:=true;
|
||||
objectdef :
|
||||
gotclass:=is_class_or_interface_or_objc(hp.resultdef);
|
||||
gotclass:=is_class_or_interface_or_dispinterface_or_objc(hp.resultdef);
|
||||
recorddef :
|
||||
gotrecord:=true;
|
||||
classrefdef :
|
||||
@ -1121,7 +1121,7 @@ implementation
|
||||
pointerdef :
|
||||
gotpointer:=true;
|
||||
objectdef :
|
||||
gotclass:=is_class_or_interface_or_objc(hp.resultdef);
|
||||
gotclass:=is_class_or_interface_or_dispinterface_or_objc(hp.resultdef);
|
||||
classrefdef :
|
||||
gotclass:=true;
|
||||
arraydef :
|
||||
@ -1218,7 +1218,7 @@ implementation
|
||||
{ a class/interface access is an implicit }
|
||||
{ dereferencing }
|
||||
hp:=tsubscriptnode(hp).left;
|
||||
if is_class_or_interface_or_objc(hp.resultdef) then
|
||||
if is_class_or_interface_or_dispinterface_or_objc(hp.resultdef) then
|
||||
gotderef:=true;
|
||||
end;
|
||||
muln,
|
||||
@ -1307,7 +1307,7 @@ implementation
|
||||
pointerdef :
|
||||
gotpointer:=true;
|
||||
objectdef :
|
||||
gotclass:=is_class_or_interface_or_objc(hp.resultdef);
|
||||
gotclass:=is_class_or_interface_or_dispinterface_or_objc(hp.resultdef);
|
||||
recorddef, { handle record like class it needs a subscription }
|
||||
classrefdef :
|
||||
gotclass:=true;
|
||||
|
@ -2704,7 +2704,7 @@ implementation
|
||||
expectloc:=LOC_FLAGS;
|
||||
end
|
||||
|
||||
else if is_class_or_interface_or_objc(ld) then
|
||||
else if is_class_or_interface_or_dispinterface_or_objc(ld) then
|
||||
begin
|
||||
expectloc:=LOC_FLAGS;
|
||||
end
|
||||
|
@ -291,7 +291,7 @@ implementation
|
||||
exit;
|
||||
paraloc1.init;
|
||||
{ classes and interfaces must be dereferenced implicitly }
|
||||
if is_class_or_interface_or_objc(left.resultdef) then
|
||||
if is_class_or_interface_or_dispinterface_or_objc(left.resultdef) then
|
||||
begin
|
||||
{ the contents of a class are aligned to a sizeof(pointer) }
|
||||
location_reset_ref(location,LOC_REFERENCE,def_cgsize(resultdef),sizeof(pint));
|
||||
|
@ -649,7 +649,7 @@ implementation
|
||||
exit;
|
||||
|
||||
{ classes must be dereferenced implicitly }
|
||||
if is_class_or_interface_or_objc(left.resultdef) then
|
||||
if is_class_or_interface_or_dispinterface_or_objc(left.resultdef) then
|
||||
expectloc:=LOC_REFERENCE
|
||||
else
|
||||
begin
|
||||
|
@ -668,7 +668,7 @@ implementation
|
||||
end;
|
||||
subscriptn:
|
||||
begin
|
||||
if is_class_or_interface_or_objc(tunarynode(p).left.resultdef) then
|
||||
if is_class_or_interface_or_dispinterface_or_objc(tunarynode(p).left.resultdef) then
|
||||
inc(result,2);
|
||||
if (result = NODE_COMPLEXITY_INF) then
|
||||
exit;
|
||||
|
@ -603,7 +603,7 @@ implementation
|
||||
typecheckpass(p);
|
||||
end;
|
||||
{ classes and interfaces have implicit dereferencing }
|
||||
hasimplicitderef:=is_class_or_interface_or_objc(p.resultdef) or
|
||||
hasimplicitderef:=is_class_or_interface_or_dispinterface_or_objc(p.resultdef) or
|
||||
(p.resultdef.typ = classrefdef);
|
||||
if hasimplicitderef then
|
||||
hdef:=p.resultdef
|
||||
|
@ -1223,7 +1223,7 @@ implementation
|
||||
end;
|
||||
|
||||
{ only allow nil for class and interface }
|
||||
if is_class_or_interface_or_objc(def) then
|
||||
if is_class_or_interface_or_dispinterface_or_objc(def) then
|
||||
begin
|
||||
n:=comp_expr(true);
|
||||
if n.nodetype<>niln then
|
||||
|
@ -1148,7 +1148,7 @@ implementation
|
||||
procvardef :
|
||||
is_intregable:=not(po_methodpointer in tprocvardef(self).procoptions);
|
||||
objectdef:
|
||||
is_intregable:=(is_class_or_interface_or_objc(self)) and not needs_inittable;
|
||||
is_intregable:=(is_class_or_interface_or_dispinterface_or_objc(self)) and not needs_inittable;
|
||||
setdef:
|
||||
is_intregable:=is_smallset(self);
|
||||
recorddef:
|
||||
|
Loading…
Reference in New Issue
Block a user