Предмет:
Тип роботи:
Курсова робота
К-сть сторінок:
82
Мова:
Українська
WriteError(' Unrecognized object flags: '+hexbyte(byte(unknown_flags)));
if not (inline_code in code_type) then
begin
write(tab,'{ Proc ',hexwordblank(entry_ofs));
if not_from_dll in obj_type then
write(' Entry ',hexwordblank(entry_pt^.code_block),':',
hexword(entry_pt^.offset));
if (vmt_entry > 0) and not (dynamic in obj_type) then
write(' vmt index ',hexword(vmt_entry),'h');
writeln('}');
end
else
begin
writeln;
indent;
write(' Inline(');
codestart := add_only_offset(info,sizeof(func_info_rec)
+func_type.num_args*sizeof(arg_rec));
i:=0;
while i<entry_ofs do
begin
code_ptr := add_only_offset(codestart,i);
case code_ptr^.itype of
0 : begin
write('<$',hexbyte(code_ptr^.b):2);
Inc(i,2);
end;
1 : begin
write('>$',hexword(code_ptr^.w):4);
Inc(i,3);
end;
2,3 : begin
write('{ofs ',hexwordblank(code_ptr^.offset),' in ');
if code_ptr^.itype=2 then
write('var')
else
write('const');
write(' block ',hexwordblank(code_ptr^.block));
write(' in unit ',get_unit_name(code_ptr^.block_unit));
writeln('}');
write('':10);
Inc(i,7);
end;
else
WriteError('Inline code unknown type!');
Inc(i,1);
end;
if i=entry_ofs then
writeln(');')
else
write('/');
end;
end;
if (next_method<>0) and not (method in code_type) then
WriteError('Unknown next_method value');
if (w4<>$0d06) then
WriteError('Unknown w4 value');
if not (((w5=4) and not (method in code_type)) or
((w5=8) and (method in code_type))) then
WriteError('Unknown w5 value');
if (w6<>0) then
WriteError('Unknown w6 value');
if do_locals in active_options then
write_locals(name,info);
end;
end;
{$ENDIF}
procedure write_enum_const(type_obj:type_def_ptr;val:longint);
var obj : obj_ptr;
i : integer;
begin
if type_obj^.type_type<>15 then
begin
WriteError('Not enum const!?');
exit;
end;
obj := add_only_offset(type_obj,32);
i := 0;
while i < val do
begin
obj:=add_only_offset(obj,12+length(obj^.name));
inc(i);
end;
write(obj^.name);
end;
procedure write_const_type(var Val;type_unit,type_def_ofs:word;buffer:pointer);
var type_obj:type_def_ptr;
last,l:longint;
count,i,state:Integer;
range:boolean;
unit_ptr:unit_list_ptr;
begin
if buffer<>nil then
unit_ptr:=get_unit_buffer(buffer,type_unit)
else
unit_ptr:=get_unit(type_unit);
with unit_ptr^ do
begin
if buffer<>nil then
begin
type_obj:=add_only_offset(buffer,type_def_ofs);
case type_obj^.type_type of
9 { string }
: begin
state:=0;
for i:=1 to length(string(val)) do
begin
if string(val)[i]<' ' then
case state of
0: begin
state:=2;
write('#$',hexbyte(ord(string(val)[i])));
end;
1: begin