Permalink
Browse files

+ merge support for boolean16, boolean32 and boolean64 into trunk

git-svn-id: http://svn.freepascal.org:/svn/fpc/trunk@17846 3ad0048d-3df7-0310-abae-a5850022a9f2
  • Loading branch information...
1 parent ec48e73 commit d07bcdcfe9c6f65c5e45e10dcd1a6448f89570ec @FPK FPK committed Jun 27, 2011
View
@@ -1418,8 +1418,7 @@ TFileIndexItem = class(TFPHashObject)
]);
finish_entry;
end;
- pasbool,
- bool8bit :
+ pasbool8 :
begin
append_entry(DW_TAG_base_type,false,[
DW_AT_name,DW_FORM_string,'Boolean'#0,
@@ -1428,6 +1427,24 @@ TFileIndexItem = class(TFPHashObject)
]);
finish_entry;
end;
+ bool8bit :
+ begin
+ append_entry(DW_TAG_base_type,false,[
+ DW_AT_name,DW_FORM_string,'ByteBool'#0,
+ DW_AT_encoding,DW_FORM_data1,DW_ATE_boolean,
+ DW_AT_byte_size,DW_FORM_data1,1
+ ]);
+ finish_entry;
+ end;
+ pasbool16 :
+ begin
+ append_entry(DW_TAG_base_type,false,[
+ DW_AT_name,DW_FORM_string,'Boolean16'#0,
+ DW_AT_encoding,DW_FORM_data1,DW_ATE_boolean,
+ DW_AT_byte_size,DW_FORM_data1,2
+ ]);
+ finish_entry;
+ end;
bool16bit :
begin
append_entry(DW_TAG_base_type,false,[
@@ -1437,6 +1454,15 @@ TFileIndexItem = class(TFPHashObject)
]);
finish_entry;
end;
+ pasbool32 :
+ begin
+ append_entry(DW_TAG_base_type,false,[
+ DW_AT_name,DW_FORM_string,'Boolean32'#0,
+ DW_AT_encoding,DW_FORM_data1,DW_ATE_boolean,
+ DW_AT_byte_size,DW_FORM_data1,4
+ ]);
+ finish_entry;
+ end;
bool32bit :
begin
append_entry(DW_TAG_base_type,false,[
@@ -1446,6 +1472,15 @@ TFileIndexItem = class(TFPHashObject)
]);
finish_entry;
end;
+ pasbool64 :
+ begin
+ append_entry(DW_TAG_base_type,false,[
+ DW_AT_name,DW_FORM_string,'Boolean64'#0,
+ DW_AT_encoding,DW_FORM_data1,DW_ATE_boolean,
+ DW_AT_byte_size,DW_FORM_data1,8
+ ]);
+ finish_entry;
+ end;
bool64bit :
begin
append_entry(DW_TAG_base_type,false,[
View
@@ -624,7 +624,10 @@ implementation
case def.ordtype of
uvoid :
ss:=def_stab_number(def);
- pasbool,
+ pasbool8,
+ pasbool16,
+ pasbool32,
+ pasbool64,
bool8bit,
bool16bit,
bool32bit,
@@ -647,13 +650,16 @@ implementation
ss:='-20;';
uwidechar :
ss:='-30;';
- pasbool,
+ pasbool8,
bool8bit :
ss:='-21;';
+ pasbool16,
bool16bit :
ss:='-22;';
+ pasbool32,
bool32bit :
ss:='-23;';
+ pasbool64,
bool64bit :
{ no clue if this is correct (FK) }
ss:='-23;';
View
@@ -166,7 +166,8 @@ implementation
(bvoid,
bint,bint,bint,bint,
bint,bint,bint,bint,
- bbool,bbool,bbool,bbool,bbool,
+ bbool,bbool,bbool,bbool,
+ bbool,bbool,bbool,bbool,
bchar,bchar,bint);
basedefconvertsimplicit : array[tbasedef,tbasedef] of tconverttype =
@@ -241,7 +242,8 @@ implementation
end;
end;
uvoid,
- pasbool,bool8bit,bool16bit,bool32bit,bool64bit:
+ pasbool8,pasbool16,pasbool32,pasbool64,
+ bool8bit,bool16bit,bool32bit,bool64bit:
eq:=te_equal;
else
internalerror(200210061);
@@ -1551,8 +1553,9 @@ if (def_from.typ=classrefdef) then
u8bit,u16bit,u32bit,u64bit,
s8bit,s16bit,s32bit,s64bit :
is_subequal:=(torddef(def2).ordtype in [s64bit,u64bit,s32bit,u32bit,u8bit,s8bit,s16bit,u16bit]);
- pasbool,bool8bit,bool16bit,bool32bit,bool64bit :
- is_subequal:=(torddef(def2).ordtype in [pasbool,bool8bit,bool16bit,bool32bit,bool64bit]);
+ pasbool8,pasbool16,pasbool32,pasbool64,
+ bool8bit,bool16bit,bool32bit,bool64bit :
+ is_subequal:=(torddef(def2).ordtype in [pasbool8,pasbool16,pasbool32,pasbool64,bool8bit,bool16bit,bool32bit,bool64bit]);
uchar :
is_subequal:=(torddef(def2).ordtype=uchar);
uwidechar :
View
@@ -387,7 +387,8 @@ implementation
is_ordinal:=dt in [uchar,uwidechar,
u8bit,u16bit,u32bit,u64bit,
s8bit,s16bit,s32bit,s64bit,
- pasbool,bool8bit,bool16bit,bool32bit,bool64bit];
+ pasbool8,pasbool16,pasbool32,pasbool64,
+ bool8bit,bool16bit,bool32bit,bool64bit];
end;
enumdef :
is_ordinal:=true;
@@ -444,14 +445,14 @@ implementation
function is_boolean(def : tdef) : boolean;
begin
result:=(def.typ=orddef) and
- (torddef(def).ordtype in [pasbool,bool8bit,bool16bit,bool32bit,bool64bit]);
+ (torddef(def).ordtype in [pasbool8,pasbool16,pasbool32,pasbool64,bool8bit,bool16bit,bool32bit,bool64bit]);
end;
function is_pasbool(def : tdef) : boolean;
begin
result:=(def.typ=orddef) and
- (torddef(def).ordtype = pasbool);
+ (torddef(def).ordtype in [pasbool8,pasbool16,pasbool32,pasbool64]);
end;
{ true if def is a C-style boolean (non-zero value = true, zero = false) }
View
@@ -2477,7 +2477,8 @@ if (pt.resultdef.typ=recorddef) then
variantorddef_cl: array[tordtype] of tvariantequaltype =
(tve_incompatible,tve_byte,tve_word,tve_cardinal,tve_chari64,
tve_shortint,tve_smallint,tve_longint,tve_chari64,
- tve_boolformal,tve_boolformal,tve_boolformal,tve_boolformal,tve_boolformal,
+ tve_boolformal,tve_boolformal,tve_boolformal,tve_boolformal,
+ tve_boolformal,tve_boolformal,tve_boolformal,tve_boolformal,
tve_chari64,tve_chari64,tve_dblcurrency);
{ TODO: fixme for 128 bit floats }
variantfloatdef_cl: array[tfloattype] of tvariantequaltype =
Oops, something went wrong.

0 comments on commit d07bcdc

Please sign in to comment.