|
@@ -54,58 +54,58 @@ implementation
|
|
|
all intern procedures for the system unit
|
|
|
}
|
|
|
begin
|
|
|
- systemunit.insert(tsyssym.create('Concat',in_concat_x));
|
|
|
- systemunit.insert(tsyssym.create('Write',in_write_x));
|
|
|
- systemunit.insert(tsyssym.create('WriteLn',in_writeln_x));
|
|
|
- systemunit.insert(tsyssym.create('WriteStr',in_writestr_x));
|
|
|
- systemunit.insert(tsyssym.create('Assigned',in_assigned_x));
|
|
|
- systemunit.insert(tsyssym.create('Read',in_read_x));
|
|
|
- systemunit.insert(tsyssym.create('ReadLn',in_readln_x));
|
|
|
- systemunit.insert(tsyssym.create('ReadStr',in_readstr_x));
|
|
|
- systemunit.insert(tsyssym.create('Ofs',in_ofs_x));
|
|
|
- systemunit.insert(tsyssym.create('SizeOf',in_sizeof_x));
|
|
|
- systemunit.insert(tsyssym.create('BitSizeOf',in_bitsizeof_x));
|
|
|
- systemunit.insert(tsyssym.create('TypeOf',in_typeof_x));
|
|
|
- systemunit.insert(tsyssym.create('Low',in_low_x));
|
|
|
- systemunit.insert(tsyssym.create('High',in_high_x));
|
|
|
- systemunit.insert(tsyssym.create('Slice',in_slice_x));
|
|
|
- systemunit.insert(tsyssym.create('Seg',in_seg_x));
|
|
|
- systemunit.insert(tsyssym.create('Ord',in_ord_x));
|
|
|
- systemunit.insert(tsyssym.create('Pred',in_pred_x));
|
|
|
- systemunit.insert(tsyssym.create('Succ',in_succ_x));
|
|
|
- systemunit.insert(tsyssym.create('Exclude',in_exclude_x_y));
|
|
|
- systemunit.insert(tsyssym.create('Include',in_include_x_y));
|
|
|
- systemunit.insert(tsyssym.create('Pack',in_pack_x_y_z));
|
|
|
- systemunit.insert(tsyssym.create('Unpack',in_unpack_x_y_z));
|
|
|
- systemunit.insert(tsyssym.create('Break',in_break));
|
|
|
- systemunit.insert(tsyssym.create('Exit',in_exit));
|
|
|
- systemunit.insert(tsyssym.create('Continue',in_continue));
|
|
|
- systemunit.insert(tsyssym.create('Leave',in_leave)); {macpas only}
|
|
|
- systemunit.insert(tsyssym.create('Cycle',in_cycle)); {macpas only}
|
|
|
- systemunit.insert(tsyssym.create('Dec',in_dec_x));
|
|
|
- systemunit.insert(tsyssym.create('Inc',in_inc_x));
|
|
|
- systemunit.insert(tsyssym.create('Str',in_str_x_string));
|
|
|
- systemunit.insert(tsyssym.create('Assert',in_assert_x_y));
|
|
|
- systemunit.insert(tsyssym.create('Val',in_val_x));
|
|
|
- systemunit.insert(tsyssym.create('Addr',in_addr_x));
|
|
|
- systemunit.insert(tsyssym.create('TypeInfo',in_typeinfo_x));
|
|
|
- systemunit.insert(tsyssym.create('SetLength',in_setlength_x));
|
|
|
- systemunit.insert(tsyssym.create('Copy',in_copy_x));
|
|
|
- systemunit.insert(tsyssym.create('Initialize',in_initialize_x));
|
|
|
- systemunit.insert(tsyssym.create('Finalize',in_finalize_x));
|
|
|
- systemunit.insert(tsyssym.create('Length',in_length_x));
|
|
|
- systemunit.insert(tsyssym.create('New',in_new_x));
|
|
|
- systemunit.insert(tsyssym.create('Dispose',in_dispose_x));
|
|
|
+ systemunit.insert(csyssym.create('Concat',in_concat_x));
|
|
|
+ systemunit.insert(csyssym.create('Write',in_write_x));
|
|
|
+ systemunit.insert(csyssym.create('WriteLn',in_writeln_x));
|
|
|
+ systemunit.insert(csyssym.create('WriteStr',in_writestr_x));
|
|
|
+ systemunit.insert(csyssym.create('Assigned',in_assigned_x));
|
|
|
+ systemunit.insert(csyssym.create('Read',in_read_x));
|
|
|
+ systemunit.insert(csyssym.create('ReadLn',in_readln_x));
|
|
|
+ systemunit.insert(csyssym.create('ReadStr',in_readstr_x));
|
|
|
+ systemunit.insert(csyssym.create('Ofs',in_ofs_x));
|
|
|
+ systemunit.insert(csyssym.create('SizeOf',in_sizeof_x));
|
|
|
+ systemunit.insert(csyssym.create('BitSizeOf',in_bitsizeof_x));
|
|
|
+ systemunit.insert(csyssym.create('TypeOf',in_typeof_x));
|
|
|
+ systemunit.insert(csyssym.create('Low',in_low_x));
|
|
|
+ systemunit.insert(csyssym.create('High',in_high_x));
|
|
|
+ systemunit.insert(csyssym.create('Slice',in_slice_x));
|
|
|
+ systemunit.insert(csyssym.create('Seg',in_seg_x));
|
|
|
+ systemunit.insert(csyssym.create('Ord',in_ord_x));
|
|
|
+ systemunit.insert(csyssym.create('Pred',in_pred_x));
|
|
|
+ systemunit.insert(csyssym.create('Succ',in_succ_x));
|
|
|
+ systemunit.insert(csyssym.create('Exclude',in_exclude_x_y));
|
|
|
+ systemunit.insert(csyssym.create('Include',in_include_x_y));
|
|
|
+ systemunit.insert(csyssym.create('Pack',in_pack_x_y_z));
|
|
|
+ systemunit.insert(csyssym.create('Unpack',in_unpack_x_y_z));
|
|
|
+ systemunit.insert(csyssym.create('Break',in_break));
|
|
|
+ systemunit.insert(csyssym.create('Exit',in_exit));
|
|
|
+ systemunit.insert(csyssym.create('Continue',in_continue));
|
|
|
+ systemunit.insert(csyssym.create('Leave',in_leave)); {macpas only}
|
|
|
+ systemunit.insert(csyssym.create('Cycle',in_cycle)); {macpas only}
|
|
|
+ systemunit.insert(csyssym.create('Dec',in_dec_x));
|
|
|
+ systemunit.insert(csyssym.create('Inc',in_inc_x));
|
|
|
+ systemunit.insert(csyssym.create('Str',in_str_x_string));
|
|
|
+ systemunit.insert(csyssym.create('Assert',in_assert_x_y));
|
|
|
+ systemunit.insert(csyssym.create('Val',in_val_x));
|
|
|
+ systemunit.insert(csyssym.create('Addr',in_addr_x));
|
|
|
+ systemunit.insert(csyssym.create('TypeInfo',in_typeinfo_x));
|
|
|
+ systemunit.insert(csyssym.create('SetLength',in_setlength_x));
|
|
|
+ systemunit.insert(csyssym.create('Copy',in_copy_x));
|
|
|
+ systemunit.insert(csyssym.create('Initialize',in_initialize_x));
|
|
|
+ systemunit.insert(csyssym.create('Finalize',in_finalize_x));
|
|
|
+ systemunit.insert(csyssym.create('Length',in_length_x));
|
|
|
+ systemunit.insert(csyssym.create('New',in_new_x));
|
|
|
+ systemunit.insert(csyssym.create('Dispose',in_dispose_x));
|
|
|
{$ifdef SUPPORT_GET_FRAME}
|
|
|
- systemunit.insert(tsyssym.create('Get_Frame',in_get_frame));
|
|
|
+ systemunit.insert(csyssym.create('Get_Frame',in_get_frame));
|
|
|
{$endif SUPPORT_GET_FRAME}
|
|
|
- systemunit.insert(tsyssym.create('Unaligned',in_unaligned_x));
|
|
|
- systemunit.insert(tsyssym.create('Aligned',in_aligned_x));
|
|
|
- systemunit.insert(tsyssym.create('ObjCSelector',in_objc_selector_x)); { objc only }
|
|
|
- systemunit.insert(tsyssym.create('ObjCEncode',in_objc_encode_x)); { objc only }
|
|
|
- systemunit.insert(tsyssym.create('Default',in_default_x));
|
|
|
- systemunit.insert(tconstsym.create_ord('False',constord,0,pasbool8type));
|
|
|
- systemunit.insert(tconstsym.create_ord('True',constord,1,pasbool8type));
|
|
|
+ systemunit.insert(csyssym.create('Unaligned',in_unaligned_x));
|
|
|
+ systemunit.insert(csyssym.create('Aligned',in_aligned_x));
|
|
|
+ systemunit.insert(csyssym.create('ObjCSelector',in_objc_selector_x)); { objc only }
|
|
|
+ systemunit.insert(csyssym.create('ObjCEncode',in_objc_encode_x)); { objc only }
|
|
|
+ systemunit.insert(csyssym.create('Default',in_default_x));
|
|
|
+ systemunit.insert(cconstsym.create_ord('False',constord,0,pasbool8type));
|
|
|
+ systemunit.insert(cconstsym.create_ord('True',constord,1,pasbool8type));
|
|
|
end;
|
|
|
|
|
|
|
|
@@ -166,7 +166,7 @@ implementation
|
|
|
|
|
|
function addtype(const s:string;def:tdef):ttypesym;
|
|
|
begin
|
|
|
- result:=ttypesym.create(s,def);
|
|
|
+ result:=ctypesym.create(s,def);
|
|
|
systemunit.insert(result);
|
|
|
end;
|
|
|
|
|
@@ -180,10 +180,10 @@ implementation
|
|
|
begin
|
|
|
if init_settings.fputype<>fpu_none then
|
|
|
begin
|
|
|
- s32floattype:=tfloatdef.create(s32real);
|
|
|
- s64floattype:=tfloatdef.create(s64real);
|
|
|
- s80floattype:=tfloatdef.create(s80real);
|
|
|
- sc80floattype:=tfloatdef.create(sc80real);
|
|
|
+ s32floattype:=cfloatdef.create(s32real);
|
|
|
+ s64floattype:=cfloatdef.create(s64real);
|
|
|
+ s80floattype:=cfloatdef.create(s80real);
|
|
|
+ sc80floattype:=cfloatdef.create(sc80real);
|
|
|
end else begin
|
|
|
s32floattype:=nil;
|
|
|
s64floattype:=nil;
|
|
@@ -196,120 +196,120 @@ implementation
|
|
|
hrecst : trecordsymtable;
|
|
|
begin
|
|
|
symtablestack.push(systemunit);
|
|
|
- cundefinedtype:=tundefineddef.create;
|
|
|
- cformaltype:=tformaldef.create(false);
|
|
|
- ctypedformaltype:=tformaldef.create(true);
|
|
|
- voidtype:=torddef.create(uvoid,0,0);
|
|
|
- voidpointertype:=tpointerdef.create(voidtype);
|
|
|
- u8inttype:=torddef.create(u8bit,0,255);
|
|
|
- s8inttype:=torddef.create(s8bit,int64(-128),127);
|
|
|
- u16inttype:=torddef.create(u16bit,0,65535);
|
|
|
- s16inttype:=torddef.create(s16bit,int64(-32768),32767);
|
|
|
- u32inttype:=torddef.create(u32bit,0,high(longword));
|
|
|
- s32inttype:=torddef.create(s32bit,int64(low(longint)),int64(high(longint)));
|
|
|
- u64inttype:=torddef.create(u64bit,low(qword),high(qword));
|
|
|
- s64inttype:=torddef.create(s64bit,low(int64),high(int64));
|
|
|
- pasbool8type:=torddef.create(pasbool8,0,1);
|
|
|
- pasbool16type:=torddef.create(pasbool16,0,1);
|
|
|
- pasbool32type:=torddef.create(pasbool32,0,1);
|
|
|
- pasbool64type:=torddef.create(pasbool64,0,1);
|
|
|
- bool8type:=torddef.create(bool8bit,low(int64),high(int64));
|
|
|
- bool16type:=torddef.create(bool16bit,low(int64),high(int64));
|
|
|
- bool32type:=torddef.create(bool32bit,low(int64),high(int64));
|
|
|
- bool64type:=torddef.create(bool64bit,low(int64),high(int64));
|
|
|
- cansichartype:=torddef.create(uchar,0,255);
|
|
|
- cwidechartype:=torddef.create(uwidechar,0,65535);
|
|
|
- cshortstringtype:=tstringdef.createshort(255);
|
|
|
+ cundefinedtype:=cundefineddef.create;
|
|
|
+ cformaltype:=cformaldef.create(false);
|
|
|
+ ctypedformaltype:=cformaldef.create(true);
|
|
|
+ voidtype:=corddef.create(uvoid,0,0);
|
|
|
+ voidpointertype:=cpointerdef.create(voidtype);
|
|
|
+ u8inttype:=corddef.create(u8bit,0,255);
|
|
|
+ s8inttype:=corddef.create(s8bit,int64(-128),127);
|
|
|
+ u16inttype:=corddef.create(u16bit,0,65535);
|
|
|
+ s16inttype:=corddef.create(s16bit,int64(-32768),32767);
|
|
|
+ u32inttype:=corddef.create(u32bit,0,high(longword));
|
|
|
+ s32inttype:=corddef.create(s32bit,int64(low(longint)),int64(high(longint)));
|
|
|
+ u64inttype:=corddef.create(u64bit,low(qword),high(qword));
|
|
|
+ s64inttype:=corddef.create(s64bit,low(int64),high(int64));
|
|
|
+ pasbool8type:=corddef.create(pasbool8,0,1);
|
|
|
+ pasbool16type:=corddef.create(pasbool16,0,1);
|
|
|
+ pasbool32type:=corddef.create(pasbool32,0,1);
|
|
|
+ pasbool64type:=corddef.create(pasbool64,0,1);
|
|
|
+ bool8type:=corddef.create(bool8bit,low(int64),high(int64));
|
|
|
+ bool16type:=corddef.create(bool16bit,low(int64),high(int64));
|
|
|
+ bool32type:=corddef.create(bool32bit,low(int64),high(int64));
|
|
|
+ bool64type:=corddef.create(bool64bit,low(int64),high(int64));
|
|
|
+ cansichartype:=corddef.create(uchar,0,255);
|
|
|
+ cwidechartype:=corddef.create(uwidechar,0,65535);
|
|
|
+ cshortstringtype:=cstringdef.createshort(255);
|
|
|
{ should we give a length to the default long and ansi string definition ?? }
|
|
|
- clongstringtype:=tstringdef.createlong(-1);
|
|
|
- cansistringtype:=tstringdef.createansi(0);
|
|
|
+ clongstringtype:=cstringdef.createlong(-1);
|
|
|
+ cansistringtype:=cstringdef.createansi(0);
|
|
|
if target_info.system in systems_windows then
|
|
|
- cwidestringtype:=tstringdef.createwide
|
|
|
+ cwidestringtype:=cstringdef.createwide
|
|
|
else
|
|
|
- cwidestringtype:=tstringdef.createunicode;
|
|
|
- cunicodestringtype:=tstringdef.createunicode;
|
|
|
+ cwidestringtype:=cstringdef.createunicode;
|
|
|
+ cunicodestringtype:=cstringdef.createunicode;
|
|
|
{ length=0 for shortstring is open string (needed for readln(string) }
|
|
|
- openshortstringtype:=tstringdef.createshort(0);
|
|
|
- openchararraytype:=tarraydef.create(0,-1,s32inttype);
|
|
|
+ openshortstringtype:=cstringdef.createshort(0);
|
|
|
+ openchararraytype:=carraydef.create(0,-1,s32inttype);
|
|
|
tarraydef(openchararraytype).elementdef:=cansichartype;
|
|
|
{$ifdef x86}
|
|
|
create_fpu_types;
|
|
|
{$ifndef FPC_SUPPORT_X87_TYPES_ON_WIN64}
|
|
|
if target_info.system=system_x86_64_win64 then
|
|
|
begin
|
|
|
- s64currencytype:=torddef.create(scurrency,low(int64),high(int64));
|
|
|
+ s64currencytype:=corddef.create(scurrency,low(int64),high(int64));
|
|
|
pbestrealtype:=@s64floattype;
|
|
|
end
|
|
|
else
|
|
|
{$endif FPC_SUPPORT_X87_TYPES_ON_WIN64}
|
|
|
- s64currencytype:=tfloatdef.create(s64currency);
|
|
|
+ s64currencytype:=cfloatdef.create(s64currency);
|
|
|
{$endif x86}
|
|
|
{$ifdef powerpc}
|
|
|
create_fpu_types;
|
|
|
- s64currencytype:=torddef.create(scurrency,low(int64),high(int64));
|
|
|
+ s64currencytype:=corddef.create(scurrency,low(int64),high(int64));
|
|
|
{$endif powerpc}
|
|
|
{$ifdef POWERPC64}
|
|
|
create_fpu_types;
|
|
|
- s64currencytype:=torddef.create(scurrency,low(int64),high(int64));
|
|
|
+ s64currencytype:=corddef.create(scurrency,low(int64),high(int64));
|
|
|
{$endif POWERPC64}
|
|
|
{$ifdef sparc}
|
|
|
create_fpu_types;
|
|
|
- s64currencytype:=torddef.create(scurrency,low(int64),high(int64));
|
|
|
+ s64currencytype:=corddef.create(scurrency,low(int64),high(int64));
|
|
|
{$endif sparc}
|
|
|
{$ifdef m68k}
|
|
|
create_fpu_types;
|
|
|
- s64currencytype:=torddef.create(scurrency,low(int64),high(int64));
|
|
|
+ s64currencytype:=corddef.create(scurrency,low(int64),high(int64));
|
|
|
{$endif}
|
|
|
{$ifdef arm}
|
|
|
create_fpu_types;
|
|
|
- s64currencytype:=torddef.create(scurrency,low(int64),high(int64));
|
|
|
+ s64currencytype:=corddef.create(scurrency,low(int64),high(int64));
|
|
|
{$endif arm}
|
|
|
{$ifdef avr}
|
|
|
- s32floattype:=tfloatdef.create(s32real);
|
|
|
- s64floattype:=tfloatdef.create(s64real);
|
|
|
- s80floattype:=tfloatdef.create(s80real);
|
|
|
- sc80floattype:=tfloatdef.create(sc80real);
|
|
|
- s64currencytype:=torddef.create(scurrency,low(int64),high(int64));
|
|
|
+ s32floattype:=cfloatdef.create(s32real);
|
|
|
+ s64floattype:=cfloatdef.create(s64real);
|
|
|
+ s80floattype:=cfloatdef.create(s80real);
|
|
|
+ sc80floattype:=cfloatdef.create(sc80real);
|
|
|
+ s64currencytype:=corddef.create(scurrency,low(int64),high(int64));
|
|
|
{$endif avr}
|
|
|
{$ifdef mips}
|
|
|
create_fpu_types;
|
|
|
- s64currencytype:=torddef.create(scurrency,low(int64),high(int64));
|
|
|
+ s64currencytype:=corddef.create(scurrency,low(int64),high(int64));
|
|
|
{$endif mips}
|
|
|
{$ifdef jvm}
|
|
|
create_fpu_types;
|
|
|
- s64currencytype:=torddef.create(scurrency,low(int64),high(int64));
|
|
|
+ s64currencytype:=corddef.create(scurrency,low(int64),high(int64));
|
|
|
{$endif jvm}
|
|
|
set_default_int_types;
|
|
|
{ some other definitions }
|
|
|
- charpointertype:=tpointerdef.create(cansichartype);
|
|
|
- widecharpointertype:=tpointerdef.create(cwidechartype);
|
|
|
+ charpointertype:=cpointerdef.create(cansichartype);
|
|
|
+ widecharpointertype:=cpointerdef.create(cwidechartype);
|
|
|
{$ifdef i8086}
|
|
|
- parentfpvoidpointertype:=tpointerdef.createx86(voidtype,x86pt_near);
|
|
|
+ parentfpvoidpointertype:=cpointerdef.createx86(voidtype,x86pt_near);
|
|
|
{$else i8086}
|
|
|
- parentfpvoidpointertype:=tpointerdef.create(voidtype);
|
|
|
+ parentfpvoidpointertype:=cpointerdef.create(voidtype);
|
|
|
{$endif i8086}
|
|
|
{$ifdef x86}
|
|
|
- voidnearpointertype:=tpointerdef.createx86(voidtype,x86pt_near);
|
|
|
- voidnearcspointertype:=tpointerdef.createx86(voidtype,x86pt_near_cs);
|
|
|
- voidneardspointertype:=tpointerdef.createx86(voidtype,x86pt_near_ds);
|
|
|
- voidnearsspointertype:=tpointerdef.createx86(voidtype,x86pt_near_ss);
|
|
|
- voidnearespointertype:=tpointerdef.createx86(voidtype,x86pt_near_es);
|
|
|
- voidnearfspointertype:=tpointerdef.createx86(voidtype,x86pt_near_fs);
|
|
|
- voidneargspointertype:=tpointerdef.createx86(voidtype,x86pt_near_gs);
|
|
|
+ voidnearpointertype:=cpointerdef.createx86(voidtype,x86pt_near);
|
|
|
+ voidnearcspointertype:=cpointerdef.createx86(voidtype,x86pt_near_cs);
|
|
|
+ voidneardspointertype:=cpointerdef.createx86(voidtype,x86pt_near_ds);
|
|
|
+ voidnearsspointertype:=cpointerdef.createx86(voidtype,x86pt_near_ss);
|
|
|
+ voidnearespointertype:=cpointerdef.createx86(voidtype,x86pt_near_es);
|
|
|
+ voidnearfspointertype:=cpointerdef.createx86(voidtype,x86pt_near_fs);
|
|
|
+ voidneargspointertype:=cpointerdef.createx86(voidtype,x86pt_near_gs);
|
|
|
{$ifdef i8086}
|
|
|
- voidfarpointertype:=tpointerdef.createx86(voidtype,x86pt_far);
|
|
|
- voidhugepointertype:=tpointerdef.createx86(voidtype,x86pt_huge);
|
|
|
- charnearpointertype:=tpointerdef.createx86(cansichartype,x86pt_near);
|
|
|
- charfarpointertype:=tpointerdef.createx86(cansichartype,x86pt_far);
|
|
|
- bytefarpointertype:=tpointerdef.createx86(u8inttype,x86pt_far);
|
|
|
- wordfarpointertype:=tpointerdef.createx86(u16inttype,x86pt_far);
|
|
|
- longintfarpointertype:=tpointerdef.createx86(s32inttype,x86pt_far);
|
|
|
+ voidfarpointertype:=cpointerdef.createx86(voidtype,x86pt_far);
|
|
|
+ voidhugepointertype:=cpointerdef.createx86(voidtype,x86pt_huge);
|
|
|
+ charnearpointertype:=cpointerdef.createx86(cansichartype,x86pt_near);
|
|
|
+ charfarpointertype:=cpointerdef.createx86(cansichartype,x86pt_far);
|
|
|
+ bytefarpointertype:=cpointerdef.createx86(u8inttype,x86pt_far);
|
|
|
+ wordfarpointertype:=cpointerdef.createx86(u16inttype,x86pt_far);
|
|
|
+ longintfarpointertype:=cpointerdef.createx86(s32inttype,x86pt_far);
|
|
|
{$endif i8086}
|
|
|
{$endif x86}
|
|
|
set_default_ptr_types;
|
|
|
- cfiletype:=tfiledef.createuntyped;
|
|
|
- cvarianttype:=tvariantdef.create(vt_normalvariant);
|
|
|
- colevarianttype:=tvariantdef.create(vt_olevariant);
|
|
|
+ cfiletype:=cfiledef.createuntyped;
|
|
|
+ cvarianttype:=cvariantdef.create(vt_normalvariant);
|
|
|
+ colevarianttype:=cvariantdef.create(vt_olevariant);
|
|
|
|
|
|
{$ifdef cpufpemu}
|
|
|
{ Normal types }
|
|
@@ -348,7 +348,7 @@ implementation
|
|
|
{$ifndef FPC_SUPPORT_X87_TYPES_ON_WIN64}
|
|
|
if target_info.system<>system_x86_64_win64 then
|
|
|
{$endif FPC_SUPPORT_X87_TYPES_ON_WIN64}
|
|
|
- addtype('Comp',tfloatdef.create(s64comp));
|
|
|
+ addtype('Comp',cfloatdef.create(s64comp));
|
|
|
{$endif x86}
|
|
|
addtype('Currency',s64currencytype);
|
|
|
addtype('Pointer',voidpointertype);
|
|
@@ -392,8 +392,8 @@ implementation
|
|
|
addtype('Int64',s64inttype);
|
|
|
addtype('Char',cansichartype);
|
|
|
addtype('WideChar',cwidechartype);
|
|
|
- addtype('Text',tfiledef.createtext);
|
|
|
- addtype('TypedFile',tfiledef.createtyped(voidtype));
|
|
|
+ addtype('Text',cfiledef.createtext);
|
|
|
+ addtype('TypedFile',cfiledef.createtyped(voidtype));
|
|
|
addtype('Variant',cvarianttype);
|
|
|
addtype('OleVariant',colevarianttype);
|
|
|
{ Internal types }
|
|
@@ -463,40 +463,40 @@ implementation
|
|
|
begin
|
|
|
{ Add a type for virtual method tables }
|
|
|
hrecst:=trecordsymtable.create('',current_settings.packrecords);
|
|
|
- vmttype:=trecorddef.create('',hrecst);
|
|
|
- pvmttype:=tpointerdef.create(vmttype);
|
|
|
+ vmttype:=crecorddef.create('',hrecst);
|
|
|
+ pvmttype:=cpointerdef.create(vmttype);
|
|
|
{ can't use addtype for pvmt because the rtti of the pointed
|
|
|
type is not available. The rtti for pvmt will be written implicitly
|
|
|
by thev tblarray below }
|
|
|
- systemunit.insert(ttypesym.create('$pvmt',pvmttype));
|
|
|
- addfield(hrecst,tfieldvarsym.create('$length',vs_value,ptrsinttype,[]));
|
|
|
- addfield(hrecst,tfieldvarsym.create('$mlength',vs_value,ptrsinttype,[]));
|
|
|
- addfield(hrecst,tfieldvarsym.create('$parent',vs_value,pvmttype,[]));
|
|
|
+ systemunit.insert(ctypesym.create('$pvmt',pvmttype));
|
|
|
+ addfield(hrecst,cfieldvarsym.create('$length',vs_value,ptrsinttype,[]));
|
|
|
+ addfield(hrecst,cfieldvarsym.create('$mlength',vs_value,ptrsinttype,[]));
|
|
|
+ addfield(hrecst,cfieldvarsym.create('$parent',vs_value,pvmttype,[]));
|
|
|
{ it seems vmttype is used both for TP objects and Delphi classes,
|
|
|
so the next entry could either be the first virtual method (vm1)
|
|
|
(object) or the class name (class). We can't easily create separate
|
|
|
vtable formats for both, as gdb is hard coded to search for
|
|
|
__vtbl_ptr_type in all cases (JM) }
|
|
|
- addfield(hrecst,tfieldvarsym.create('$vm1_or_classname',vs_value,tpointerdef.create(cshortstringtype),[]));
|
|
|
- vmtarraytype:=tarraydef.create(0,0,s32inttype);
|
|
|
+ addfield(hrecst,cfieldvarsym.create('$vm1_or_classname',vs_value,cpointerdef.create(cshortstringtype),[]));
|
|
|
+ vmtarraytype:=carraydef.create(0,0,s32inttype);
|
|
|
tarraydef(vmtarraytype).elementdef:=voidpointertype;
|
|
|
- addfield(hrecst,tfieldvarsym.create('$__pfn',vs_value,vmtarraytype,[]));
|
|
|
+ addfield(hrecst,cfieldvarsym.create('$__pfn',vs_value,vmtarraytype,[]));
|
|
|
addtype('$__vtbl_ptr_type',vmttype);
|
|
|
- vmtarraytype:=tarraydef.create(0,1,s32inttype);
|
|
|
+ vmtarraytype:=carraydef.create(0,1,s32inttype);
|
|
|
tarraydef(vmtarraytype).elementdef:=pvmttype;
|
|
|
addtype('$vtblarray',vmtarraytype);
|
|
|
{ Add a type for methodpointers }
|
|
|
hrecst:=trecordsymtable.create('',1);
|
|
|
{$ifdef i8086}
|
|
|
if current_settings.x86memorymodel in x86_far_code_models then
|
|
|
- addfield(hrecst,tfieldvarsym.create('$proc',vs_value,voidfarpointertype,[]))
|
|
|
+ addfield(hrecst,cfieldvarsym.create('$proc',vs_value,voidfarpointertype,[]))
|
|
|
else
|
|
|
- addfield(hrecst,tfieldvarsym.create('$proc',vs_value,voidnearpointertype,[]));
|
|
|
+ addfield(hrecst,cfieldvarsym.create('$proc',vs_value,voidnearpointertype,[]));
|
|
|
{$else i8086}
|
|
|
- addfield(hrecst,tfieldvarsym.create('$proc',vs_value,voidpointertype,[]));
|
|
|
+ addfield(hrecst,cfieldvarsym.create('$proc',vs_value,voidpointertype,[]));
|
|
|
{$endif i8086}
|
|
|
- addfield(hrecst,tfieldvarsym.create('$self',vs_value,voidpointertype,[]));
|
|
|
- methodpointertype:=trecorddef.create('',hrecst);
|
|
|
+ addfield(hrecst,cfieldvarsym.create('$self',vs_value,voidpointertype,[]));
|
|
|
+ methodpointertype:=crecorddef.create('',hrecst);
|
|
|
addtype('$methodpointer',methodpointertype);
|
|
|
end;
|
|
|
symtablestack.pop(systemunit);
|