浏览代码

* forgot to commit in previous revision

git-svn-id: trunk@9365 -
Jonas Maebe 17 年之前
父节点
当前提交
46e1bec6de
共有 1 个文件被更改,包括 6 次插入4 次删除
  1. 6 4
      compiler/rautils.pas

+ 6 - 4
compiler/rautils.pas

@@ -104,7 +104,7 @@ type
     Function  SetupSelf:boolean;
     Function  SetupSelf:boolean;
     Function  SetupOldEBP:boolean;
     Function  SetupOldEBP:boolean;
     Function  SetupVar(const s:string;GetOffset : boolean): Boolean;
     Function  SetupVar(const s:string;GetOffset : boolean): Boolean;
-    Procedure CheckOperand; virtual;
+    Function  CheckOperand: boolean; virtual;
     Procedure InitRef;
     Procedure InitRef;
   end;
   end;
   TCOperand = class of TOperand;
   TCOperand = class of TOperand;
@@ -118,7 +118,8 @@ type
     constructor create(optype : tcoperand);virtual;
     constructor create(optype : tcoperand);virtual;
     destructor  destroy;override;
     destructor  destroy;override;
     { converts the instruction to an instruction how it's used by the assembler writer
     { converts the instruction to an instruction how it's used by the assembler writer
-      and concats it to the passed list, the newly created item is returned }
+      and concats it to the passed list. The newly created item is returned if the 
+      instruction was valid, otherwise nil is returned }
     function ConcatInstruction(p:TAsmList) : tai;virtual;
     function ConcatInstruction(p:TAsmList) : tai;virtual;
     Procedure Swapoperands;
     Procedure Swapoperands;
   end;
   end;
@@ -966,12 +967,13 @@ Begin
   end;
   end;
 end;
 end;
 
 
-Procedure TOperand.CheckOperand;
+Function TOperand.CheckOperand: boolean;
 {*********************************************************************}
 {*********************************************************************}
 {  Description: This routine checks if the operand is of              }
 {  Description: This routine checks if the operand is of              }
-{  valid. Does nothing by default.                                    }
+{  valid, and returns false if it isn't. Does nothing by default.     }
 {*********************************************************************}
 {*********************************************************************}
 begin
 begin
+  result:=true;
 end;
 end;