浏览代码

- removed get_jumpbuf_size/align, use rec_jmp_buf instead

git-svn-id: branches/hlcgllvm@28371 -
Jonas Maebe 11 年之前
父节点
当前提交
142d5d6d06
共有 4 个文件被更改,包括 4 次插入26 次删除
  1. 1 8
      compiler/globals.pas
  2. 1 2
      compiler/ncgutil.pas
  3. 2 2
      compiler/nflw.pas
  4. 0 14
      compiler/symtable.pas

+ 1 - 8
compiler/globals.pas

@@ -323,9 +323,7 @@ interface
      { Memory sizes }
      { Memory sizes }
        heapsize,
        heapsize,
        maxheapsize,
        maxheapsize,
-       stacksize,
-       jmp_buf_size,
-       jmp_buf_align : longint;
+       stacksize   : longint;
 
 
 {$Ifdef EXTDEBUG}
 {$Ifdef EXTDEBUG}
      { parameter switches }
      { parameter switches }
@@ -1407,11 +1405,6 @@ implementation
           in options or init_parser }
           in options or init_parser }
         stacksize:=0;
         stacksize:=0;
         { not initialized yet }
         { not initialized yet }
-{$ifndef jvm}
-        jmp_buf_size:=-1;
-{$else}
-        jmp_buf_size:=0;
-{$endif}
         apptype:=app_cui;
         apptype:=app_cui;
 
 
         { Init values }
         { Init values }

+ 1 - 2
compiler/ncgutil.pas

@@ -393,9 +393,8 @@ implementation
           the TExceptAddr record from the system unit (like we do for jmp_buf_size),
           the TExceptAddr record from the system unit (like we do for jmp_buf_size),
           without moving TExceptAddr to the interface part? }
           without moving TExceptAddr to the interface part? }
         except_buf_size:=voidpointertype.size*2+sizeof(pint);
         except_buf_size:=voidpointertype.size*2+sizeof(pint);
-        get_jumpbuf_size;
         tg.GetTemp(list,except_buf_size,sizeof(pint),tt_persistent,t.envbuf);
         tg.GetTemp(list,except_buf_size,sizeof(pint),tt_persistent,t.envbuf);
-        tg.GetTemp(list,jmp_buf_size,jmp_buf_align,tt_persistent,t.jmpbuf);
+        tg.gethltemp(list,rec_jmp_buf,rec_jmp_buf.size,tt_persistent,t.jmpbuf);
         tg.GetTemp(list,sizeof(pint),sizeof(pint),tt_persistent,t.reasonbuf);
         tg.GetTemp(list,sizeof(pint),sizeof(pint),tt_persistent,t.reasonbuf);
       end;
       end;
 
 

+ 2 - 2
compiler/nflw.pas

@@ -2068,7 +2068,7 @@ implementation
 
 
         include(current_procinfo.flags,pi_do_call);
         include(current_procinfo.flags,pi_do_call);
         include(current_procinfo.flags,pi_uses_exceptions);
         include(current_procinfo.flags,pi_uses_exceptions);
-        inc(current_procinfo.estimatedtempsize,get_jumpbuf_size*2);
+        inc(current_procinfo.estimatedtempsize,rec_jmp_buf.size*2);
       end;
       end;
 
 
 
 
@@ -2141,7 +2141,7 @@ implementation
         if not(implicitframe) then
         if not(implicitframe) then
           include(current_procinfo.flags,pi_uses_exceptions);
           include(current_procinfo.flags,pi_uses_exceptions);
 
 
-        inc(current_procinfo.estimatedtempsize,get_jumpbuf_size);
+        inc(current_procinfo.estimatedtempsize,rec_jmp_buf.size);
       end;
       end;
 
 
 
 

+ 0 - 14
compiler/symtable.pas

@@ -283,7 +283,6 @@ interface
     procedure hidesym(sym:TSymEntry);
     procedure hidesym(sym:TSymEntry);
     procedure duplicatesym(var hashedid:THashedIDString;dupsym,origsym:TSymEntry);
     procedure duplicatesym(var hashedid:THashedIDString;dupsym,origsym:TSymEntry);
     function handle_generic_dummysym(sym:TSymEntry;var symoptions:tsymoptions):boolean;
     function handle_generic_dummysym(sym:TSymEntry;var symoptions:tsymoptions):boolean;
-    function get_jumpbuf_size : longint;
 
 
 {*** Search ***}
 {*** Search ***}
     procedure addsymref(sym:tsym);
     procedure addsymref(sym:tsym);
@@ -2506,19 +2505,6 @@ implementation
       end;
       end;
 
 
 
 
-    function get_jumpbuf_size : longint;
-      var
-        srsym : ttypesym;
-      begin
-        if jmp_buf_size=-1 then
-          begin
-            srsym:=search_system_type('JMP_BUF');
-            jmp_buf_size:=srsym.typedef.size;
-            jmp_buf_align:=srsym.typedef.alignment;
-          end;
-        result:=jmp_buf_size;
-      end;
-
 {*****************************************************************************
 {*****************************************************************************
                                   Search
                                   Search
 *****************************************************************************}
 *****************************************************************************}