* merged some verbosity options.

* V_LineInfo is a verbosity flag to include line info
This commit is contained in:
peter 2003-01-09 21:52:37 +00:00
parent 23f6b91c4a
commit 2721d341f0
15 changed files with 407 additions and 350 deletions

View File

@ -756,7 +756,7 @@ var
begin begin
{$ifdef EXTDEBUG} {$ifdef EXTDEBUG}
if assigned(current_module.mainsource) then if assigned(current_module.mainsource) then
Comment(v_info,'Start writing gas-styled assembler output for '+current_module.mainsource^); Comment(V_Debug,'Start writing gas-styled assembler output for '+current_module.mainsource^);
{$endif} {$endif}
LasTSec:=sec_none; LasTSec:=sec_none;
@ -811,14 +811,18 @@ var
AsmLn; AsmLn;
{$ifdef EXTDEBUG} {$ifdef EXTDEBUG}
if assigned(current_module.mainsource) then if assigned(current_module.mainsource) then
comment(v_info,'Done writing gas-styled assembler output for '+current_module.mainsource^); Comment(V_Debug,'Done writing gas-styled assembler output for '+current_module.mainsource^);
{$endif EXTDEBUG} {$endif EXTDEBUG}
end; end;
end. end.
{ {
$Log$ $Log$
Revision 1.19 2003-01-08 18:43:56 daniel Revision 1.20 2003-01-09 21:52:37 peter
* merged some verbosity options.
* V_LineInfo is a verbosity flag to include line info
Revision 1.19 2003/01/08 18:43:56 daniel
* Tregister changed into a record * Tregister changed into a record
Revision 1.18 2002/12/07 14:03:25 carl Revision 1.18 2002/12/07 14:03:25 carl

View File

@ -30,7 +30,7 @@ uses
finput; finput;
Const Const
{ <$10000 will show file and line } { Levels }
V_None = $0; V_None = $0;
V_Fatal = $1; V_Fatal = $1;
V_Error = $2; V_Error = $2;
@ -38,20 +38,20 @@ Const
V_Warning = $8; V_Warning = $8;
V_Note = $10; V_Note = $10;
V_Hint = $20; V_Hint = $20;
V_Macro = $100; V_LineInfoMask = $fff;
V_Procedure = $200; { From here by default no line info }
V_Conditional = $400; V_Info = $1000;
V_Assem = $800; V_Status = $2000;
V_Declarations = $1000; V_Used = $4000;
V_Info = $10000; V_Tried = $8000;
V_Status = $20000; V_Conditional = $10000;
V_Used = $40000; V_Debug = $20000;
V_Tried = $80000; V_Executable = $40000;
V_Debug = $100000; V_LevelMask = $fffffff;
V_Executable = $200000; V_All = V_LevelMask;
V_ShowFile = $ffff;
V_All = $ffffffff;
V_Default = V_Fatal + V_Error + V_Normal; V_Default = V_Fatal + V_Error + V_Normal;
{ Flags }
V_LineInfo = $10000000;
const const
{ RHIDE expect gcc like error output } { RHIDE expect gcc like error output }
@ -268,7 +268,10 @@ begin
if (status.verbosity and Level)=V_Fatal then if (status.verbosity and Level)=V_Fatal then
hs:=rh_errorstr; hs:=rh_errorstr;
end; end;
if (Level<=V_ShowFile) and (status.currentsource<>'') and (status.currentline>0) then { Generate line prefix }
if ((Level and V_LineInfo)=V_LineInfo) and
(status.currentsource<>'') and
(status.currentline>0) then
begin begin
{ Adding the column should not confuse RHIDE, { Adding the column should not confuse RHIDE,
even if it does not yet use it PM even if it does not yet use it PM
@ -297,8 +300,9 @@ begin
else else
hs:=s; hs:=s;
end; end;
{ only show when the level is required }
if ((status.verbosity and Level)=Level) then { Display line }
if ((status.verbosity and (Level and V_LevelMask))=(Level and V_LevelMask)) then
begin begin
{$ifdef FPC} {$ifdef FPC}
if status.use_stderr then if status.use_stderr then
@ -381,7 +385,11 @@ end;
end. end.
{ {
$Log$ $Log$
Revision 1.23 2002-12-29 14:57:50 peter Revision 1.24 2003-01-09 21:52:37 peter
* merged some verbosity options.
* V_LineInfo is a verbosity flag to include line info
Revision 1.23 2002/12/29 14:57:50 peter
* unit loading changed to first register units and load them * unit loading changed to first register units and load them
afterwards. This is needed to support uses xxx in yyy correctly afterwards. This is needed to support uses xxx in yyy correctly
* unit dependency check fixed * unit dependency check fixed

View File

@ -34,14 +34,11 @@
# n_ note # n_ note
# h_ hint # h_ hint
# i_ info # i_ info
# l_ linenumber # l_ add linenumber
# u_ used # u_ used
# t_ tried # t_ tried
# m_ macro
# p_ procedure
# c_ conditional # c_ conditional
# d_ debug message # d_ debug message
# b_ display overloaded procedures
# x_ executable informations # x_ executable informations
# #
@ -143,7 +140,7 @@ scan_f_syn_expected=02003_F_Syntax error, "$1" expected but "$2" found
% This indicates that the compiler expected a different token than % This indicates that the compiler expected a different token than
% the one you typed. It can occur almost everywhere where you make a % the one you typed. It can occur almost everywhere where you make a
% mistake against the pascal language. % mistake against the pascal language.
scan_t_start_include_file=02004_T_Start reading includefile $1 scan_t_start_include_file=02004_TL_Start reading includefile $1
% When you provide the \var{-vt} switch, the compiler tells you % When you provide the \var{-vt} switch, the compiler tells you
% when it starts reading an included file. % when it starts reading an included file.
scan_w_comment_level=02005_W_Comment level $1 found scan_w_comment_level=02005_W_Comment level $1 found
@ -207,28 +204,28 @@ scan_w_macro_deep_ten=02030_W_Extension of macros exceeds a deep of 16.
% recursion is used. % recursion is used.
scan_e_wrong_styled_switch=02031_E_compiler switches aren't allowed in // styled comments scan_e_wrong_styled_switch=02031_E_compiler switches aren't allowed in // styled comments
% Compiler switches should be in normal pascal style comments. % Compiler switches should be in normal pascal style comments.
scan_d_handling_switch=02032_D_Handling switch "$1" scan_d_handling_switch=02032_DL_Handling switch "$1"
% When you set debugging info on (\var{-vd}) the compiler tells you when it % When you set debugging info on (\var{-vd}) the compiler tells you when it
% is evaluating conditional compile statements. % is evaluating conditional compile statements.
scan_c_endif_found=02033_C_ENDIF $1 found scan_c_endif_found=02033_CL_ENDIF $1 found
% When you turn on conditional messages(\var{-vc}), the compiler tells you % When you turn on conditional messages(\var{-vc}), the compiler tells you
% where it encounters conditional statements. % where it encounters conditional statements.
scan_c_ifdef_found=02034_C_IFDEF $1 found, $2 scan_c_ifdef_found=02034_CL_IFDEF $1 found, $2
% When you turn on conditional messages(\var{-vc}), the compiler tells you % When you turn on conditional messages(\var{-vc}), the compiler tells you
% where it encounters conditional statements. % where it encounters conditional statements.
scan_c_ifopt_found=02035_C_IFOPT $1 found, $2 scan_c_ifopt_found=02035_CL_IFOPT $1 found, $2
% When you turn on conditional messages(\var{-vc}), the compiler tells you % When you turn on conditional messages(\var{-vc}), the compiler tells you
% where it encounters conditional statements. % where it encounters conditional statements.
scan_c_if_found=02036_C_IF $1 found, $2 scan_c_if_found=02036_CL_IF $1 found, $2
% When you turn on conditional messages(\var{-vc}), the compiler tells you % When you turn on conditional messages(\var{-vc}), the compiler tells you
% where it encounters conditional statements. % where it encounters conditional statements.
scan_c_ifndef_found=02037_C_IFNDEF $1 found, $2 scan_c_ifndef_found=02037_CL_IFNDEF $1 found, $2
% When you turn on conditional messages(\var{-vc}), the compiler tells you % When you turn on conditional messages(\var{-vc}), the compiler tells you
% where it encounters conditional statements. % where it encounters conditional statements.
scan_c_else_found=02038_C_ELSE $1 found, $2 scan_c_else_found=02038_CL_ELSE $1 found, $2
% When you turn on conditional messages(\var{-vc}), the compiler tells you % When you turn on conditional messages(\var{-vc}), the compiler tells you
% where it encounters conditional statements. % where it encounters conditional statements.
scan_c_skipping_until=02039_C_Skipping until... scan_c_skipping_until=02039_CL_Skipping until...
% When you turn on conditional messages(\var{-vc}), the compiler tells you % When you turn on conditional messages(\var{-vc}), the compiler tells you
% where it encounters conditional statements, and whether it is skipping or % where it encounters conditional statements, and whether it is skipping or
% compiling parts. % compiling parts.
@ -243,7 +240,7 @@ scan_w_unsupported_switch=02041_W_Unsupported switch "$1"
scan_w_illegal_directive=02042_W_Illegal compiler directive "$1" scan_w_illegal_directive=02042_W_Illegal compiler directive "$1"
% When warings are turned on (\var{-vw}) the compiler warns you about % When warings are turned on (\var{-vw}) the compiler warns you about
% unrecognised switches. For a list of recognised switches, \progref % unrecognised switches. For a list of recognised switches, \progref
scan_t_back_in=02043_T_Back in $1 scan_t_back_in=02043_TL_Back in $1
% When you use (\var{-vt}) the compiler tells you when it has finished % When you use (\var{-vt}) the compiler tells you when it has finished
% reading an include file. % reading an include file.
scan_w_unsupported_app_type=02044_W_Unsupported application type: "$1" scan_w_unsupported_app_type=02044_W_Unsupported application type: "$1"
@ -433,8 +430,8 @@ parser_e_header_dont_match_any_member=03048_E_function header doesn't match any
% This happens when the compiler scans a procedure declaration that contains % This happens when the compiler scans a procedure declaration that contains
% a dot, i.e., a object or class method, but the procedure name is not a % a dot, i.e., a object or class method, but the procedure name is not a
% procedure of this type. % procedure of this type.
parser_p_procedure_start=03049_P_procedure/function $1 parser_d_procedure_start=03049_DL_procedure/function $1
% When using the \var{-vp} switch, the compiler tells you when it starts % When using the \var{-vd} switch, the compiler tells you when it starts
% processing a procedure or function implementation. % processing a procedure or function implementation.
parser_e_error_in_real=03050_E_Illegal floating point constant parser_e_error_in_real=03050_E_Illegal floating point constant
% The compiler expects a floating point expression, and gets something else. % The compiler expects a floating point expression, and gets something else.
@ -634,22 +631,22 @@ parser_w_virtual_without_constructor=03100_W_Virtual methods are used without a
% to have a constructor and destructor to initialize them. The compiler % to have a constructor and destructor to initialize them. The compiler
% encountered an object or class with virtual methods that doesn't have % encountered an object or class with virtual methods that doesn't have
% a constructor/destructor pair. % a constructor/destructor pair.
parser_m_macro_defined=03101_M_Macro defined: $1 parser_c_macro_defined=03101_CL_Macro defined: $1
% When \var{-vm} is used, the compiler tells you when it defines macros. % When \var{-vc} is used, the compiler tells you when it defines macros.
parser_m_macro_undefined=03102_M_Macro undefined: $1 parser_c_macro_undefined=03102_CL_Macro undefined: $1
% When \var{-vm} is used, the compiler tells you when it undefines macros. % When \var{-vc} is used, the compiler tells you when it undefines macros.
parser_m_macro_set_to=03103_M_Macro $1 set to $2 parser_c_macro_set_to=03103_CL_Macro $1 set to $2
% When \var{-vm} is used, the compiler tells you what values macros get. % When \var{-vc} is used, the compiler tells you what values macros get.
parser_i_compiling=03104_I_Compiling $1 parser_i_compiling=03104_I_Compiling $1
% When you turn on information messages (\var{-vi}), the compiler tells you % When you turn on information messages (\var{-vi}), the compiler tells you
% what units it is recompiling. % what units it is recompiling.
parser_u_parsing_interface=03105_U_Parsing interface of unit $1 parser_u_parsing_interface=03105_UL_Parsing interface of unit $1
% This tells you that the reading of the interface % This tells you that the reading of the interface
% of the current unit starts % of the current unit starts
parser_u_parsing_implementation=03106_U_Parsing implementation of $1 parser_u_parsing_implementation=03106_UL_Parsing implementation of $1
% This tells you that the code reading of the implementation % This tells you that the code reading of the implementation
% of the current unit, library or program starts % of the current unit, library or program starts
parser_d_compiling_second_time=03107_D_Compiling $1 for the second time parser_d_compiling_second_time=03107_DL_Compiling $1 for the second time
% When you request debug messages (\var{-vd}) the compiler tells you what % When you request debug messages (\var{-vd}) the compiler tells you what
% units it recompiles for the second time. % units it recompiles for the second time.
parser_e_no_property_found_to_override=03109_E_No property found to override parser_e_no_property_found_to_override=03109_E_No property found to override
@ -1219,8 +1216,8 @@ sym_n_uninitialized_variable=05037_W_Variable "$1" does not seem to be initializ
sym_e_id_no_member=05038_E_identifier idents no member "$1" sym_e_id_no_member=05038_E_identifier idents no member "$1"
% This error is generated when an identifier of a record, % This error is generated when an identifier of a record,
% field, or method is accessed while it is not defined. % field, or method is accessed while it is not defined.
sym_b_param_list=05039_B_Found declaration: $1 sym_h_param_list=05039_H_Found declaration: $1
% You get this when you use the \var{-vb} switch. In case an overloaded % You get this when you use the \var{-vh} switch. In case an overloaded
% procedure is not found, then all candidate overloaded procedures are % procedure is not found, then all candidate overloaded procedures are
% listed, with their parameter lists. % listed, with their parameter lists.
sym_e_segment_too_large=05040_E_Data element too large sym_e_segment_too_large=05040_E_Data element too large
@ -1332,10 +1329,10 @@ cg_w_unreachable_code=06018_W_unreachable code
cg_e_cant_call_abstract_method=06020_E_Abstract methods can't be called directly cg_e_cant_call_abstract_method=06020_E_Abstract methods can't be called directly
% You cannot call an abstract method directy, instead you must call a % You cannot call an abstract method directy, instead you must call a
% overriding child method, because an abstract method isn't implemented. % overriding child method, because an abstract method isn't implemented.
cg_d_register_weight=06027_D_Register $1 weight $2 $3 cg_d_register_weight=06027_DL_Register $1 weight $2 $3
% Debugging message. Shown when the compiler considers a variable for % Debugging message. Shown when the compiler considers a variable for
% keeping in the registers. % keeping in the registers.
cg_d_stackframe_omited=06029_D_Stack frame is omitted cg_d_stackframe_omited=06029_DL_Stack frame is omitted
% Some procedure/functions do not need a complete stack-frame, so it is omitted. % Some procedure/functions do not need a complete stack-frame, so it is omitted.
% This message will be displayed when the {-vd} switch is used. % This message will be displayed when the {-vd} switch is used.
cg_e_unable_inline_object_methods=06031_E_Object or class methods can't be inline. cg_e_unable_inline_object_methods=06031_E_Object or class methods can't be inline.
@ -1404,9 +1401,9 @@ cg_e_localsize_too_big=06043_E_Local variables size exceeds supported limit
# #
# 07097 is the last used one # 07097 is the last used one
# #
asmr_d_start_reading=07000_D_Starting $1 styled assembler parsing asmr_d_start_reading=07000_DL_Starting $1 styled assembler parsing
% This informs you that an assembler block is being parsed % This informs you that an assembler block is being parsed
asmr_d_finish_reading=07001_D_Finished $1 styled assembler parsing asmr_d_finish_reading=07001_DL_Finished $1 styled assembler parsing
% This informs you that an assembler block has finished. % This informs you that an assembler block has finished.
asmr_e_none_label_contain_at=07002_E_Non-label pattern contains @ asmr_e_none_label_contain_at=07002_E_Non-label pattern contains @
% A identifier which isn't a label can't contain a @. % A identifier which isn't a label can't contain a @.

View File

@ -116,7 +116,7 @@ const
parser_e_no_type_not_allowed_here=03046; parser_e_no_type_not_allowed_here=03046;
parser_e_methode_id_expected=03047; parser_e_methode_id_expected=03047;
parser_e_header_dont_match_any_member=03048; parser_e_header_dont_match_any_member=03048;
parser_p_procedure_start=03049; parser_d_procedure_start=03049;
parser_e_error_in_real=03050; parser_e_error_in_real=03050;
parser_e_fail_only_in_constructor=03051; parser_e_fail_only_in_constructor=03051;
parser_e_no_paras_for_destructor=03052; parser_e_no_paras_for_destructor=03052;
@ -165,9 +165,9 @@ const
parser_e_abstract_no_definition=03098; parser_e_abstract_no_definition=03098;
parser_e_overloaded_must_be_all_global=03099; parser_e_overloaded_must_be_all_global=03099;
parser_w_virtual_without_constructor=03100; parser_w_virtual_without_constructor=03100;
parser_m_macro_defined=03101; parser_c_macro_defined=03101;
parser_m_macro_undefined=03102; parser_c_macro_undefined=03102;
parser_m_macro_set_to=03103; parser_c_macro_set_to=03103;
parser_i_compiling=03104; parser_i_compiling=03104;
parser_u_parsing_interface=03105; parser_u_parsing_interface=03105;
parser_u_parsing_implementation=03106; parser_u_parsing_implementation=03106;
@ -336,7 +336,7 @@ const
sym_n_uninitialized_local_variable=05036; sym_n_uninitialized_local_variable=05036;
sym_n_uninitialized_variable=05037; sym_n_uninitialized_variable=05037;
sym_e_id_no_member=05038; sym_e_id_no_member=05038;
sym_b_param_list=05039; sym_h_param_list=05039;
sym_e_segment_too_large=05040; sym_e_segment_too_large=05040;
sym_e_no_matching_implementation_found=05042; sym_e_no_matching_implementation_found=05042;
sym_w_deprecated_symbol=05043; sym_w_deprecated_symbol=05043;
@ -607,7 +607,7 @@ const
option_info=11024; option_info=11024;
option_help_pages=11025; option_help_pages=11025;
MsgTxtSize = 34252; MsgTxtSize = 34273;
MsgIdxMax : array[1..20] of longint=( MsgIdxMax : array[1..20] of longint=(
17,62,194,50,57,44,98,19,35,43, 17,62,194,50,57,44,98,19,35,43,

File diff suppressed because it is too large Load Diff

View File

@ -754,7 +754,9 @@ implementation
function tfornode.pass_1 : tnode; function tfornode.pass_1 : tnode;
var var
old_t_times : longint; old_t_times : longint;
{$ifdef loopvar_dont_mind}
hp : Tnode; hp : Tnode;
{$endif loopvar_dont_mind}
begin begin
result:=nil; result:=nil;
{ Calc register weight } { Calc register weight }
@ -1450,7 +1452,11 @@ begin
end. end.
{ {
$Log$ $Log$
Revision 1.63 2003-01-04 08:08:47 daniel Revision 1.64 2003-01-09 21:52:37 peter
* merged some verbosity options.
* V_LineInfo is a verbosity flag to include line info
Revision 1.63 2003/01/04 08:08:47 daniel
* Readded missing variable * Readded missing variable
Revision 1.62 2003/01/03 17:16:57 peter Revision 1.62 2003/01/03 17:16:57 peter

View File

@ -715,7 +715,6 @@ implementation
function tvecnode.det_resulttype:tnode; function tvecnode.det_resulttype:tnode;
var var
htype : ttype; htype : ttype;
ct : tconverttype;
begin begin
result:=nil; result:=nil;
resulttypepass(left); resulttypepass(left);
@ -1055,7 +1054,11 @@ begin
end. end.
{ {
$Log$ $Log$
Revision 1.44 2003-01-06 21:16:52 peter Revision 1.45 2003-01-09 21:52:37 peter
* merged some verbosity options.
* V_LineInfo is a verbosity flag to include line info
Revision 1.44 2003/01/06 21:16:52 peter
* po_addressonly added to retrieve the address of a methodpointer * po_addressonly added to retrieve the address of a methodpointer
only, this is used for @tclass.method which has no self pointer only, this is used for @tclass.method which has no self pointer

View File

@ -519,7 +519,6 @@ implementation
var var
procdefcoll : pprocdefcoll; procdefcoll : pprocdefcoll;
hp : pprocdeflist;
symcoll : psymcoll; symcoll : psymcoll;
_name : string; _name : string;
_speed : cardinal; _speed : cardinal;
@ -1333,7 +1332,11 @@ initialization
end. end.
{ {
$Log$ $Log$
Revision 1.38 2002-11-25 17:43:20 peter Revision 1.39 2003-01-09 21:52:37 peter
* merged some verbosity options.
* V_LineInfo is a verbosity flag to include line info
Revision 1.38 2002/11/25 17:43:20 peter
* splitted defbase in defutil,symutil,defcmp * splitted defbase in defutil,symutil,defcmp
* merged isconvertable and is_equal into compare_defs(_ext) * merged isconvertable and is_equal into compare_defs(_ext)
* made operator search faster by walking the list only once * made operator search faster by walking the list only once

View File

@ -231,7 +231,6 @@ implementation
s : string; s : string;
tt : ttype; tt : ttype;
arraytype : ttype; arraytype : ttype;
declarepos : tfileposinfo;
pp : Tprocdef; pp : Tprocdef;
pd : tprocdef; pd : tprocdef;
pt : tnode; pt : tnode;
@ -1173,7 +1172,11 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.57 2002-11-25 17:43:21 peter Revision 1.58 2003-01-09 21:52:37 peter
* merged some verbosity options.
* V_LineInfo is a verbosity flag to include line info
Revision 1.57 2002/11/25 17:43:21 peter
* splitted defbase in defutil,symutil,defcmp * splitted defbase in defutil,symutil,defcmp
* merged isconvertable and is_equal into compare_defs(_ext) * merged isconvertable and is_equal into compare_defs(_ext)
* made operator search faster by walking the list only once * made operator search faster by walking the list only once

View File

@ -684,8 +684,7 @@ implementation
{ compile procedure when a body is needed } { compile procedure when a body is needed }
if (pdflags and pd_body)<>0 then if (pdflags and pd_body)<>0 then
begin begin
Message1(parser_p_procedure_start, Message1(parser_d_procedure_start,aktprocdef.fullprocname);
aktprocdef.fullprocname);
if assigned(aktprocsym.owner) then if assigned(aktprocsym.owner) then
aktprocdef.aliasnames.insert(aktprocdef.mangledname); aktprocdef.aliasnames.insert(aktprocdef.mangledname);
@ -847,7 +846,11 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.90 2003-01-09 20:40:59 daniel Revision 1.91 2003-01-09 21:52:37 peter
* merged some verbosity options.
* V_LineInfo is a verbosity flag to include line info
Revision 1.90 2003/01/09 20:40:59 daniel
* Converted some code in cgx86.pas to new register numbering * Converted some code in cgx86.pas to new register numbering
Revision 1.89 2003/01/09 15:49:56 daniel Revision 1.89 2003/01/09 15:49:56 daniel

View File

@ -546,12 +546,12 @@ implementation
begin begin
mac:=tmacro.create(hs); mac:=tmacro.create(hs);
mac.defined:=true; mac.defined:=true;
Message1(parser_m_macro_defined,mac.name); Message1(parser_c_macro_defined,mac.name);
current_scanner.macros.insert(mac); current_scanner.macros.insert(mac);
end end
else else
begin begin
Message1(parser_m_macro_defined,mac.name); Message1(parser_c_macro_defined,mac.name);
mac.defined:=true; mac.defined:=true;
{ delete old definition } { delete old definition }
if assigned(mac.buftext) then if assigned(mac.buftext) then
@ -635,13 +635,13 @@ implementation
if not assigned(mac) then if not assigned(mac) then
begin begin
mac:=tmacro.create(hs); mac:=tmacro.create(hs);
Message1(parser_m_macro_undefined,mac.name); Message1(parser_c_macro_undefined,mac.name);
mac.defined:=false; mac.defined:=false;
current_scanner.macros.insert(mac); current_scanner.macros.insert(mac);
end end
else else
begin begin
Message1(parser_m_macro_undefined,mac.name); Message1(parser_c_macro_undefined,mac.name);
mac.defined:=false; mac.defined:=false;
{ delete old definition } { delete old definition }
if assigned(mac.buftext) then if assigned(mac.buftext) then
@ -962,7 +962,7 @@ implementation
if mac=nil then if mac=nil then
begin begin
mac:=tmacro.create(s); mac:=tmacro.create(s);
Message1(parser_m_macro_defined,mac.name); Message1(parser_c_macro_defined,mac.name);
macros.insert(mac); macros.insert(mac);
end; end;
mac.defined:=true; mac.defined:=true;
@ -985,7 +985,7 @@ implementation
if assigned(mac.buftext) then if assigned(mac.buftext) then
freemem(mac.buftext,mac.buflen); freemem(mac.buftext,mac.buflen);
end; end;
Message2(parser_m_macro_set_to,mac.name,value); Message2(parser_c_macro_set_to,mac.name,value);
mac.buflen:=length(value); mac.buflen:=length(value);
getmem(mac.buftext,mac.buflen); getmem(mac.buftext,mac.buflen);
move(value[1],mac.buftext^,mac.buflen); move(value[1],mac.buftext^,mac.buflen);
@ -2801,7 +2801,11 @@ exit_label:
end. end.
{ {
$Log$ $Log$
Revision 1.56 2002-12-29 14:57:50 peter Revision 1.57 2003-01-09 21:52:37 peter
* merged some verbosity options.
* V_LineInfo is a verbosity flag to include line info
Revision 1.56 2002/12/29 14:57:50 peter
* unit loading changed to first register units and load them * unit loading changed to first register units and load them
afterwards. This is needed to support uses xxx in yyy correctly afterwards. This is needed to support uses xxx in yyy correctly
* unit dependency check fixed * unit dependency check fixed

View File

@ -285,8 +285,6 @@ type
tvarspez = (vs_value,vs_const,vs_var,vs_out,vs_hidden); tvarspez = (vs_value,vs_const,vs_var,vs_out,vs_hidden);
targconvtyp = (act_convertable,act_equal,act_exact);
absolutetyp = (tovar,toasm,toaddr); absolutetyp = (tovar,toasm,toaddr);
tconsttyp = (constnone, tconsttyp = (constnone,
@ -300,6 +298,17 @@ type
fullrtti,initrtti fullrtti,initrtti
); );
{ The order is from low priority to high priority,
Note: the operators > and < are used on this list }
tequaltype = (
te_incompatible,
te_convert_operator,
te_convert_l2, { compatible conversion with possible loss of data }
te_convert_l1, { compatible conversion }
te_equal, { the definitions are equal }
te_exact
);
{$ifdef GDB} {$ifdef GDB}
type type
tdefstabstatus = ( tdefstabstatus = (
@ -332,18 +341,35 @@ const
]; ];
const const
SymTypeName : array[tsymtyp] of string[12] = SymTypeName : array[tsymtyp] of string[12] = (
('abstractsym','variable','type','proc','unit', 'abstractsym','variable','type','proc','unit',
'const','enum','typed const','errorsym','system sym', 'const','enum','typed const','errorsym','system sym',
'label','absolute','property','funcret', 'label','absolute','property','funcret',
'macrosym','rttisym'); 'macrosym','rttisym'
);
DefTypeName : array[tdeftype] of string[12] = (
'abstractdef','arraydef','recorddef','pointerdef','orddef',
'stringdef','enumdef','procdef','objectdef','errordef',
'filedef','formaldef','setdef','procvardef','floatdef',
'classrefdef','forwarddef','variantdef'
);
EqualTypeName : array[tequaltype] of string[16] = (
'incompatible','convert_operator','convert_l2','convert_l1',
'equal','exact'
);
implementation implementation
end. end.
{ {
$Log$ $Log$
Revision 1.44 2003-01-06 21:16:52 peter Revision 1.45 2003-01-09 21:52:37 peter
* merged some verbosity options.
* V_LineInfo is a verbosity flag to include line info
Revision 1.44 2003/01/06 21:16:52 peter
* po_addressonly added to retrieve the address of a methodpointer * po_addressonly added to retrieve the address of a methodpointer
only, this is used for @tclass.method which has no self pointer only, this is used for @tclass.method which has no self pointer

View File

@ -100,11 +100,12 @@ interface
tparaitem = class(TLinkedListItem) tparaitem = class(TLinkedListItem)
paratype : ttype; paratype : ttype;
parasym : tsym; parasym : tsym;
defaultvalue : tsym; { tconstsym }
paratyp : tvarspez; paratyp : tvarspez;
paraloc : tparalocation; paraloc : tparalocation;
argconvtyp : targconvtyp; {$ifdef EXTDEBUG}
convertlevel : byte; eqval : tequaltype;
defaultvalue : tsym; { tconstsym } {$endif EXTDEBUG}
end; end;
{ this is only here to override the count method, { this is only here to override the count method,
@ -5598,7 +5599,11 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.123 2003-01-06 21:16:52 peter Revision 1.124 2003-01-09 21:52:37 peter
* merged some verbosity options.
* V_LineInfo is a verbosity flag to include line info
Revision 1.123 2003/01/06 21:16:52 peter
* po_addressonly added to retrieve the address of a methodpointer * po_addressonly added to retrieve the address of a methodpointer
only, this is used for @tclass.method which has no self pointer only, this is used for @tclass.method which has no self pointer

View File

@ -854,7 +854,7 @@ implementation
while assigned(p) do while assigned(p) do
begin begin
if p^.def<>skipdef then if p^.def<>skipdef then
MessagePos1(p^.def.fileinfo,sym_b_param_list,p^.def.fullprocname); MessagePos1(p^.def.fileinfo,sym_h_param_list,p^.def.fullprocname);
p:=p^.next; p:=p^.next;
end; end;
end; end;
@ -2563,7 +2563,11 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.91 2003-01-08 18:43:57 daniel Revision 1.92 2003-01-09 21:52:38 peter
* merged some verbosity options.
* V_LineInfo is a verbosity flag to include line info
Revision 1.91 2003/01/08 18:43:57 daniel
* Tregister changed into a record * Tregister changed into a record
Revision 1.90 2003/01/03 12:15:56 daniel Revision 1.90 2003/01/03 12:15:56 daniel

View File

@ -43,7 +43,7 @@ uses
{$i msgidx.inc} {$i msgidx.inc}
Const Const
{ <$10000 will show file and line } { Levels }
V_None = $0; V_None = $0;
V_Fatal = $1; V_Fatal = $1;
V_Error = $2; V_Error = $2;
@ -51,20 +51,20 @@ Const
V_Warning = $8; V_Warning = $8;
V_Note = $10; V_Note = $10;
V_Hint = $20; V_Hint = $20;
V_Macro = $100; V_LineInfoMask = $fff;
V_Procedure = $200; { From here by default no line info }
V_Conditional = $400; V_Info = $1000;
V_Assem = $800; V_Status = $2000;
V_Declarations = $1000; V_Used = $4000;
V_Info = $10000; V_Tried = $8000;
V_Status = $20000; V_Conditional = $10000;
V_Used = $40000; V_Debug = $20000;
V_Tried = $80000; V_Executable = $40000;
V_Debug = $100000; V_LevelMask = $fffffff;
V_Executable = $200000; V_All = V_LevelMask;
V_ShowFile = $ffff;
V_All = longint($ffffffff);
V_Default = V_Fatal + V_Error + V_Normal; V_Default = V_Fatal + V_Error + V_Normal;
{ Flags }
V_LineInfo = $10000000;
var var
msg : pmessage; msg : pmessage;
@ -76,6 +76,7 @@ procedure SetRedirectFile(const fn:string);
function SetVerbosity(const s:string):boolean; function SetVerbosity(const s:string):boolean;
procedure PrepareReport; procedure PrepareReport;
function CheckVerbosity(v:longint):boolean;
procedure SetCompileModule(p:tmodulebase); procedure SetCompileModule(p:tmodulebase);
procedure Stop; procedure Stop;
procedure ShowStatus; procedure ShowStatus;
@ -158,6 +159,13 @@ var
end; end;
function CheckVerbosity(v:longint):boolean;
begin
CheckVerbosity:=status.use_bugreport or
((status.verbosity and (v and V_LevelMask))=(v and V_LevelMask));
end;
function SetVerbosity(const s:string):boolean; function SetVerbosity(const s:string):boolean;
var var
m : Longint; m : Longint;
@ -235,14 +243,6 @@ var
status.verbosity:=status.verbosity and (not V_Tried) status.verbosity:=status.verbosity and (not V_Tried)
else else
status.verbosity:=status.verbosity or V_Tried; status.verbosity:=status.verbosity or V_Tried;
'M' : if inverse then
status.verbosity:=status.verbosity and (not V_Macro)
else
status.verbosity:=status.verbosity or V_Macro;
'P' : if inverse then
status.verbosity:=status.verbosity and (not V_Procedure)
else
status.verbosity:=status.verbosity or V_Procedure;
'C' : if inverse then 'C' : if inverse then
status.verbosity:=status.verbosity and (not V_Conditional) status.verbosity:=status.verbosity and (not V_Conditional)
else else
@ -251,18 +251,10 @@ var
status.verbosity:=status.verbosity and (not V_Debug) status.verbosity:=status.verbosity and (not V_Debug)
else else
status.verbosity:=status.verbosity or V_Debug; status.verbosity:=status.verbosity or V_Debug;
'B' : if inverse then
status.verbosity:=status.verbosity and (not V_Declarations)
else
status.verbosity:=status.verbosity or V_Declarations;
'X' : if inverse then 'X' : if inverse then
status.verbosity:=status.verbosity and (not V_Executable) status.verbosity:=status.verbosity and (not V_Executable)
else else
status.verbosity:=status.verbosity or V_Executable; status.verbosity:=status.verbosity or V_Executable;
'Z' : if inverse then
status.verbosity:=status.verbosity and (not V_Assem)
else
status.verbosity:=status.verbosity or V_Assem;
end; end;
inc(i); inc(i);
end; end;
@ -449,9 +441,10 @@ var
(status.errorhint and ((l and V_Hint)<>0)) then (status.errorhint and ((l and V_Hint)<>0)) then
inc(status.errorcount); inc(status.errorcount);
{ check verbosity level } { check verbosity level }
if ((status.verbosity and l)<>l) and if not CheckVerbosity(l) then
(not status.use_bugreport) then
exit; exit;
if (l and V_LineInfoMask)<>0 then
l:=l or V_LineInfo;
{ Create status info } { Create status info }
UpdateStatus; UpdateStatus;
{ Fix replacements } { Fix replacements }
@ -520,25 +513,17 @@ var
'I' : 'I' :
v:=v or V_Info; v:=v or V_Info;
'L' : 'L' :
v:=v or V_Status; v:=v or V_LineInfo;
'U' : 'U' :
v:=v or V_Used; v:=v or V_Used;
'T' : 'T' :
v:=v or V_Tried; v:=v or V_Tried;
'M' :
v:=v or V_Macro;
'P' :
v:=v or V_Procedure;
'C' : 'C' :
v:=v or V_Conditional; v:=v or V_Conditional;
'D' : 'D' :
v:=v or V_Debug; v:=v or V_Debug;
'B' :
v:=v or V_Declarations;
'X' : 'X' :
v:=v or V_Executable; v:=v or V_Executable;
'Z' :
v:=v or V_Assem;
'S' : 'S' :
dostop:=true; dostop:=true;
'_' : ; '_' : ;
@ -547,9 +532,10 @@ var
end; end;
Delete(s,1,idx); Delete(s,1,idx);
{ check verbosity level } { check verbosity level }
if ((status.verbosity and v)<>v) and if not CheckVerbosity(v) then
(not status.use_bugreport) then exit;
exit; if (v and V_LineInfoMask)<>0 then
v:=v or V_LineInfo;
{ fix status } { fix status }
UpdateStatus; UpdateStatus;
{ Fix replacements } { Fix replacements }
@ -711,7 +697,11 @@ finalization
end. end.
{ {
$Log$ $Log$
Revision 1.23 2002-12-29 14:57:50 peter Revision 1.24 2003-01-09 21:52:38 peter
* merged some verbosity options.
* V_LineInfo is a verbosity flag to include line info
Revision 1.23 2002/12/29 14:57:50 peter
* unit loading changed to first register units and load them * unit loading changed to first register units and load them
afterwards. This is needed to support uses xxx in yyy correctly afterwards. This is needed to support uses xxx in yyy correctly
* unit dependency check fixed * unit dependency check fixed