+ some simplify support for ttypeconvnode

git-svn-id: trunk@2774 -
This commit is contained in:
Jonas Maebe 2006-03-05 21:38:05 +00:00
parent 785550d7e3
commit 5fbc345674

View File

@ -48,6 +48,7 @@ interface
procedure printnodeinfo(var t : text);override;
function pass_1 : tnode;override;
function det_resulttype:tnode;override;
function simplify:tnode; override;
procedure mark_write;override;
function docompare(p: tnode) : boolean; override;
function assign_allowed:boolean;
@ -1634,6 +1635,20 @@ implementation
CGMessage(type_w_pointer_to_longint_conv_not_portable);
end;
result := simplify;
if assigned(result) then
exit;
{ now call the resulttype helper to do constant folding }
result:=resulttype_call_helper(convtype);
end;
function ttypeconvnode.simplify: tnode;
var
hp: tnode;
begin
result := nil;
{ Constant folding and other node transitions to
remove the typeconv node }
case left.nodetype of
@ -1714,11 +1729,9 @@ implementation
end;
end;
end;
{ now call the resulttype helper to do constant folding }
result:=resulttype_call_helper(convtype);
end;
procedure Ttypeconvnode.mark_write;
begin