浏览代码

* support changing the tai field of a tai_simpletypedconst afterwards,
so we can insert type conversions in llvmtype if necessary

git-svn-id: trunk@30780 -

Jonas Maebe 10 年之前
父节点
当前提交
65bcfdc42d
共有 1 个文件被更改,包括 9 次插入1 次删除
  1. 9 1
      compiler/aasmcnst.pas

+ 9 - 1
compiler/aasmcnst.pas

@@ -52,11 +52,13 @@ type
 
 
    { a simple data element; the value is stored as a tai }
    { a simple data element; the value is stored as a tai }
    tai_simpletypedconst = class(tai_abstracttypedconst)
    tai_simpletypedconst = class(tai_abstracttypedconst)
+   private
+     procedure setval(AValue: tai);
     protected
     protected
      fval: tai;
      fval: tai;
     public
     public
      constructor create(_adetyp: ttypedconstkind; _def: tdef; _val: tai);
      constructor create(_adetyp: ttypedconstkind; _def: tdef; _val: tai);
-     property val: tai read fval;
+     property val: tai read fval write setval;
    end;
    end;
 
 
 
 
@@ -492,6 +494,12 @@ implementation
                                 tai_simpletypedconst
                                 tai_simpletypedconst
  ****************************************************************************}
  ****************************************************************************}
 
 
+    procedure tai_simpletypedconst.setval(AValue: tai);
+      begin
+        fval:=AValue;
+      end;
+
+
    constructor tai_simpletypedconst.create(_adetyp: ttypedconstkind; _def: tdef; _val: tai);
    constructor tai_simpletypedconst.create(_adetyp: ttypedconstkind; _def: tdef; _val: tai);
      begin
      begin
        inherited create(_adetyp,_def);
        inherited create(_adetyp,_def);