mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 23:42:34 +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;
|
end;
|
||||||
objectdef :
|
objectdef :
|
||||||
begin
|
begin
|
||||||
if is_class_or_interface_or_objc(def) then
|
if is_class_or_interface_or_dispinterface_or_objc(def) then
|
||||||
result := OS_ADDR
|
result := OS_ADDR
|
||||||
else
|
else
|
||||||
result:=int_cgsize(def.size);
|
result:=int_cgsize(def.size);
|
||||||
|
@ -219,7 +219,7 @@ implementation
|
|||||||
pointerdef :
|
pointerdef :
|
||||||
begin
|
begin
|
||||||
if ((rd.typ in [orddef,enumdef,pointerdef,classrefdef,procvardef]) or
|
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
|
begin
|
||||||
allowed:=false;
|
allowed:=false;
|
||||||
exit;
|
exit;
|
||||||
@ -850,7 +850,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
subscriptn :
|
subscriptn :
|
||||||
begin
|
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;
|
newstate := vs_read;
|
||||||
p:=tunarynode(p).left;
|
p:=tunarynode(p).left;
|
||||||
end;
|
end;
|
||||||
@ -1004,7 +1004,7 @@ implementation
|
|||||||
pointerdef :
|
pointerdef :
|
||||||
gotpointer:=true;
|
gotpointer:=true;
|
||||||
objectdef :
|
objectdef :
|
||||||
gotclass:=is_class_or_interface_or_objc(hp.resultdef);
|
gotclass:=is_class_or_interface_or_dispinterface_or_objc(hp.resultdef);
|
||||||
recorddef :
|
recorddef :
|
||||||
gotrecord:=true;
|
gotrecord:=true;
|
||||||
classrefdef :
|
classrefdef :
|
||||||
@ -1121,7 +1121,7 @@ implementation
|
|||||||
pointerdef :
|
pointerdef :
|
||||||
gotpointer:=true;
|
gotpointer:=true;
|
||||||
objectdef :
|
objectdef :
|
||||||
gotclass:=is_class_or_interface_or_objc(hp.resultdef);
|
gotclass:=is_class_or_interface_or_dispinterface_or_objc(hp.resultdef);
|
||||||
classrefdef :
|
classrefdef :
|
||||||
gotclass:=true;
|
gotclass:=true;
|
||||||
arraydef :
|
arraydef :
|
||||||
@ -1218,7 +1218,7 @@ implementation
|
|||||||
{ a class/interface access is an implicit }
|
{ a class/interface access is an implicit }
|
||||||
{ dereferencing }
|
{ dereferencing }
|
||||||
hp:=tsubscriptnode(hp).left;
|
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;
|
gotderef:=true;
|
||||||
end;
|
end;
|
||||||
muln,
|
muln,
|
||||||
@ -1307,7 +1307,7 @@ implementation
|
|||||||
pointerdef :
|
pointerdef :
|
||||||
gotpointer:=true;
|
gotpointer:=true;
|
||||||
objectdef :
|
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 }
|
recorddef, { handle record like class it needs a subscription }
|
||||||
classrefdef :
|
classrefdef :
|
||||||
gotclass:=true;
|
gotclass:=true;
|
||||||
|
@ -2704,7 +2704,7 @@ implementation
|
|||||||
expectloc:=LOC_FLAGS;
|
expectloc:=LOC_FLAGS;
|
||||||
end
|
end
|
||||||
|
|
||||||
else if is_class_or_interface_or_objc(ld) then
|
else if is_class_or_interface_or_dispinterface_or_objc(ld) then
|
||||||
begin
|
begin
|
||||||
expectloc:=LOC_FLAGS;
|
expectloc:=LOC_FLAGS;
|
||||||
end
|
end
|
||||||
|
@ -291,7 +291,7 @@ implementation
|
|||||||
exit;
|
exit;
|
||||||
paraloc1.init;
|
paraloc1.init;
|
||||||
{ classes and interfaces must be dereferenced implicitly }
|
{ 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
|
begin
|
||||||
{ the contents of a class are aligned to a sizeof(pointer) }
|
{ the contents of a class are aligned to a sizeof(pointer) }
|
||||||
location_reset_ref(location,LOC_REFERENCE,def_cgsize(resultdef),sizeof(pint));
|
location_reset_ref(location,LOC_REFERENCE,def_cgsize(resultdef),sizeof(pint));
|
||||||
|
@ -649,7 +649,7 @@ implementation
|
|||||||
exit;
|
exit;
|
||||||
|
|
||||||
{ classes must be dereferenced implicitly }
|
{ 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
|
expectloc:=LOC_REFERENCE
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
@ -668,7 +668,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
subscriptn:
|
subscriptn:
|
||||||
begin
|
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);
|
inc(result,2);
|
||||||
if (result = NODE_COMPLEXITY_INF) then
|
if (result = NODE_COMPLEXITY_INF) then
|
||||||
exit;
|
exit;
|
||||||
|
@ -603,7 +603,7 @@ implementation
|
|||||||
typecheckpass(p);
|
typecheckpass(p);
|
||||||
end;
|
end;
|
||||||
{ classes and interfaces have implicit dereferencing }
|
{ 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);
|
(p.resultdef.typ = classrefdef);
|
||||||
if hasimplicitderef then
|
if hasimplicitderef then
|
||||||
hdef:=p.resultdef
|
hdef:=p.resultdef
|
||||||
|
@ -1223,7 +1223,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{ only allow nil for class and interface }
|
{ 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
|
begin
|
||||||
n:=comp_expr(true);
|
n:=comp_expr(true);
|
||||||
if n.nodetype<>niln then
|
if n.nodetype<>niln then
|
||||||
|
@ -1148,7 +1148,7 @@ implementation
|
|||||||
procvardef :
|
procvardef :
|
||||||
is_intregable:=not(po_methodpointer in tprocvardef(self).procoptions);
|
is_intregable:=not(po_methodpointer in tprocvardef(self).procoptions);
|
||||||
objectdef:
|
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:
|
setdef:
|
||||||
is_intregable:=is_smallset(self);
|
is_intregable:=is_smallset(self);
|
||||||
recorddef:
|
recorddef:
|
||||||
|
Loading…
Reference in New Issue
Block a user