diff --git a/.gitattributes b/.gitattributes index a2cd3a55e0..93cd6ea3dc 100644 --- a/.gitattributes +++ b/.gitattributes @@ -304,6 +304,8 @@ compiler/nopt.pas svneol=native#text/plain compiler/nset.pas svneol=native#text/plain compiler/nstate.pas svneol=native#text/plain compiler/nutils.pas svneol=native#text/plain +compiler/objcgutl.pas svneol=native#text/plain +compiler/objcutil.pas svneol=native#text/plain compiler/ogbase.pas svneol=native#text/plain compiler/ogcoff.pas svneol=native#text/plain compiler/ogelf.pas svneol=native#text/plain @@ -5479,7 +5481,7 @@ rtl/inc/mouse.inc svneol=native#text/plain rtl/inc/mouseh.inc svneol=native#text/plain rtl/inc/mvecimp.inc svneol=native#text/plain rtl/inc/objc1.pp svneol=native#text/plain -rtl/inc/objc1h.inc svneol=native#text/plain +rtl/inc/objcbase.pp svneol=native#text/plain rtl/inc/objects.pp svneol=native#text/plain rtl/inc/objpas.inc svneol=native#text/plain rtl/inc/objpash.inc svneol=native#text/plain @@ -7913,6 +7915,7 @@ tests/test/tmsg2.pp svneol=native#text/plain tests/test/tmsg3.pp svneol=native#text/plain tests/test/tmsg4.pp svneol=native#text/plain tests/test/tmt1.pp svneol=native#text/plain +tests/test/tobjc1.pp svneol=native#text/plain tests/test/tobject1.pp svneol=native#text/plain tests/test/tobject2.pp svneol=native#text/plain tests/test/tobject3.pp svneol=native#text/plain diff --git a/compiler/aasmdata.pas b/compiler/aasmdata.pas index 2dfb78471d..688b37a8f8 100644 --- a/compiler/aasmdata.pas +++ b/compiler/aasmdata.pas @@ -79,7 +79,8 @@ interface sp_ansistr, sp_widestr, sp_unicodestr, - sp_objcselector + sp_objcselector, + sp_objcmetaclass ); const diff --git a/compiler/dbgdwarf.pas b/compiler/dbgdwarf.pas index 6664391f84..b52baa333d 100644 --- a/compiler/dbgdwarf.pas +++ b/compiler/dbgdwarf.pas @@ -3014,6 +3014,13 @@ implementation current_asmdata.asmlists[al_dwarf_info].concat(tai_symbol.create(def_dwarf_class_struct_lab(def),0)); doappend; end; + odt_objcclass: + begin + // Objective-C class: plain pointer for now + append_entry(DW_TAG_pointer_type,false,[]); + append_labelentry_ref(DW_AT_type,def_dwarf_lab(voidpointertype)); + finish_entry; + end; else internalerror(200602041); end; diff --git a/compiler/msg/errore.msg b/compiler/msg/errore.msg index a2d779f11a..16bfe8ddce 100644 --- a/compiler/msg/errore.msg +++ b/compiler/msg/errore.msg @@ -366,7 +366,7 @@ scan_w_multiple_main_name_overrides=02086_W_Overriding name of "main" procedure # # Parser # -# 03250 is the last used one +# 03252 is the last used one # % \section{Parser messages} % This section lists all parser messages. The parser takes care of the @@ -1176,7 +1176,24 @@ parser_n_ignore_lower_visibility=03250_N_Virtual method "$1" has a lower visibil % The virtual method overrides an method that is declared with a higher visibility. This might give % unexpected results. In case the new visibility is private than it might be that a call to inherited in a % new child class will call the higher visible method in a parent class and ignores the private method. +parser_e_objc_requires_msgstr=03251_E_Objective-C messages require their Objective-C selector name to be specified using the "message" directive. +% Objective-C messages require their Objective-C name (selector name) to be specified using the \var{message `someName:'} procedure directive. +% While bindings to other languages automatically generate such names based on the identifier you use (by replacing +% all underscores with colons), this is unsafe since nothing prevents an Objective-C method name to contain actual +% colons. +parser_e_objc_no_constructor_destructor=03252_E_Objective-C does not have formal constructors or destructors. Use initXXX and the dealloc instance methods. +% The Objective-C language does not have any constructors or destructors. While there are some messages with a similar +% purpose (such as \var{init} and \var{dealloc}), these cannot be identified using automatic parsers and do not +% guarantee anything like Pascal constructors/destructors (e.g., you have to take care of only calling ``designated'' +% inherited ``constructors''). For these reasons, we have opted to follow the standard Objective-C patterns for +% instance creation/destruction. +parser_e_message_string_too_long=03253_E_Message name is too long (max. 255 characters) +% Due to compiler implementation reasons, message names are currently limited to 255 characters. +parser_e_objc_message_name_too_long=03254_E_Objective-C message symbol name for "$1" is too long +% Due to compiler implementation reasons, mangled message names (i.e., the symbol names used in the assembler +% code) are currently limited to 255 characters. % \end{description} + # # Type Checking # @@ -1785,6 +1802,11 @@ cg_e_goto_label_not_found=06049_E_Goto label "$1" not defined or optimized away % The label used in the goto definition is not defined or optimized away by the % unreachable code elemination. % \end{description} +cg_f_unknown_type_in_unit=06050_F_Cannot find type "$1" in unit "$2". Check if you use the correct run time library. +% The compiler expects that the runtime library contains certain type definitions. If you see this error +% and you didn't change the runtime library code, it's very likely that the runtime library +% you're using doesn't match the compiler in use. If you changed the runtime library this error means +% that you removed a type which the compiler needs for internal use. # EndOfTeX # diff --git a/compiler/msgidx.inc b/compiler/msgidx.inc index 6e36d4066e..29f8991db9 100644 --- a/compiler/msgidx.inc +++ b/compiler/msgidx.inc @@ -338,6 +338,10 @@ const parser_e_weak_external_not_supported=03248; parser_e_forward_mismatch=03249; parser_n_ignore_lower_visibility=03250; + parser_e_objc_requires_msgstr=03251; + parser_e_objc_no_constructor_destructor=03252; + parser_e_message_string_too_long=03253; + parser_e_objc_message_name_too_long=03254; type_e_mismatch=04000; type_e_incompatible_types=04001; type_e_not_equal_types=04002; @@ -494,6 +498,7 @@ const cg_f_unknown_system_type=06047; cg_h_inherited_ignored=06048; cg_e_goto_label_not_found=06049; + cg_f_unknown_type_in_unit=06050; asmr_d_start_reading=07000; asmr_d_finish_reading=07001; asmr_e_none_label_contain_at=07002; @@ -787,9 +792,9 @@ const option_info=11024; option_help_pages=11025; - MsgTxtSize = 51070; + MsgTxtSize = 51509; MsgIdxMax : array[1..20] of longint=( - 24,87,251,88,65,50,108,22,202,62, + 24,87,255,88,65,51,108,22,202,62, 47,20,1,1,1,1,1,1,1,1 ); diff --git a/compiler/msgtxt.inc b/compiler/msgtxt.inc index 470614fd03..e3fab9e624 100644 --- a/compiler/msgtxt.inc +++ b/compiler/msgtxt.inc @@ -1,7 +1,7 @@ {$ifdef Delphi} -const msgtxt : array[0..000212] of string[240]=( +const msgtxt : array[0..000214] of string[240]=( {$else Delphi} -const msgtxt : array[0..000212,1..240] of char=( +const msgtxt : array[0..000214,1..240] of char=( {$endif Delphi} '01000_T_Compiler: $1'#000+ '01001_D_Compiler OS: $1'#000+ @@ -388,364 +388,369 @@ const msgtxt : array[0..000212,1..240] of char=( '03249_E_Forward type definition does not match'#000+ '03250_N_Virtual method "$1" has a lower visibility ($2) than parent cl'+ 'ass $3 ($4)'#000+ + '03251_E_Objective-C messages require their Objec','tive-C selector name'+ + ' to be specified using the "message" directive.'#000+ + '03252_E_Objective-C does not have formal constructors or destructors. '+ + 'Use initXXX and the dealloc instance methods.'#000+ + '03253_E_Message name is too long (max. 255 characters)'#000+ + '0','3254_E_Objective-C message symbol name for "$1" is too long'#000+ '04000_E_Type mismatch'#000+ - '04001_E_Incompatible types',': got "$1" expected "$2"'#000+ + '04001_E_Incompatible types: got "$1" expected "$2"'#000+ '04002_E_Type mismatch between "$1" and "$2"'#000+ '04003_E_Type identifier expected'#000+ - '04004_E_Variable identifier expected'#000+ + '04004_E_Variable identifier ex','pected'#000+ '04005_E_Integer expression expected, but got "$1"'#000+ '04006_E_Boolean expression expected, but got "$1"'#000+ - '0','4007_E_Ordinal expression expected'#000+ + '04007_E_Ordinal expression expected'#000+ '04008_E_pointer type expected, but got "$1"'#000+ '04009_E_class type expected, but got "$1"'#000+ - '04011_E_Can'#039't evaluate constant expression'#000+ + '04011_E_Can',#039't evaluate constant expression'#000+ '04012_E_Set elements are not compatible'#000+ - '04013_E_Operation not implemented fo','r sets'#000+ + '04013_E_Operation not implemented for sets'#000+ '04014_W_Automatic type conversion from floating type to COMP which is '+ 'an integer type'#000+ - '04015_H_use DIV instead to get an integer result'#000+ + '04015_H_use DIV instead to get an integ','er result'#000+ '04016_E_string types doesn'#039't match, because of $V+ mode'#000+ - '04017_E_succ or pred on enums with assignm','ents not possible'#000+ + '04017_E_succ or pred on enums with assignments not possible'#000+ '04018_E_Can'#039't read or write variables of this type'#000+ '04019_E_Can'#039't use readln or writeln on typed file'#000+ - '04020_E_Can'#039't use read or write on untyped file.'#000+ + '04020_E_Can'#039't',' use read or write on untyped file.'#000+ '04021_E_Type conflict between set elements'#000+ - '04022_W_lo/hi(dword/qword) re','turns the upper/lower word/dword'#000+ + '04022_W_lo/hi(dword/qword) returns the upper/lower word/dword'#000+ '04023_E_Integer or real expression expected'#000+ '04024_E_Wrong type "$1" in array constructor'#000+ - '04025_E_Incompatible type for arg no. $1: Got "$2", expected "$3"'#000+ - '04026_E_Method (variable) and Procedure (variable) a','re not compatibl'+ - 'e'#000+ + '04025_E_In','compatible type for arg no. $1: Got "$2", expected "$3"'#000+ + '04026_E_Method (variable) and Procedure (variable) are not compatible'#000+ '04027_E_Illegal constant passed to internal math function'#000+ '04028_E_Can'#039't take the address of constant expressions'#000+ - '04029_E_Argument can'#039't be assigned to'#000+ + '0','4029_E_Argument can'#039't be assigned to'#000+ '04030_E_Can'#039't assign local procedure/function to procedure variabl'+ 'e'#000+ - '040','31_E_Can'#039't assign values to an address'#000+ + '04031_E_Can'#039't assign values to an address'#000+ '04032_E_Can'#039't assign values to const variable'#000+ '04033_E_Array type required'#000+ - '04034_E_interface type expected, but got "$1"'#000+ + '04034_E_interface t','ype expected, but got "$1"'#000+ '04035_H_Mixing signed expressions and longwords gives a 64bit result'#000+ - '04036_W_Mixi','ng signed expressions and cardinals here may cause a ran'+ - 'ge check error'#000+ - '04037_E_Typecast has different size ($1 -> $2) in assignment'#000+ + '04036_W_Mixing signed expressions and cardinals here may cause a range'+ + ' check error'#000+ + '04037_E_Typecast has different size ($1 -> $2) in assignment'#000, '04038_E_enums with assignments can'#039't be used as array index'#000+ - '04039_E_Class or Object types "$1" and "$2" are ','not related'#000+ + '04039_E_Class or Object types "$1" and "$2" are not related'#000+ '04040_W_Class types "$1" and "$2" are not related'#000+ '04041_E_Class or interface type expected, but got "$1"'#000+ - '04042_E_Type "$1" is not completely defined'#000+ + '04042_E_Type "$','1" is not completely defined'#000+ '04043_W_String literal has more characters than short string length'#000+ - '04044_W_Com','parison is always false due to range of values'#000+ + '04044_W_Comparison is always false due to range of values'#000+ '04045_W_Comparison is always true due to range of values'#000+ - '04046_W_Constructing a class "$1" with abstract method "$2"'#000+ + '04046_W_Constructing a class',' "$1" with abstract method "$2"'#000+ '04047_H_The left operand of the IN operator should be byte sized'#000+ - '04048_W_Typ','e size mismatch, possible loss of data / range check erro'+ - 'r'#000+ + '04048_W_Type size mismatch, possible loss of data / range check error'#000+ '04049_H_Type size mismatch, possible loss of data / range check error'#000+ - '04050_E_The address of an abstract method can'#039't be taken'#000+ - '04051_E_Assignments to formal parameters and open arra','ys are not pos'+ - 'sible'#000+ + '040','50_E_The address of an abstract method can'#039't be taken'#000+ + '04051_E_Assignments to formal parameters and open arrays are not possi'+ + 'ble'#000+ '04052_E_Constant Expression expected'#000+ '04053_E_Operation "$1" not supported for types "$2" and "$3"'#000+ - '04054_E_Illegal type conversion: "$1" to "$2"'#000+ + '04054_E_Illega','l type conversion: "$1" to "$2"'#000+ '04055_H_Conversion between ordinals and pointers is not portable'#000+ - '04056_W_Con','version between ordinals and pointers is not portable'#000+ + '04056_W_Conversion between ordinals and pointers is not portable'#000+ '04057_E_Can'#039't determine which overloaded function to call'#000+ - '04058_E_Illegal counter variable'#000+ + '04058_E_Illegal coun','ter variable'#000+ '04059_W_Converting constant real value to double for C variable argume'+ - 'nt, add explicit typecast',' to prevent this.'#000+ + 'nt, add explicit typecast to prevent this.'#000+ '04060_E_Class or COM interface type expected, but got "$1"'#000+ '04061_E_Constant packed arrays are not yet supported'#000+ - '04062_E_Incompatible type for arg no. $1: Got "$2" expected "(Bit)Pack'+ - 'ed Array"'#000+ - '04063_E_Incompatible type for ','arg no. $1: Got "$2" expected "(not pa'+ - 'cked) Array"'#000+ + '04','062_E_Incompatible type for arg no. $1: Got "$2" expected "(Bit)Pa'+ + 'cked Array"'#000+ + '04063_E_Incompatible type for arg no. $1: Got "$2" expected "(not pack'+ + 'ed) Array"'#000+ '04064_E_Elements of packed arrays cannot be of a type which need to be'+ - ' initialised'#000+ + ' initialise','d'#000+ '04065_E_Constant packed records and objects are not yet supported'#000+ - '04066_W_Arithmetic "$1" on untyped point','er is unportable to {$T+}, s'+ - 'uggest typecast'#000+ + '04066_W_Arithmetic "$1" on untyped pointer is unportable to {$T+}, sug'+ + 'gest typecast'#000+ '04076_E_Can'#039't take address of a subroutine marked as local'#000+ - '04077_E_Can'#039't export subroutine marked as local from a unit'#000+ + '04077_E_Can'#039't export subrouti','ne marked as local from a unit'#000+ '04078_E_Type is not automatable: "$1"'#000+ - '04079_H_Converting the operands to "$1"',' before doing the add could p'+ - 'revent overflow errors.'#000+ + '04079_H_Converting the operands to "$1" before doing the add could pre'+ + 'vent overflow errors.'#000+ '04080_H_Converting the operands to "$1" before doing the subtract coul'+ - 'd prevent overflow errors.'#000+ + 'd prevent',' overflow errors.'#000+ '04081_H_Converting the operands to "$1" before doing the multiply coul'+ - 'd prevent overflow e','rrors.'#000+ + 'd prevent overflow errors.'#000+ '04082_W_Converting pointers to signed integers may result in wrong com'+ - 'parison results and range errors, use an unsigned type instead.'#000+ + 'parison results and range errors, use an unsigned type ','instead.'#000+ '04083_E_Interface type $1 has no valid GUID'#000+ '04084_E_Invalid selector name'#000+ - '04085_E_Expected Objectiv','e-C method, but got $1'#000+ + '04085_E_Expected Objective-C method, but got $1'#000+ '04086_E_Expected Objective-C method or constant method name'#000+ '04087_E_No type info available for this type'#000+ - '05000_E_Identifier not found "$1"'#000+ + '0500','0_E_Identifier not found "$1"'#000+ '05001_F_Internal Error in SymTableStack()'#000+ '05002_E_Duplicate identifier "$1"'#000+ - '05','003_H_Identifier already defined in $1 at line $2'#000+ + '05003_H_Identifier already defined in $1 at line $2'#000+ '05004_E_Unknown identifier "$1"'#000+ '05005_E_Forward declaration not solved "$1"'#000+ - '05007_E_Error in type definition'#000+ + '05007_','E_Error in type definition'#000+ '05009_E_Forward type not resolved "$1"'#000+ - '05010_E_Only static variables can be used ','in static methods or outsi'+ - 'de methods'#000+ + '05010_E_Only static variables can be used in static methods or outside'+ + ' methods'#000+ '05012_F_record or class type expected'#000+ - '05013_E_Instances of classes or objects with an abstract method are no'+ - 't allowed'#000+ + '05013_E_Instances of classes or objects with an abstract ','method are '+ + 'not allowed'#000+ '05014_W_Label not defined "$1"'#000+ '05015_E_Label used but not defined "$1"'#000+ - '05016_E_Illega','l label declaration'#000+ + '05016_E_Illegal label declaration'#000+ '05017_E_GOTO and LABEL are not supported (use switch -Sg)'#000+ '05018_E_Label not found'#000+ - '05019_E_identifier isn'#039't a label'#000+ + '05019_E_identifier isn'#039't a lab','el'#000+ '05020_E_label already defined'#000+ '05021_E_illegal type declaration of set elements'#000+ - '05022_E_Forward class defi','nition not resolved "$1"'#000+ + '05022_E_Forward class definition not resolved "$1"'#000+ '05023_H_Unit "$1" not used in $2'#000+ '05024_H_Parameter "$1" not used'#000+ '05025_N_Local variable "$1" not used'#000+ - '05026_H_Value parameter "$1" is assigned but never used'#000+ + '05026','_H_Value parameter "$1" is assigned but never used'#000+ '05027_N_Local variable "$1" is assigned but never used'#000+ - '05','028_H_Local $1 "$2" is not used'#000+ + '05028_H_Local $1 "$2" is not used'#000+ '05029_N_Private field "$1.$2" is never used'#000+ - '05030_N_Private field "$1.$2" is assigned but never used'#000+ + '05030_N_Private field "$1.$2" is assigned but never used',#000+ '05031_N_Private method "$1.$2" never used'#000+ '05032_E_Set type expected'#000+ - '05033_W_Function result does not seem t','o be set'#000+ + '05033_W_Function result does not seem to be set'#000+ '05034_W_Type "$1" is not aligned correctly in current record for C'#000+ '05035_E_Unknown record field identifier "$1"'#000+ - '05036_W_Local variable "$1" does not seem to be initialized'#000+ + '05036_W_Loc','al variable "$1" does not seem to be initialized'#000+ '05037_W_Variable "$1" does not seem to be initialized'#000+ - '05038','_E_identifier idents no member "$1"'#000+ + '05038_E_identifier idents no member "$1"'#000+ '05039_H_Found declaration: $1'#000+ '05040_E_Data element too large'#000+ - '05042_E_No matching implementation for interface method "$1" found'#000+ + '05042_E_No matching implementation ','for interface method "$1" found'#000+ '05043_W_Symbol "$1" is deprecated'#000+ '05044_W_Symbol "$1" is not portable'#000+ - '05055_','W_Symbol "$1" is not implemented'#000+ + '05055_W_Symbol "$1" is not implemented'#000+ '05056_E_Can'#039't create unique type from this type'#000+ - '05057_H_Local variable "$1" does not seem to be initialized'#000+ + '05057_H_Local variable "$1" does not seem to be ini','tialized'#000+ '05058_H_Variable "$1" does not seem to be initialized'#000+ - '05059_W_Function result variable does not see','m to initialized'#000+ + '05059_W_Function result variable does not seem to initialized'#000+ '05060_H_Function result variable does not seem to be initialized'#000+ '05061_W_Variable "$1" read but nowhere assigned'#000+ - '05062_H_Found abstract method: $1'#000+ + '05','062_H_Found abstract method: $1'#000+ '05063_W_Symbol "$1" is experimental'#000+ - '05064_W_Forward declaration "$1" not res','olved, assumed external'#000+ + '05064_W_Forward declaration "$1" not resolved, assumed external'#000+ '06009_E_Parameter list size exceeds 65535 bytes'#000+ '06012_E_File types must be var parameters'#000+ - '06013_E_The use of a far pointer isn'#039't allowed there'#000+ + '06013_E_The use of',' a far pointer isn'#039't allowed there'#000+ '06015_E_EXPORT declared functions can'#039't be called'#000+ - '06016_W_Possible illega','l call of constructor or destructor'#000+ + '06016_W_Possible illegal call of constructor or destructor'#000+ '06017_N_Inefficient code'#000+ '06018_W_unreachable code'#000+ - '06020_E_Abstract methods can'#039't be called directly'#000+ + '06020_E_Abstract methods can'#039't be called direc','tly'#000+ '06027_DL_Register $1 weight $2 $3'#000+ '06029_DL_Stack frame is omitted'#000+ - '06031_E_Object or class methods can'#039't ','be inline.'#000+ + '06031_E_Object or class methods can'#039't be inline.'#000+ '06032_E_Procvar calls cannot be inline.'#000+ '06033_E_No code for inline procedure stored'#000+ - '06035_E_Element zero of an ansi/wide- or longstring can'#039't be acces'+ - 'sed, use (set)length instead'#000+ - '06037_E_Constructors or destructors can not be cal','led inside a '#039'w'+ - 'ith'#039' clause'#000+ + '06035_E_Element zero of an ansi/wide-',' or longstring can'#039't be acc'+ + 'essed, use (set)length instead'#000+ + '06037_E_Constructors or destructors can not be called inside a '#039'wi'+ + 'th'#039' clause'#000+ '06038_E_Cannot call message handler methods directly'#000+ '06039_E_Jump in or outside of an exception block'#000+ - '06040_E_Control flow statements aren'#039't allowed in a finally block'#000+ - '06041_W_Parameters size exceeds limit for cer','tain cpu'#039's'#000+ + '060','40_E_Control flow statements aren'#039't allowed in a finally bloc'+ + 'k'#000+ + '06041_W_Parameters size exceeds limit for certain cpu'#039's'#000+ '06042_W_Local variable size exceed limit for certain cpu'#039's'#000+ '06043_E_Local variables size exceeds supported limit'#000+ - '06044_E_BREAK not allowed'#000+ + '06044_E_B','REAK not allowed'#000+ '06045_E_CONTINUE not allowed'#000+ - '06046_F_Unknown compilerproc "$1". Check if you use the correc','t run '+ - 'time library.'#000+ + '06046_F_Unknown compilerproc "$1". Check if you use the correct run ti'+ + 'me library.'#000+ '06047_F_Cannot find system type "$1". Check if you use the correct run'+ ' time library.'#000+ - '06048_H_Inherited call to abstract method ignored'#000+ + '06048_H_Inherited call to a','bstract method ignored'#000+ '06049_E_Goto label "$1" not defined or optimized away'#000+ - '07000_DL_Starting $1 styled ass','embler parsing'#000+ - '07001_DL_Finished $1 styled assembler parsing'#000+ + '06050_F_Cannot find type "$1" in unit "$2". Check if you use the corre'+ + 'ct run time library.'#000+ + '07000_DL_Starting $1 styled assembler parsing'#000+ + '07001_DL_Finished $1 style','d assembler parsing'#000+ '07002_E_Non-label pattern contains @'#000+ '07004_E_Error building record offset'#000+ '07005_E_OFFSET used without identifier'#000+ '07006_E_TYPE used without identifier'#000+ - '07007_E_Cannot use local vari','able or parameters here'#000+ - '07008_E_need to use OFFSET here'#000+ + '07007_E_Cannot use local variable or parameters here'#000+ + '07008_E_need to u','se OFFSET here'#000+ '07009_E_need to use $ here'#000+ '07010_E_Cannot use multiple relocatable symbols'#000+ '07011_E_Relocatable symbol can only be added'#000+ '07012_E_Invalid constant expression'#000+ - '07013_E_Relocatable symbol i','s not allowed'#000+ - '07014_E_Invalid reference syntax'#000+ + '07013_E_Relocatable symbol is not allowed'#000+ + '07014_E_Invalid reference s','yntax'#000+ '07015_E_You can not reach $1 from that code'#000+ '07016_E_Local symbols/labels aren'#039't allowed as references'#000+ '07017_E_Invalid base and index register usage'#000+ - '07018_W_Possible error in object field handli','ng'#000+ + '07018_W_Possible error in object field handling'#000+ '07019_E_Wrong scale factor specified'#000+ - '07020_E_Multiple index register usage'#000+ + '0','7020_E_Multiple index register usage'#000+ '07021_E_Invalid operand type'#000+ '07022_E_Invalid string as opcode operand: $1'#000+ '07023_W_@CODE and @DATA not supported'#000+ '07024_E_Null label references are not allowed'#000+ - '0702','5_E_Divide by zero in asm evaluator'#000+ - '07026_E_Illegal expression'#000+ + '07025_E_Divide by zero in asm evaluator'#000+ + '07026','_E_Illegal expression'#000+ '07027_E_escape sequence ignored: $1'#000+ '07028_E_Invalid symbol reference'#000+ '07029_W_Fwait can cause emulation problems with emu387'#000+ '07030_W_$1 without operand translated into $1P'#000+ - '07031_','W_ENTER instruction is not supported by Linux kernel'#000+ + '07031_W_ENTER instruction is not supported by L','inux kernel'#000+ '07032_W_Calling an overload function in assembler'#000+ '07033_E_Unsupported symbol type for operand'#000+ '07034_E_Constant value out of bounds'#000+ '07035_E_Error converting decimal $1'#000+ - '07036_E_Error conver','ting octal $1'#000+ - '07037_E_Error converting binary $1'#000+ + '07036_E_Error converting octal $1'#000+ + '07037_E_Error converting bi','nary $1'#000+ '07038_E_Error converting hexadecimal $1'#000+ '07039_H_$1 translated to $2'#000+ '07040_W_$1 is associated to an overloaded function'#000+ '07041_E_Cannot use SELF outside a method'#000+ - '07042_E_Cannot use OLDEBP outsi','de a nested procedure'#000+ - '07043_W_Procedures can'#039't return any value in asm code'#000+ + '07042_E_Cannot use OLDEBP outside a nested procedure'#000+ + '07043_W_Procedures ','can'#039't return any value in asm code'#000+ '07044_E_SEG not supported'#000+ '07045_E_Size suffix and destination or source size do not match'#000+ '07046_W_Size suffix and destination or source size do not match'#000+ - '07047_E_As','sembler syntax error'#000+ - '07048_E_Invalid combination of opcode and operands'#000+ + '07047_E_Assembler syntax error'#000+ + '07048_E_Invalid comb','ination of opcode and operands'#000+ '07049_E_Assembler syntax error in operand'#000+ '07050_E_Assembler syntax error in constant'#000+ '07051_E_Invalid String expression'#000+ - '07052_W_constant with symbol $1 for address which',' is not on a pointe'+ - 'r'#000+ - '07053_E_Unrecognized opcode $1'#000+ + '07052_W_constant with symbol $1 for address which is not on a pointer'#000+ + '07053_E_Unrecognized',' opcode $1'#000+ '07054_E_Invalid or missing opcode'#000+ '07055_E_Invalid combination of prefix and opcode: $1'#000+ '07056_E_Invalid combination of override and opcode: $1'#000+ '07057_E_Too many operands on line'#000+ - '07058_W_NEAR',' ignored'#000+ + '07058_W_NEAR ignored'#000+ '07059_W_FAR ignored'#000+ - '07060_E_Duplicate local symbol $1'#000+ + '07060_E_Dupl','icate local symbol $1'#000+ '07061_E_Undefined local symbol $1'#000+ '07062_E_Unknown label identifier $1'#000+ '07063_E_Invalid register name'#000+ '07064_E_Invalid floating point register name'#000+ '07066_W_Modulo not supported'#000+ - '070','67_E_Invalid floating point constant $1'#000+ - '07068_E_Invalid floating point expression'#000+ + '07067_E_Invalid floating point constant $1'#000+ + '0','7068_E_Invalid floating point expression'#000+ '07069_E_Wrong symbol type'#000+ '07070_E_Cannot index a local var or parameter with a register'#000+ '07071_E_Invalid segment override expression'#000+ - '07072_W_Identifier $1 supp','osed external'#000+ - '07073_E_Strings not allowed as constants'#000+ + '07072_W_Identifier $1 supposed external'#000+ + '07073_E_Strings not allowed',' as constants'#000+ '07074_No type of variable specified'#000+ '07075_E_assembler code not returned to text section'#000+ '07076_E_Not a directive or local symbol $1'#000+ '07077_E_Using a defined name as a local label'#000+ - '07078_E_','Dollar token is used without an identifier'#000+ + '07078_E_Dollar token is used without an identifie','r'#000+ '07079_W_32bit constant created for address'#000+ '07080_N_.align is target specific, use .balign or .p2align'#000+ '07081_E_Can'#039't access fields directly for parameters'#000+ - '07082_E_Can'#039't access fields of objects/clas','ses directly'#000+ - '07083_E_No size specified and unable to determine the size of the oper'+ - 'ands'#000+ + '07082_E_Can'#039't access fields of objects/classes directly'#000+ + '07083_E_No size specified an','d unable to determine the size of the op'+ + 'erands'#000+ '07084_E_Cannot use RESULT in this function'#000+ '07086_W_"$1" without operand translated into "$1 %st,%st(1)"'#000+ - '07087_W_"$1 %st(n)" translated into "$1 %st,%st(','n)"'#000+ - '07088_W_"$1 %st(n)" translated into "$1 %st(n),%st"'#000+ + '07087_W_"$1 %st(n)" translated into "$1 %st,%st(n)"'#000+ + '07088_W_"$1 %st(n)" translated into "','$1 %st(n),%st"'#000+ '07089_E_Char < not allowed here'#000+ '07090_E_Char > not allowed here'#000+ '07093_W_ALIGN not supported'#000+ '07094_E_Inc and Dec cannot be together'#000+ '07095_E_Invalid reglist for movem'#000+ - '07096_E_Reglist inv','alid for opcode'#000+ - '07097_E_Higher cpu mode required ($1)'#000+ + '07096_E_Reglist invalid for opcode'#000+ + '07097_E_Higher cpu mode r','equired ($1)'#000+ '07098_W_No size specified and unable to determine the size of the oper'+ 'ands, using DWORD as default'#000+ '07099_E_Syntax error while trying to parse a shifter operand'#000+ - '07100_E_Address of packed ','component is not at a byte boundary'#000+ - '07101_W_No size specified and unable to determine the size of the oper'+ - 'ands, using BYTE as default'#000+ + '07100_E_Address of packed component is not at a byte boundary'#000+ + '07101','_W_No size specified and unable to determine the size of the op'+ + 'erands, using BYTE as default'#000+ '07102_W_Use of +offset(%ebp) for parameters invalid here'#000+ - '07103_W_Use of +offset(%ebp) is not compatible wi','th regcall conventi'+ - 'on'#000+ - '07104_W_Use of -offset(%ebp) is not recommended for local variable acc'+ - 'ess'#000+ + '07103_W_Use of +offset(%ebp) is not compatible with regcall convention'+ + #000+ + '07104_W_Use of -off','set(%ebp) is not recommended for local variable a'+ + 'ccess'#000+ '07105_W_Use of -offset(%esp), access may cause a crash or value may be'+ ' lost'#000+ - '07106_E_VMTOffset must be used in combination with a virtual method,',' '+ - 'and "$1" is not virtual'#000+ - '07107_E_Generating PIC, but reference is not PIC-safe'#000+ + '07106_E_VMTOffset must be used in combination with a virtual method, a'+ + 'nd "$1" is not virtual'#000+ + '07107_E_Generati','ng PIC, but reference is not PIC-safe'#000+ '08000_F_Too many assembler files'#000+ '08001_F_Selected assembler output not supported'#000+ '08002_F_Comp not supported'#000+ '08003_F_Direct not support for binary writers'#000+ - '08004_E','_Allocating of data is only allowed in bss section'#000+ + '08004_E_Allocating of data is only allowed in bs','s section'#000+ '08005_F_No binary writer selected'#000+ '08006_E_Asm: Opcode $1 not in table'#000+ '08007_E_Asm: $1 invalid combination of opcode and operands'#000+ '08008_E_Asm: 16 Bit references not supported'#000+ - '08009_E_Asm: In','valid effective address'#000+ - '08010_E_Asm: Immediate or reference expected'#000+ + '08009_E_Asm: Invalid effective address'#000+ + '08010_E_Asm: Imme','diate or reference expected'#000+ '08011_E_Asm: $1 value exceeds bounds $2'#000+ '08012_E_Asm: Short jump is out of range $1'#000+ '08013_E_Asm: Undefined label $1'#000+ '08014_E_Asm: Comp type not supported for this target'#000+ - '080','15_E_Asm: Extended type not supported for this target'#000+ + '08015_E_Asm: Extended type not supported for',' this target'#000+ '08016_E_Asm: Duplicate label $1'#000+ '08017_E_Asm: Redefined label $1'#000+ '08018_E_Asm: First defined here'#000+ '08019_E_Asm: Invalid register $1'#000+ '08020_E_Asm: 16 or 32 Bit references not supported'#000+ - '08021_','E_Asm: 64 Bit operands not supported'#000+ - '09000_W_Source operating system redefined'#000+ + '08021_E_Asm: 64 Bit operands not supported'#000+ + '0900','0_W_Source operating system redefined'#000+ '09001_I_Assembling (pipe) $1'#000+ '09002_E_Can'#039't create assembler file: $1'#000+ '09003_E_Can'#039't create object file: $1'#000+ '09004_E_Can'#039't create archive file: $1'#000+ - '09005_E_Assembler',' $1 not found, switching to external assembling'#000+ + '09005_E_Assembler $1 not found, switching to external asse','mbling'#000+ '09006_T_Using assembler: $1'#000+ '09007_E_Error while assembling exitcode $1'#000+ '09008_E_Can'#039't call the assembler, error $1 switching to external a'+ 'ssembling'#000+ '09009_I_Assembling $1'#000+ - '09010_I_Assembling with',' smartlinking $1'#000+ - '09011_W_Object $1 not found, Linking may fail !'#000+ + '09010_I_Assembling with smartlinking $1'#000+ + '09011_W_Object $1 not fo','und, Linking may fail !'#000+ '09012_W_Library $1 not found, Linking may fail !'#000+ '09013_E_Error while linking'#000+ '09014_E_Can'#039't call the linker, switching to external linking'#000+ '09015_I_Linking $1'#000+ - '09016_E_Util $1 no','t found, switching to external linking'#000+ - '09017_T_Using util $1'#000+ + '09016_E_Util $1 not found, switching to external linking'#000+ + '09','017_T_Using util $1'#000+ '09018_E_Creation of Executables not supported'#000+ '09019_E_Creation of Dynamic/Shared Libraries not supported'#000+ '09020_I_Closing script $1'#000+ - '09021_E_resource compiler "$1" not found, switch','ing to external mode'+ - #000+ - '09022_I_Compiling resource $1'#000+ + '09021_E_resource compiler "$1" not found, switching to external mode'#000+ + '09022_I_Compiling re','source $1'#000+ '09023_T_unit $1 can'#039't be statically linked, switching to smart lin'+ 'king'#000+ '09024_T_unit $1 can'#039't be smart linked, switching to static linking'+ #000+ - '09025_T_unit $1 can'#039't be shared linked, switching t','o static link'+ - 'ing'#000+ - '09026_E_unit $1 can'#039't be smart or static linked'#000+ + '09025_T_unit $1 can'#039't be shared linked, switching to static linkin'+ + 'g'#000+ + '09026_E_unit $1 can'#039't be',' smart or static linked'#000+ '09027_E_unit $1 can'#039't be shared or static linked'#000+ '09028_D_Calling resource compiler "$1" with "$2" as command line'#000+ '09029_E_Error while compiling resources'#000+ - '09030_E_Can'#039't call th','e resource compiler "$1", switching to exte'+ + '09030_E_Can'#039't call the resource compiler "$1", switching to ex','te'+ 'rnal mode'#000+ '09031_E_Can'#039't open resource file "$1"'#000+ '09032_E_Can'#039't write resource file "$1"'#000+ '09128_F_Can'#039't post process executable $1'#000+ '09129_F_Can'#039't open executable $1'#000+ '09130_X_Size of Code: $1 bytes'#000+ - '09131','_X_Size of initialized data: $1 bytes'#000+ - '09132_X_Size of uninitialized data: $1 bytes'#000+ + '09131_X_Size of initialized data: $1 bytes'#000+ + '091','32_X_Size of uninitialized data: $1 bytes'#000+ '09133_X_Stack space reserved: $1 bytes'#000+ '09134_X_Stack space committed: $1 bytes'#000+ '09200_F_Executable image size is too big for $1 target.'#000+ - '09201_W_Object file "$','1" contains 32-bit absolute relocation to symb'+ + '09201_W_Object file "$1" contains 32-bit absolute relocation to',' symb'+ 'ol "$2".'#000+ '10000_T_Unitsearch: $1'#000+ '10001_T_PPU Loading $1'#000+ @@ -754,161 +759,162 @@ const msgtxt : array[0..000212,1..240] of char=( '10004_U_PPU Crc: $1'#000+ '10005_U_PPU Time: $1'#000+ '10006_U_PPU File too short'#000+ - '10007_U_PPU Invalid Header (','no PPU at the begin)'#000+ - '10008_U_PPU Invalid Version $1'#000+ + '10007_U_PPU Invalid Header (no PPU at the begin)'#000+ + '10008_U_PPU Invalid ','Version $1'#000+ '10009_U_PPU is compiled for another processor'#000+ '10010_U_PPU is compiled for an other target'#000+ '10011_U_PPU Source: $1'#000+ '10012_U_Writing $1'#000+ '10013_F_Can'#039't Write PPU-File'#000+ - '10014_F_Error reading PPU-F','ile'#000+ + '10014_F_Error reading PPU-File'#000+ '10015_F_unexpected end of PPU-File'#000+ - '10016_F_Invalid PPU-File entry: $1'#000+ + '10','016_F_Invalid PPU-File entry: $1'#000+ '10017_F_PPU Dbx count problem'#000+ '10018_E_Illegal unit name: $1'#000+ '10019_F_Too much units'#000+ '10020_F_Circular unit reference between $1 and $2'#000+ - '10021_F_Can'#039't compile unit $1, no',' sources available'#000+ - '10022_F_Can'#039't find unit $1 used by $2'#000+ + '10021_F_Can'#039't compile unit $1, no sources available'#000+ + '10022_F_Can'#039't find uni','t $1 used by $2'#000+ '10023_W_Unit $1 was not found but $2 exists'#000+ '10024_F_Unit $1 searched but $2 found'#000+ '10025_W_Compiling the system unit requires the -Us switch'#000+ - '10026_F_There were $1 errors compiling modu','le, stopping'#000+ - '10027_U_Load from $1 ($2) unit $3'#000+ + '10026_F_There were $1 errors compiling module, stopping'#000+ + '10027_U_Load from $1 ($2) un','it $3'#000+ '10028_U_Recompiling $1, checksum changed for $2'#000+ '10029_U_Recompiling $1, source found only'#000+ '10030_U_Recompiling unit, static lib is older than ppufile'#000+ - '10031_U_Recompiling unit, shared lib is olde','r than ppufile'#000+ - '10032_U_Recompiling unit, obj and asm are older than ppufile'#000+ + '10031_U_Recompiling unit, shared lib is older than ppufile'#000+ + '10032_U_Recompiling unit, ','obj and asm are older than ppufile'#000+ '10033_U_Recompiling unit, obj is older than asm'#000+ '10034_U_Parsing interface of $1'#000+ '10035_U_Parsing implementation of $1'#000+ '10036_U_Second load for unit $1'#000+ - '10037_U_PPU Che','ck file $1 time $2'#000+ - '10040_W_Can'#039't recompile unit $1, but found modifed include files'#000+ + '10037_U_PPU Check file $1 time $2'#000+ + '10040_W_Can'#039't recompil','e unit $1, but found modifed include files'+ + #000+ '10041_U_File $1 is newer than PPU file $2'#000+ '10042_U_Trying to use a unit which was compiled with a different FPU m'+ 'ode'#000+ - '10043_U_Loading interface units from $1'#000, - '10044_U_Loading implementation units from $1'#000+ + '10043_U_Loading interface units from $1'#000+ + '10044_U_Loading implementation units from',' $1'#000+ '10045_U_Interface CRC changed for unit $1'#000+ '10046_U_Implementation CRC changed for unit $1'#000+ '10047_U_Finished compiling unit $1'#000+ '10048_U_Add dependency of $1 to $2'#000+ '10049_U_No reload, is caller: $1'#000+ - '100','50_U_No reload, already in second compile: $1'#000+ + '10050_U_No reload, already in second compile',': $1'#000+ '10051_U_Flag for reload: $1'#000+ '10052_U_Forced reloading'#000+ '10053_U_Previous state of $1: $2'#000+ '10054_U_Already compiling $1, setting second compile'#000+ '10055_U_Loading unit $1'#000+ - '10056_U_Finished loading unit $','1'#000+ + '10056_U_Finished loading unit $1'#000+ '10057_U_Registering new unit $1'#000+ - '10058_U_Re-resolving unit $1'#000+ + '10058_U','_Re-resolving unit $1'#000+ '10059_U_Skipping re-resolving unit $1, still loading used units'#000+ '10060_U_Unloading resource unit $1 (not needed)'#000+ - '10061_E_Unit $1 was compiled using a different whole program opti','miz'+ - 'ation feedback input ($2, $3); recompile it without wpo or use the sam'+ + '10061_E_Unit $1 was compiled using a different whole program optimizat'+ + 'ion feedback input ($2, $3); recompi','le it without wpo or use the sam'+ 'e wpo feedback input file for this compilation invocation'#000+ '11000_O_$1 [options] [options]'#000+ '11001_W_Only one source file supported'#000+ - '11002_W_DEF file can be cre','ated only for OS/2'#000+ - '11003_E_nested response files are not supported'#000+ + '11002_W_DEF file can be created only for OS/2'#000+ + '11003_E_nested respons','e files are not supported'#000+ '11004_F_No source file name in command line'#000+ '11005_N_No option inside $1 config file'#000+ '11006_E_Illegal parameter: $1'#000+ '11007_H_-? writes help pages'#000+ - '11008_F_Too many config files ','nested'#000+ + '11008_F_Too many config files nested'#000+ '11009_F_Unable to open file $1'#000+ - '11010_D_Reading further options from $1'#000+ + '110','10_D_Reading further options from $1'#000+ '11011_W_Target is already set to: $1'#000+ '11012_W_Shared libs not supported on DOS platform, reverting to static'+ #000+ - '11013_F_In options file $1 at line $2 too many \var{\#','IF(N)DEFs} enc'+ - 'ountered'#000+ - '11014_F_In options file $1 at line $2 unexpected \var{\#ENDIFs} encoun'+ - 'tered'#000+ + '11013_F_In options file $1 at line $2 too many \var{\#IF(N)DEFs} encou'+ + 'ntered'#000+ + '11014_F_In options',' file $1 at line $2 unexpected \var{\#ENDIFs} enco'+ + 'untered'#000+ '11015_F_Open conditional at the end of the options file'#000+ '11016_W_Debug information generation is not supported by this executab'+ 'le'#000+ - '11017_H_Try ','recompiling with -dGDB'#000+ - '11018_W_You are using the obsolete switch $1'#000+ + '11017_H_Try recompiling with -dGDB'#000+ + '11018_W_You are us','ing the obsolete switch $1'#000+ '11019_W_You are using the obsolete switch $1, please use $2'#000+ '11020_N_Switching assembler to default source writing assembler'#000+ - '11021_W_Assembler output selected "$1" is not co','mpatible with "$2"'#000+ - '11022_W_"$1" assembler use forced'#000+ + '11021_W_Assembler output selected "$1" is not compatible with "$2"'#000+ + '11022_W_"$1" assembler',' use forced'#000+ '11026_T_Reading options from file $1'#000+ '11027_T_Reading options from environment $1'#000+ '11028_D_Handling option "$1"'#000+ '11029_O_*** press enter ***'#000+ '11030_H_Start of reading config file $1'#000+ - '11031_H_E','nd of reading config file $1'#000+ - '11032_D_interpreting option "$1"'#000+ + '11031_H_End of reading config file $1'#000+ + '11032_D_inte','rpreting option "$1"'#000+ '11036_D_interpreting firstpass option "$1"'#000+ '11033_D_interpreting file option "$1"'#000+ '11034_D_Reading config file "$1"'#000+ '11035_D_found source file name "$1"'#000+ '11039_E_Unknown code page'#000+ - '11','040_F_Config file $1 is a directory'#000+ - '11041_W_Assembler output selected "$1" cannot generate debug info, deb'+ - 'ugging disabled'#000+ + '11040_F_Config file $1 is a directory'#000+ + '11041','_W_Assembler output selected "$1" cannot generate debug info, d'+ + 'ebugging disabled'#000+ '11042_W_Use of ppc386.cfg is deprecated, please use fpc.cfg instead'#000+ - '11043_F_In options file $1 at line $2 \var{\#ELSE}',' directive without'+ - ' \var{\#IF(N)DEF} found'#000+ + '11043_F_In options file $1 at line $2 \var{\#ELSE} directive without \'+ + 'var{\#IF(N)DEF} found',#000+ '11044_F_Option "$1" is not, or not yet, supported on the current targe'+ 't platform'#000+ '11045_F_The feature "$1" is not, or not yet, supported on the selected'+ ' target platform'#000+ - '11046_N_DWARF debug informatio','n cannot be used with smart linking on'+ - ' this target, switching to static linking'#000+ + '11046_N_DWARF debug information cannot be used with smart linking on t'+ + 'h','is target, switching to static linking'#000+ '12000_F_Cannot open whole program optimization feedback file $1'#000+ '12001_D_Processing whole program optimization information in wpo feedb'+ 'ack file $1'#000+ - '12002_D_Finish','ed processing the whole program optimization informati'+ + '12002_D_Finished processing the whole program optimizat','ion informati'+ 'on in wpo feedback file $1'#000+ '12003_E_Expected section header, but got "$2" at line $1 of wpo feedba'+ 'ck file'#000+ '12004_W_No handler registered for whole program optimization section "'+ - '$2" at line',' $1 of wpo feedback file, ignoring'#000+ - '12005_D_Found whole program optimization section "$1" with information'+ - ' about "$2"'#000+ + '$2" at line $1 of wpo feedback file, ignoring'#000+ + '12005_','D_Found whole program optimization section "$1" with informati'+ + 'on about "$2"'#000+ '12006_F_The selected whole program optimizations require a previously '+ 'generated feedback file (use -Fw to specify)'#000+ - '12007_E_','No collected information necessary to perform "$1" whole pro'+ + '12007_E_No collected information necessary to per','form "$1" whole pro'+ 'gram optimization found'#000+ '12008_F_Specify a whole program optimization feedback file to store th'+ 'e generated info in (using -FW)'#000+ - '12009_E_Not generating any whole program optimization ','information, y'+ - 'et a feedback file was specified (using -FW)'#000+ + '12009_E_Not generating any whole program optimization information, yet'+ + ' a feedback file was spec','ified (using -FW)'#000+ '12010_E_Not performing any whole program optimizations, yet an input f'+ 'eedback file was specified (using -Fw)'#000+ '12011_D_Skipping whole program optimization section "$1", because not '+ - 'ne','eded by the requested optimizations'#000+ - '12012_W_Overriding previously read information for "$1" from feedback '+ - 'input file using information in section "$2"'#000+ + 'needed by the requested optimizations'#000+ + '12012','_W_Overriding previously read information for "$1" from feedbac'+ + 'k input file using information in section "$2"'#000+ '12013_E_Cannot extract symbol liveness information from program when s'+ - 'tripping symbols, u','se -Xs-'#000+ - '12014_E_Cannot extract symbol liveness information from program when w'+ - 'hen not linking'#000+ + 'tripping symbols, use -Xs-'#000+ + '12014_E_Cannot extract symbol liv','eness information from program when'+ + ' when not linking'#000+ '12015_F_Cannot find "$1" or "$2" to extract symbol liveness informatio'+ 'n from linked program'#000+ - '12016_E_Error during reading symbol liveness informati','on produced by'+ - ' "$1"'#000+ - '12017_F_Error executing "$1" (exitcode: $2) to extract symbol informat'+ - 'ion from linked program'#000+ + '12016_E_Error during reading symbol liveness information produced by "'+ + '$1"'#000+ + '12017_F_Error executi','ng "$1" (exitcode: $2) to extract symbol inform'+ + 'ation from linked program'#000+ '12018_E_Collection of symbol liveness information can only help when u'+ 'sing smart linking, use -CX -XX'#000+ - '12019_E_Cannot create sp','ecified whole program optimisation feedback '+ + '12019_E_Cannot create specified whole program optimisation feedba','ck '+ 'file "$1"'#000+ '11023_Free Pascal Compiler version $FPCFULLVERSION [$FPCDATE] for $FPC'+ 'CPU'#010+ 'Copyright (c) 1993-2009 by Florian Klaempfl'#000+ '11024_Free Pascal Compiler version $FPCVERSION'#010+ #010+ - 'Compiler Date :',' $FPCDATE'#010+ + 'Compiler Date : $FPCDATE'#010+ 'Compiler CPU Target: $FPCCPU'#010+ #010+ - 'Supported targets:'#010+ + 'S','upported targets:'#010+ ' $OSTARGETS'#010+ #010+ 'Supported CPU instruction sets:'#010+ @@ -920,10 +926,10 @@ const msgtxt : array[0..000212,1..240] of char=( 'Supported ABI targets:'#010+ ' $ABITARGETS'#010+ #010+ - 'Supported Optimization','s:'#010+ + 'Supported Optimizations:'#010+ ' $OPTIMIZATIONS'#010+ #010+ - 'Supported Whole Program Optimizations:'#010+ + 'Supported Whole Prog','ram Optimizations:'#010+ ' All'#010+ ' $WPOPTIMIZATIONS'#010+ #010+ @@ -933,69 +939,69 @@ const msgtxt : array[0..000212,1..240] of char=( 'This program comes under the GNU General Public Licence'#010+ 'For more information read COPYING.FPC'#010+ #010+ - 'Report',' bugs, suggestions, etc. to:'#010+ - ' http://bugs.freepascal.org'#010+ + 'Report bugs, suggestions, etc. to:'#010+ + ' ',' http://bugs.freepascal.org'#010+ 'or'#010+ ' bugs@freepascal.org'#000+ '11025_**0*_Put + after a boolean switch option to enable it, - to disa'+ 'ble it'#010+ - '**1a_The compiler doesn'#039't delete the generated ass','embler file'#010+ - '**2al_List sourcecode lines in assembler file'#010+ + '**1a_The compiler doesn'#039't delete the generated assembler file'#010+ + '**2al_List sourcecode lines i','n assembler file'#010+ '**2an_List node info in assembler file'#010+ '*L2ap_Use pipes instead of creating temporary assembler files'#010+ '**2ar_List register allocation/release info in assembler file'#010+ - '**2at_List temp all','ocation/release info in assembler file'#010+ - '**1A_Output format:'#010+ + '**2at_List temp allocation/release info in assembler file'#010+ + '**','1A_Output format:'#010+ '**2Adefault_Use default assembler'#010+ '3*2Aas_Assemble using GNU AS'#010+ '3*2Anasmcoff_COFF (Go32v2) file using Nasm'#010+ '3*2Anasmelf_ELF32 (Linux) file using Nasm'#010+ - '3*2Anasmwin32_Win32 object fil','e using Nasm'#010+ - '3*2Anasmwdosx_Win32/WDOSX object file using Nasm'#010+ + '3*2Anasmwin32_Win32 object file using Nasm'#010+ + '3*2Anasmwdosx_Win32/WDOSX ob','ject file using Nasm'#010+ '3*2Awasm_Obj file using Wasm (Watcom)'#010+ '3*2Anasmobj_Obj file using Nasm'#010+ '3*2Amasm_Obj file using Masm (Microsoft)'#010+ '3*2Atasm_Obj file using Tasm (Borland)'#010+ - '3*2Aelf_ELF (Linux) using in','ternal writer'#010+ - '3*2Acoff_COFF (Go32v2) using internal writer'#010+ + '3*2Aelf_ELF (Linux) using internal writer'#010+ + '3*2Acoff_COFF (Go32v2) usin','g internal writer'#010+ '3*2Apecoff_PE-COFF (Win32) using internal writer'#010+ '4*2Aas_Assemble using GNU AS'#010+ '6*2Aas_Unix o-file using GNU AS'#010+ '6*2Agas_GNU Motorola assembler'#010+ '6*2Amit_MIT Syntax (old GAS)'#010+ - '6*2Amot_Sta','ndard Motorola assembler'#010+ - 'A*2Aas_Assemble using GNU AS'#010+ + '6*2Amot_Standard Motorola assembler'#010+ + 'A*2Aas_Assemble ','using GNU AS'#010+ 'P*2Aas_Assemble using GNU AS'#010+ 'S*2Aas_Assemble using GNU AS'#010+ '**1b_Generate browser info'#010+ '**2bl_Generate local symbol info'#010+ '**1B_Build all modules'#010+ '**1C_Code generation options:'#010+ - '**2Ca_Sel','ect ABI, see fpc -i for possible values'#010+ - '**2Cb_Generate big-endian code'#010+ + '**2Ca_Select ABI, see fpc -i for possible values'#010+ + '*','*2Cb_Generate big-endian code'#010+ '**2Cc_Set default calling convention to '#010+ '**2CD_Create also dynamic library (not supported)'#010+ '**2Ce_Compilation with emulated floating point opcodes'#010+ - '**2Cf_Select f','pu instruction set to use, see fpc -i for possible '+ + '**2Cf_Select fpu instruction set to use, see fpc -i for',' possible '+ 'values'#010+ '**2CF_Minimal floating point constant precision (default, 32, 64)'#010+ '**2Cg_Generate PIC code'#010+ '**2Ch_ bytes heap (between 1023 and 67107840)'#010+ '**2Ci_IO-checking'#010+ - '**2Cn_Omit linking ','stage'#010+ - '**2Co_Check overflow of integer operations'#010+ + '**2Cn_Omit linking stage'#010+ + '**2Co_Check overflow of integer ope','rations'#010+ '**2CO_Check for possible overflow of integer operations'#010+ '**2Cp_Select instruction set, see fpc -i for possible values'#010+ '**2CP=_ packing settings'#010+ - '**3CPPACKSET=_ set allocation: 0,',' 1 or DEFAULT or NORMAL, 2, '+ - '4 and 8'#010+ - '**2Cr_Range checking'#010+ + '**3CPPACKSET=_ set allocation: 0, 1 or DEFAULT or NORMAL, 2, 4 '+ + 'and 8'#010+ + '**2Cr','_Range checking'#010+ '**2CR_Verify object method call validity'#010+ '**2Cs_Set stack checking size to '#010+ '**2Ct_Stack checking (for testing only, see manual)'#010+ '**2CX_Create also smartlinked library'#010+ - '**1d_Defi','nes the symbol '#010+ - '**1D_Generate a DEF file'#010+ + '**1d_Defines the symbol '#010+ + '**1D_Generate a DEF fi','le'#010+ '**2Dd_Set description to '#010+ '**2Dv_Set DLL version to '#010+ '*O2Dw_PM application'#010+ @@ -1003,121 +1009,121 @@ const msgtxt : array[0..000212,1..240] of char=( '**1E_Same as -Cn'#010+ '**1fPIC_Same as -Cg'#010+ '**1F_Set file names and paths:'#010+ - '**2Fa[',',y]_(for a program) load units and [y] before uses is p'+ + '**2Fa[,y]_(for a program) load units and [y','] before uses is p'+ 'arsed'#010+ '**2Fc_Set input codepage to '#010+ '**2FC_Set RC compiler binary name to '#010+ '**2FD_Set the directory where to search for compiler utilities'#010+ - '**2Fe_Redirect error output',' to '#010+ - '**2Ff_Add to framework path (Darwin only)'#010+ + '**2Fe_Redirect error output to '#010+ + '**2Ff_Add to framework pat','h (Darwin only)'#010+ '**2FE_Set exe/unit output path to '#010+ '**2Fi_Add to include path'#010+ '**2Fl_Add to library path'#010+ '**2FL_Use as dynamic linker'#010+ - '**2Fm_Load unicode conversion table fr','om .txt in the compiler '+ - 'dir'#010+ - '**2Fo_Add to object path'#010+ + '**2Fm_Load unicode conversion table from .txt in the compiler di'+ + 'r'#010+ + '**2Fo_A','dd to object path'#010+ '**2Fr_Load error message file '#010+ '**2FR_Set resource (.res) linker to '#010+ '**2Fu_Add to unit path'#010+ '**2FU_Set unit output path to , overrides -FE'#010+ - '**2FW_Store ','generated whole-program optimization feedback in '#010+ + '**2FW_Store generated whole-program optimization feed','back in '#010+ '**2Fw_Load previously stored whole-program optimization feedback fr'+ 'om '#010+ '*g1g_Generate debug information (default format for target)'#010+ '*g2gc_Generate checks for pointers'#010+ - '*g2gh_Use heapt','race unit (for memory leak/corruption debugging)'#010+ + '*g2gh_Use heaptrace unit (for memory leak/corruption deb','ugging)'#010+ '*g2gl_Use line info unit (show more info with backtraces)'#010+ '*g2go_Set debug information options'#010+ '*g3godwarfsets_ Enable Dwarf set debug information (breaks gdb < 6.5)'#010+ - '*g2gp_Preserve case in s','tabs symbol names'#010+ - '*g2gs_Generate stabs debug information'#010+ + '*g2gp_Preserve case in stabs symbol names'#010+ + '*g2gs_Generate stabs de','bug information'#010+ '*g2gt_Trash local variables (to detect uninitialized uses)'#010+ '*g2gv_Generates programs traceable with valgrind'#010+ '*g2gw_Generate dwarf-2 debug information (same as -gw2)'#010+ - '*g2gw2_Generate dwa','rf-2 debug information'#010+ - '*g2gw3_Generate dwarf-3 debug information'#010+ + '*g2gw2_Generate dwarf-2 debug information'#010+ + '*g2gw3_Generate dw','arf-3 debug information'#010+ '**1i_Information'#010+ '**2iD_Return compiler date'#010+ '**2iV_Return short compiler version'#010+ '**2iW_Return full compiler version'#010+ '**2iSO_Return compiler OS'#010+ - '**2iSP_Return compiler host proces','sor'#010+ + '**2iSP_Return compiler host processor'#010+ '**2iTO_Return target OS'#010+ - '**2iTP_Return target processor'#010+ + '**2iTP_Return',' target processor'#010+ '**1I_Add to include path'#010+ '**1k_Pass to the linker'#010+ '**1l_Write logo'#010+ '**1M_Set language mode to '#010+ '**2Mfpc_Free Pascal dialect (default)'#010+ - '**2Mobjfpc_FPC mode with Object',' Pascal support'#010+ - '**2Mdelphi_Delphi 7 compatibility mode'#010+ + '**2Mobjfpc_FPC mode with Object Pascal support'#010+ + '**2Mdelphi_Delphi 7 compa','tibility mode'#010+ '**2Mtp_TP/BP 7.0 compatibility mode'#010+ '**2Mmacpas_Macintosh Pascal dialects compatibility mode'#010+ '**1n_Do not read the default config files'#010+ '**1N_Node tree optimizations'#010+ - '**2Nu_Unroll loops'#010, - '**1o_Change the name of the executable produced to '#010+ + '**2Nu_Unroll loops'#010+ + '**1o_Change the name of the executable',' produced to '#010+ '**1O_Optimizations:'#010+ '**2O-_Disable optimizations'#010+ '**2O1_Level 1 optimizations (quick and debugger friendly)'#010+ '**2O2_Level 2 optimizations (-O1 + quick optimizations)'#010+ - '**2O3_Level 3 opt','imizations (-O2 + slow optimizations)'#010+ - '**2Oa=_Set alignment'#010+ + '**2O3_Level 3 optimizations (-O2 + slow optimizations)'#010+ + '**2','Oa=_Set alignment'#010+ '**2Oo[NO]_Enable or disable optimizations, see fpc -i for possible '+ 'values'#010+ '**2Op_Set target cpu for optimizing, see fpc -i for possible values'+ #010+ - '**2OW_Generate whole-pro','gram optimization feedback for optimizati'+ - 'on , see fpc -i for possible values'#010+ + '**2OW_Generate whole-program optimization feedback for optimizati','o'+ + 'n , see fpc -i for possible values'#010+ '**2Ow_Perform whole-program optimization , see fpc -i for possib'+ 'le values'#010+ '**2Os_Optimize for size rather than speed'#010+ - '**1pg_Generate profile code for gprof ','(defines FPC_PROFILE)'#010+ - '**1R_Assembler reading style:'#010+ + '**1pg_Generate profile code for gprof (defines FPC_PROFILE)'#010+ + '**1R_Assembler r','eading style:'#010+ '**2Rdefault_Use default assembler for target'#010+ '3*2Ratt_Read AT&T style assembler'#010+ '3*2Rintel_Read Intel style assembler'#010+ '6*2RMOT_Read motorola style assembler'#010+ '**1S_Syntax options:'#010+ - '**2S2_S','ame as -Mobjfpc'#010+ - '**2Sc_Support operators like C (*=,+=,/= and -=)'#010+ + '**2S2_Same as -Mobjfpc'#010+ + '**2Sc_Support operators l','ike C (*=,+=,/= and -=)'#010+ '**2Sa_Turn on assertions'#010+ '**2Sd_Same as -Mdelphi'#010+ '**2Se_Error options. is a combination of the following:'#010+ '**3*_ : Compiler halts after the errors (default is 1)'#010+ - '**','3*_w : Compiler also halts after warnings'#010+ + '**3*_w : Compiler also halts after warnings',#010+ '**3*_n : Compiler also halts after notes'#010+ '**3*_h : Compiler also halts after hints'#010+ '**2Sg_Enable LABEL and GOTO (default in -Mtp and -Mdelphi)'#010+ - '**2Sh_Use ansistrings by default instead of shortstrings'#010, - '**2Si_Turn on inlining of procedures/functions declared as "inline"'#010+ + '**2Sh_Use ansistrings by default instead of shortstrings'#010+ + '**2Si_Turn on inlining of procedures/func','tions declared as "inline"'#010+ '**2Sk_Load fpcylix unit'#010+ '**2SI_Set interface style to '#010+ '**3SIcom_COM compatible interface (default)'#010+ '**3SIcorba_CORBA compatible interface'#010+ - '**2Sm_Support macros like C (g','lobal)'#010+ + '**2Sm_Support macros like C (global)'#010+ '**2So_Same as -Mtp'#010+ - '**2Ss_Constructor name must be init (destructor must be done)'#010+ + '**2Ss_Construct','or name must be init (destructor must be done)'#010+ '**2St_Allow static keyword in objects'#010+ '**2Sx_Enable exception keywords (default in Delphi/ObjFPC modes)'#010+ '**1s_Do not call assembler and linker'#010+ - '**2sh_Gener','ate script to link on host'#010+ - '**2st_Generate script to link on target'#010+ + '**2sh_Generate script to link on host'#010+ + '**2st_Generate',' script to link on target'#010+ '**2sr_Skip register allocation phase (use with -alr)'#010+ '**1T_Target operating system:'#010+ '3*2Temx_OS/2 via EMX (including EMX/RSX extender)'#010+ '3*2Tfreebsd_FreeBSD'#010+ - '3*2Tgo32v2_Versio','n 2 of DJ Delorie DOS extender'#010+ - '3*2Tlinux_Linux'#010+ + '3*2Tgo32v2_Version 2 of DJ Delorie DOS extender'#010+ + '3*2Tlinux_','Linux'#010+ '3*2Tnetbsd_NetBSD'#010+ '3*2Tnetware_Novell Netware Module (clib)'#010+ '3*2Tnetwlibc_Novell Netware Module (libc)'#010+ '3*2Topenbsd_OpenBSD'#010+ '3*2Tos2_OS/2 / eComStation'#010+ '3*2Tsunos_SunOS/Solaris'#010+ - '3*2Tsymbian_Symbian O','S'#010+ - '3*2Twatcom_Watcom compatible DOS extender'#010+ + '3*2Tsymbian_Symbian OS'#010+ + '3*2Twatcom_Watcom compatible DOS extend','er'#010+ '3*2Twdosx_WDOSX DOS extender'#010+ '3*2Twin32_Windows 32 Bit'#010+ '3*2Twince_Windows CE'#010+ @@ -1125,9 +1131,9 @@ const msgtxt : array[0..000212,1..240] of char=( '6*2Tamiga_Commodore Amiga'#010+ '6*2Tatari_Atari ST/STe/TT'#010+ '6*2Tlinux_Linux/m68k'#010+ - '6*2Tmacos_Macintosh m68k (not su','pported)'#010+ + '6*2Tmacos_Macintosh m68k (not supported)'#010+ '6*2Tpalmos_PalmOS'#010+ - 'A*2Tlinux_Linux'#010+ + 'A*2Tlinux_Linu','x'#010+ 'A*2Twince_Windows CE'#010+ 'P*2Tamiga_AmigaOS on PowerPC'#010+ 'P*2Tdarwin_Darwin and Mac OS X on PowerPC'#010+ @@ -1135,79 +1141,80 @@ const msgtxt : array[0..000212,1..240] of char=( 'P*2Tmacos_Mac OS (classic) on PowerPC'#010+ 'P*2Tmorphos_MorphOS'#010+ 'S*2Tlinux_Linux'#010+ - '**1u','_Undefines the symbol '#010+ - '**1U_Unit options:'#010+ + '**1u_Undefines the symbol '#010+ + '**1U_Unit op','tions:'#010+ '**2Un_Do not check where the unit name matches the file name'#010+ '**2Ur_Generate release unit files (never automatically recompiled)'#010+ '**2Us_Compile a system unit'#010+ - '**1v_Be verbose. is a combina','tion of the following letters:'#010+ - '**2*_e : Show errors (default) 0 : Show nothing (except errors)'#010+ + '**1v_Be verbose. is a combination of the following letters:'#010+ + '**2*_e : S','how errors (default) 0 : Show nothing (except errors'+ + ')'#010+ '**2*_w : Show warnings u : Show unit info'#010+ '**2*_n : Show notes t : Show tried/used files'#010+ - '**2*_h : Show hints ',' c : Show conditionals'#010+ - '**2*_i : Show general info d : Show debug info'#010+ + '**2*_h : Show hints c : Show conditionals'#010+ + '**','2*_i : Show general info d : Show debug info'#010+ '**2*_l : Show linenumbers r : Rhide/GCC compatibility mode'#010+ '**2*_a : Show everything x : Executable info (Win32 only)'#010+ - '**2*','_b : Write file names messages with full path'#010+ + '**2*_b : Write file names messages with full ','path'#010+ '**2*_v : Write fpcdebug.txt with p : Write tree.log with parse tre'+ 'e'#010+ '**2*_ lots of debugging info q : Show message numbers'#010+ '**2*_m, : Don'#039't show messages numbered and '#010+ - '3*1','W_Target-specific options (targets)'#010+ - 'A*1W_Target-specific options (targets)'#010+ + '3*1W_Target-specific options (targets)'#010+ + 'A*','1W_Target-specific options (targets)'#010+ 'P*1W_Target-specific options (targets)'#010+ 'p*1W_Target-specific options (targets)'#010+ '3*2Wb_Create a bundle instead of a library (Darwin)'#010+ - 'P*2Wb_Create a bundle i','nstead of a library (Darwin)'#010+ - 'p*2Wb_Create a bundle instead of a library (Darwin)'#010+ + 'P*2Wb_Create a bundle instead of a library (Darwin)'#010+ + 'p*2Wb_Create',' a bundle instead of a library (Darwin)'#010+ '3*2WB_Create a relocatable image (Windows)'#010+ 'A*2WB_Create a relocatable image (Windows, Symbian)'#010+ '3*2WC_Specify console type application (EMX, OS/2, Windows)'#010+ - 'A*2W','C_Specify console type application (Windows)'#010+ + 'A*2WC_Specify console type application (Windo','ws)'#010+ 'P*2WC_Specify console type application (Classic Mac OS)'#010+ '3*2WD_Use DEFFILE to export functions of DLL or EXE (Windows)'#010+ 'A*2WD_Use DEFFILE to export functions of DLL or EXE (Windows)'#010+ - '3*2We_Use exter','nal resources (Darwin)'#010+ - 'P*2We_Use external resources (Darwin)'#010+ + '3*2We_Use external resources (Darwin)'#010+ + 'P*2We_Use external',' resources (Darwin)'#010+ 'p*2We_Use external resources (Darwin)'#010+ '3*2WF_Specify full-screen type application (EMX, OS/2)'#010+ '3*2WG_Specify graphic type application (EMX, OS/2, Windows)'#010+ - 'A*2WG_Specify graphic type',' application (Windows)'#010+ - 'P*2WG_Specify graphic type application (Classic Mac OS)'#010+ + 'A*2WG_Specify graphic type application (Windows)'#010+ + 'P*2WG_Specify grap','hic type application (Classic Mac OS)'#010+ '3*2Wi_Use internal resources (Darwin)'#010+ 'P*2Wi_Use internal resources (Darwin)'#010+ 'p*2Wi_Use internal resources (Darwin)'#010+ - '3*2WN_Do not generate relocation code, needed f','or debugging (Windows'+ + '3*2WN_Do not generate relocation code, needed for debugging (Windows)'#010+ + 'A*2WN_Do not gener','ate relocation code, needed for debugging (Windows'+ ')'#010+ - 'A*2WN_Do not generate relocation code, needed for debugging (Windows)'#010+ '3*2WR_Generate relocation code (Windows)'#010+ 'A*2WR_Generate relocation code (Windows)'#010+ 'P*2WT_Specify MPW tool type application (Classic Mac OS)'#010+ - '3*2WX_En','able executable stack (Linux)'#010+ - 'A*2WX_Enable executable stack (Linux)'#010+ + '3*2WX_Enable executable stack (Linux)'#010+ + 'A*2WX_Enabl','e executable stack (Linux)'#010+ 'p*2WX_Enable executable stack (Linux)'#010+ 'P*2WX_Enable executable stack (Linux)'#010+ '**1X_Executable options:'#010+ '**2Xc_Pass --shared/-dynamic to the linker (BeOS, Darwin, FreeBSD, Lin'+ - 'u','x)'#010+ - '**2Xd_Do not use standard library search path (needed for cross compil'+ - 'e)'#010+ + 'ux)'#010+ + '**2Xd_Do not use standard library sear','ch path (needed for cross comp'+ + 'ile)'#010+ '**2Xe_Use external linker'#010+ '**2Xg_Create debuginfo in a separate file and add a debuglink section '+ 'to executable'#010+ - '**2XD_Try to link units dynamically (defines FPC_','LINK_DYNAMIC)'#010+ + '**2XD_Try to link units dynamically (defines FPC_LINK_DYNAMIC)'#010+ '**2Xi_Use internal linker'#010+ - '**2Xm_Generate link map'#010+ + '*','*2Xm_Generate link map'#010+ '**2XM_Set the name of the '#039'main'#039' program routine (default i'+ 's '#039'main'#039')'#010+ '**2XP_Prepend the binutils names with the prefix '#010+ - '**2Xr_Set library search path to (needed ','for cross compile) ('+ - 'BeOS, Linux)'#010+ - '**2XR_Prepend to all linker search paths (BeOS, Darwin, FreeBSD'+ - ', Linux, Mac OS, Solaris)'#010+ + '**2Xr_Set library search path to (needed for cross compile) (Be'+ + 'OS, Linux)'#010+ + '**2XR','_Prepend to all linker search paths (BeOS, Darwin, FreeB'+ + 'SD, Linux, Mac OS, Solaris)'#010+ '**2Xs_Strip all symbols from executable'#010+ '**2XS_Try to link units statically (default, defines FPC_LINK_STATIC)'#010+ - '*','*2Xt_Link with static libraries (-static is passed to linker)'#010+ + '**2Xt_Link with static libraries (-static ','is passed to linker)'#010+ '**2XX_Try to smartlink units (defines FPC_LINK_SMART)'#010+ '**1*_'#010+ '**1?_Show this help'#010+ diff --git a/compiler/ncal.pas b/compiler/ncal.pas index b89a4c5c66..7e55e145d5 100644 --- a/compiler/ncal.pas +++ b/compiler/ncal.pas @@ -118,7 +118,9 @@ interface constructor create(l:tnode; v : tprocsym;st : TSymtable; mp: tnode; callflags:tcallnodeflags);virtual; constructor create_procvar(l,r:tnode); constructor createintern(const name: string; params: tnode); + constructor createinternfromunit(const unitname, procname: string; params: tnode); constructor createinternres(const name: string; params: tnode; res:tdef); + constructor createinternresfromunit(const unitname, procname: string; params: tnode; res:tdef); constructor createinternreturn(const name: string; params: tnode; returnnode : tnode); destructor destroy;override; constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override; @@ -206,7 +208,7 @@ implementation verbose,globals, symconst,defutil,defcmp, htypechk,pass_1, - ncnv,nld,ninl,nadd,ncon,nmem,nset, + ncnv,nld,ninl,nadd,ncon,nmem,nset,nobjc, procinfo,cpuinfo, cgbase, wpobase @@ -934,12 +936,40 @@ implementation end; + constructor tcallnode.createinternfromunit(const unitname, procname: string; params: tnode); + var + srsym: tsym; + srsymtable: tsymtable; + begin + if not searchsym_in_named_module(unitname,procname,srsym,srsymtable) or + (srsym.typ<>procsym) then + Message1(cg_f_unknown_compilerproc,unitname+'.'+procname); + create(params,tprocsym(srsym),srsymtable,nil,[]); + end; + + constructor tcallnode.createinternres(const name: string; params: tnode; res:tdef); var pd : tprocdef; begin createintern(name,params); - typedef := res; + typedef:=res; + include(callnodeflags,cnf_typedefset); + pd:=tprocdef(symtableprocentry.ProcdefList[0]); + { both the normal and specified resultdef either have to be returned via a } + { parameter or not, but no mixing (JM) } + if paramanager.ret_in_param(typedef,pd.proccalloption) xor + paramanager.ret_in_param(pd.returndef,pd.proccalloption) then + internalerror(200108291); + end; + + + constructor tcallnode.createinternresfromunit(const unitname, procname: string; params: tnode; res:tdef); + var + pd : tprocdef; + begin + createinternfromunit(unitname,procname,params); + typedef:=res; include(callnodeflags,cnf_typedefset); pd:=tprocdef(symtableprocentry.ProcdefList[0]); { both the normal and specified resultdef either have to be returned via a } @@ -2811,6 +2841,14 @@ implementation begin result:=nil; + { convert Objective-C calls into a message call } + if (procdefinition.typ=procdef) and + (po_objc in tprocdef(procdefinition).procoptions) then + begin + result:=cobjcmessagesendnode.create(self.getcopy); + exit; + end; + { Check if the call can be inlined, sets the cnf_do_inline flag } check_inlining; diff --git a/compiler/ncgmem.pas b/compiler/ncgmem.pas index 470b2c8abd..2a6dcc69a0 100644 --- a/compiler/ncgmem.pas +++ b/compiler/ncgmem.pas @@ -79,13 +79,13 @@ implementation uses systems, - cutils,verbose,globals,constexp, + cutils,cclasses,verbose,globals,constexp, symconst,symdef,symsym,symtable,defutil,paramgr, aasmbase,aasmtai,aasmdata, procinfo,pass_2,parabase, pass_1,nld,ncon,nadd,nutils, cgutils,cgobj, - tgobj,ncgutil + tgobj,ncgutil,objcgutl ; @@ -95,17 +95,35 @@ implementation procedure tcgloadvmtaddrnode.pass_generate_code; var - href : treference; + href : treference; + pool : THashSet; + entry : PHashSetItem; + typename: string; begin location_reset(location,LOC_REGISTER,OS_ADDR); if (left.nodetype=typen) then begin - reference_reset_symbol(href, - current_asmdata.RefAsmSymbol(tobjectdef(tclassrefdef(resultdef).pointeddef).vmt_mangledname),0, - sizeof(pint)); location.register:=cg.getaddressregister(current_asmdata.CurrAsmList); - cg.a_loadaddr_ref_reg(current_asmdata.CurrAsmList,href,location.register); + if not is_objcclass(left.resultdef) then + begin + reference_reset_symbol(href, + current_asmdata.RefAsmSymbol(tobjectdef(tclassrefdef(resultdef).pointeddef).vmt_mangledname),0, + sizeof(pint)); + cg.a_loadaddr_ref_reg(current_asmdata.CurrAsmList,href,location.register); + end + else + begin + { find/add necessary classref/classname pool entries } + if current_asmdata.ConstPools[sp_objcmetaclass]=nil then + current_asmdata.ConstPools[sp_objcmetaclass]:=THashSet.Create(64, True, False); + pool:=current_asmdata.ConstPools[sp_objcmetaclass]; + typename:=left.resultdef.gettypename; + entry:=pool.FindOrAdd(@typename[1],length(typename)); + objcfinishstringrefpoolentry(entry,sec_objc_cls_refs,sec_objc_class_names); + reference_reset_symbol(href,tasmlabel(entry^.Data),0,sizeof(pint)); + cg.a_load_ref_reg(current_asmdata.CurrAsmList,OS_ADDR,OS_ADDR,href,location.register); + end; end else begin @@ -256,7 +274,8 @@ implementation exit; paraloc1.init; { classes and interfaces must be dereferenced implicit } - if is_class_or_interface(left.resultdef) then + if is_class_or_interface(left.resultdef) or + is_objcclass(left.resultdef) then begin { the contents of a class are aligned to a sizeof(pointer) } location_reset_ref(location,LOC_REFERENCE,def_cgsize(resultdef),sizeof(pint)); diff --git a/compiler/ncgobjc.pas b/compiler/ncgobjc.pas index 8a8f1cd607..21b018543d 100644 --- a/compiler/ncgobjc.pas +++ b/compiler/ncgobjc.pas @@ -39,8 +39,8 @@ implementation uses globtype,cclasses, aasmbase,aasmdata,aasmtai, - cgbase,cgutils,defutil, - symsym, + cgbase,cgutils,defutil,objcgutl, + symconst,symsym,symdef, node,nld,ncon, verbose; @@ -54,50 +54,34 @@ procedure tcgobjcselectornode.pass_generate_code; strlab : tasmlabel; pool : THashSet; entry : PHashSetItem; - name : string; + name : pshortstring; pc : pchar; begin - if current_asmdata.ConstPools[sp_objcselector] = nil then - current_asmdata.ConstPools[sp_objcselector] := THashSet.Create(64, True, False); - pool := current_asmdata.ConstPools[sp_objcselector]; + if current_asmdata.ConstPools[sp_objcselector]=nil then + current_asmdata.ConstPools[sp_objcselector]:=THashSet.Create(64, True, False); + pool:=current_asmdata.ConstPools[sp_objcselector]; case left.nodetype of loadn: begin - name:=tprocsym(tloadnode(left).symtableentry).mangledname; - entry := pool.FindOrAdd(@name[1],length(name)) + if (tloadnode(left).symtableentry.typ<>procsym) then + internalerror(2009051602); + if (tprocsym(tloadnode(left).symtableentry).procdeflist.count<>1) then + internalerror(2009051701); + name:=tprocdef(tprocsym(tloadnode(left).symtableentry).procdeflist[0]).messageinf.str; + entry:=pool.FindOrAdd(@name^[1],length(name^)) end; stringconstn: begin - entry := pool.FindOrAdd(tstringconstnode(left).value_str, tstringconstnode(left).len); + entry:=pool.FindOrAdd(tstringconstnode(left).value_str,tstringconstnode(left).len); end; else internalerror(2009030701); end; - { have we already generated this selector? } - if not assigned(entry^.Data) then - begin - { create new one - (no getdatalabel, because these labels have to be local) - } - current_asmdata.getlabel(reflab,alt_data); - current_asmdata.getlabel(strlab,alt_data); - entry^.Data := reflab; - getmem(pc,entry^.keylength+1); - move(entry^.key^,pc^,entry^.keylength); - pc[entry^.keylength]:=#0; - { add a pointer to the message name in the objc_message_refs section } - new_section(current_asmdata.asmlists[al_objc_data],sec_objc_message_refs,reflab.name,sizeof(pint)); - current_asmdata.asmlists[al_objc_data].concat(Tai_label.Create(reflab)); - current_asmdata.asmlists[al_objc_data].concat(Tai_const.Create_sym(strlab)); + objcfinishstringrefpoolentry(entry,sec_objc_message_refs,sec_objc_meth_var_names); - { and now add the message name to the meth_var_names } - new_section(current_asmdata.asmlists[al_objc_data],sec_objc_meth_var_names,strlab.name,1); - current_asmdata.asmlists[al_objc_data].concat(Tai_label.Create(strlab)); - current_asmdata.asmlists[al_objc_data].concat(Tai_string.Create_pchar(pc,entry^.keylength+1)); - end; - location_reset_ref(location, LOC_CREFERENCE, def_cgsize(resultdef), sizeof(pint)); + location_reset_ref(location,LOC_CREFERENCE,def_cgsize(resultdef),sizeof(pint)); location.reference.symbol:=tasmlabel(entry^.Data); end; diff --git a/compiler/ncgutil.pas b/compiler/ncgutil.pas index 2a0cd5497e..a9f02b0d56 100644 --- a/compiler/ncgutil.pas +++ b/compiler/ncgutil.pas @@ -2833,6 +2833,9 @@ implementation end; end else + { This is also valid for Objective-C classes: vmt_offset is 0 there, + and the first "field" of an Objective-C class instance is a pointer + to its "meta-class". } begin case selfloc.loc of LOC_REGISTER: diff --git a/compiler/nmem.pas b/compiler/nmem.pas index 626d682d17..9e5effe642 100644 --- a/compiler/nmem.pas +++ b/compiler/nmem.pas @@ -172,16 +172,20 @@ implementation expectloc:=LOC_REGISTER; if left.nodetype<>typen then firstpass(left) - else if not assigned(current_procinfo) or - (po_inline in current_procinfo.procdef.procoptions) or - wpoinfomanager.symbol_live(current_procinfo.procdef.mangledname) then + else if not is_objcclass(left.resultdef) and + not is_objcclassref(left.resultdef) then begin - { keep track of which classes might be instantiated via a classrefdef } - if (left.resultdef.typ=classrefdef) then - tobjectdef(tclassrefdef(left.resultdef).pointeddef).register_maybe_created_object_type - else if (left.resultdef.typ=objectdef) then - tobjectdef(left.resultdef).register_maybe_created_object_type - end + if not assigned(current_procinfo) or + (po_inline in current_procinfo.procdef.procoptions) or + wpoinfomanager.symbol_live(current_procinfo.procdef.mangledname) then + begin + { keep track of which classes might be instantiated via a classrefdef } + if (left.resultdef.typ=classrefdef) then + tobjectdef(tclassrefdef(left.resultdef).pointeddef).register_maybe_created_object_type + else if (left.resultdef.typ=objectdef) then + tobjectdef(left.resultdef).register_maybe_created_object_type + end + end; end; diff --git a/compiler/nobjc.pas b/compiler/nobjc.pas index 27f99755fd..9ecb266c29 100644 --- a/compiler/nobjc.pas +++ b/compiler/nobjc.pas @@ -42,17 +42,30 @@ type end; tobjcselectornodeclass = class of tobjcselectornode; + tobjcmessagesendnode = class(tunarynode) + public + constructor create(forcall: tnode); + function pass_typecheck: tnode;override; + function pass_1: tnode;override; + end; + tobjcmessagesendnodeclass = class of tobjcmessagesendnode; + var cobjcselectornode : tobjcselectornodeclass; + cobjcmessagesendnode : tobjcmessagesendnodeclass; implementation uses sysutils, - cclasses, + globtype,cclasses, verbose,pass_1, - defutil,symtable,symdef,symconst, - ncnv,ncon,ncal,nmem; + defutil, + symtype,symtable,symdef,symconst,symsym, + paramgr, + nbas,nld,ncnv,ncon,ncal,nmem, + objcutil, + cgbase; {***************************************************************************** @@ -140,14 +153,166 @@ function tobjcselectornode.pass_typecheck: tnode; else CGMessage(type_e_expected_objc_method); end; - resultdef:=search_system_type('SEL').typedef; + resultdef:=objc_seltype; end; function tobjcselectornode.pass_1: tnode; begin result:=nil; + expectloc:=LOC_CREFERENCE; end; +{***************************************************************************** + TOBJCMESSAGESENDNODE +*****************************************************************************} + +constructor tobjcmessagesendnode.create(forcall: tnode); + begin + if (forcall.nodetype<>calln) then + internalerror(2009032502); + { typecheck pass (and pass1) must already have run on the call node, + because pass1 of the callnode creates this node + } + inherited create(objcmessagesendn,forcall); + end; + + +function tobjcmessagesendnode.pass_typecheck: tnode; + begin + { typecheckpass of left has already run, see constructor } + resultdef:=left.resultdef; + result:=nil; + expectloc:=left.expectloc; + end; + + +function tobjcmessagesendnode.pass_1: tnode; + var + msgsendname: string; + newparas, + lastpara: tcallparanode; + block: tblocknode; + statements: tstatementnode; + temp: ttempcreatenode; + objcsupertype: tdef; + field: tfieldvarsym; + begin + { pass1 of left has already run, see constructor } + + { default behaviour: call objc_msgSend and friends; + ppc64 and x86_64 for Mac OS X have to override this as they + call messages via an indirect function call similar to + dynamically linked functions, ARM maybe as well (not checked) + + Which variant of objc_msgSend is used depends on the + result type, and on whether or not it's an inherited call. + } + + { record returned via implicit pointer } + if paramanager.ret_in_param(left.resultdef,tcallnode(left).procdefinition.proccalloption) then + if not(cnf_inherited in tcallnode(left).callnodeflags) then + msgsendname:='OBJC_MSGSEND_STRET' + else + msgsendname:='OBJC_MSGSENDSUPER_STRET' +{$ifdef i386} + { special case for fpu results on i386 for non-inherited calls } + else if (left.resultdef.typ=floatdef) and + not(cnf_inherited in tcallnode(left).callnodeflags) then + msgsendname:='OBJC_MSGSENF_FPRET' +{$endif} + { default } + else if not(cnf_inherited in tcallnode(left).callnodeflags) then + msgsendname:='OBJC_MSGSEND' + else + msgsendname:='OBJC_MSGSENDSUPER'; + + newparas:=tcallparanode(tcallnode(left).left); + { parameters are chained from right to left, and we have to insert the two + first parameters (self and selector) -> walk to the end of the chain + } + lastpara:=newparas; + while assigned(lastpara.right) do + lastpara:=tcallparanode(lastpara.right); + { Handle self } + { 1) If we're calling a class method, use a class ref. } + if (po_classmethod in tcallnode(left).procdefinition.procoptions) and + ((tcallnode(left).methodpointer.nodetype=typen) or + (tcallnode(left).methodpointer.resultdef.typ<>classrefdef)) then + begin + tcallnode(left).methodpointer:=cloadvmtaddrnode.create(tcallnode(left).methodpointer); + firstpass(tcallnode(left).methodpointer); + end; + { 2) convert parameter to id to match objc_MsgSend* signatures } + inserttypeconv_internal(tcallnode(left).methodpointer,objc_idtype); + { in case of sending a message to a superclass, self is a pointer to + and objc_super record + } + if (cnf_inherited in tcallnode(left).callnodeflags) then + begin + block:=internalstatements(statements); + objcsupertype:=search_named_unit_globaltype('OBJC1','OBJC_SUPER').typedef; + if (objcsupertype.typ<>recorddef) then + internalerror(2009032901); + { temp for the for the objc_super record } + temp:=ctempcreatenode.create(objcsupertype,objcsupertype.size,tt_persistent,false); + addstatement(statements,temp); + { initialize objc_super record: first the destination object instance } + field:=tfieldvarsym(trecorddef(objcsupertype).symtable.find('RECEIVER')); + if not assigned(field) then + internalerror(2009032902); + addstatement(statements, + cassignmentnode.create( + csubscriptnode.create(field,ctemprefnode.create(temp)), + tcallnode(left).methodpointer + ) + ); + { and secondly, the destination class type } + field:=tfieldvarsym(trecorddef(objcsupertype).symtable.find('_CLASS')); + if not assigned(field) then + internalerror(2009032903); + addstatement(statements, + cassignmentnode.create( + csubscriptnode.create(field,ctemprefnode.create(temp)), + objcsuperclassnode(tobjectdef(tcallnode(left).methodpointer.resultdef)) + ) + ); + { result of this block is the address of this temp } + addstatement(statements,caddrnode.create_internal(ctemprefnode.create(temp))); + { replace the method pointer with the address of this temp } + tcallnode(left).methodpointer:=block; + typecheckpass(block); + end; + lastpara.right:=ccallparanode.create(tcallnode(left).methodpointer,nil); + { insert selector } + lastpara.right:=ccallparanode.create( + cobjcselectornode.create( + cstringconstnode.createstr(tprocdef(tcallnode(left).procdefinition).messageinf.str^)), + lastpara.right); + { parameters are reused -> make sure they don't get freed } + tcallnode(left).left:=nil; + { methodpointer is also reused } + tcallnode(left).methodpointer:=nil; + { and now the call to the Objective-C rtl } + result:=ccallnode.createinternresfromunit('OBJC1',msgsendname,newparas,left.resultdef); + + if (cnf_inherited in tcallnode(left).callnodeflags) then + begin + { free the objc_super temp after the call. We cannout use + ctempdeletenode.create_normal_temp before the call, because then + the temp will be released while evaluating the parameters, and thus + may be reused while evaluating another parameter + } + block:=internalstatements(statements); + addstatement(statements,result); + addstatement(statements,ctempdeletenode.create(temp)); + typecheckpass(block); + result:=block; + end; + end; + + +begin + cobjcmessagesendnode:=tobjcmessagesendnode; end. diff --git a/compiler/node.pas b/compiler/node.pas index db914b4745..d18177336e 100644 --- a/compiler/node.pas +++ b/compiler/node.pas @@ -110,7 +110,8 @@ interface rttin, { Rtti information so they can be accessed in result/firstpass} loadparentfpn, { Load the framepointer of the parent for nested procedures } dataconstn, { node storing some binary data } - objcselectorn + objcselectorn, { node for an Objective-C message selector } + objcmessagesendn { node for message sent to an Objective-C instance (similar to a method call) } ); tnodetypeset = set of tnodetype; @@ -192,7 +193,8 @@ interface 'rttin', 'loadparentfpn', 'dataconstn', - 'objcselectorn'); + 'objcselectorn', + 'objcmessagesendn'); type { all boolean field of ttree are now collected in flags } diff --git a/compiler/objcgutl.pas b/compiler/objcgutl.pas new file mode 100644 index 0000000000..ae3eda7edf --- /dev/null +++ b/compiler/objcgutl.pas @@ -0,0 +1,76 @@ +{ + Copyright (c) 2009 by Jonas Maebe + + This unit implements some Objective-C helper routines at the code generator + level. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + **************************************************************************** +} + +{$i fpcdefs.inc} + +unit objcgutl; + +interface + +uses + cclasses, + aasmbase; + +procedure objcfinishstringrefpoolentry(entry: phashsetitem; refsec, stringsec: tasmsectiontype); + + +implementation + +uses + globtype, + aasmdata,aasmtai, + cgbase,cgutils, + symsym, + verbose; + +procedure objcfinishstringrefpoolentry(entry: phashsetitem; refsec, stringsec: tasmsectiontype); + var + reflab, + strlab : tasmlabel; + pc : pchar; + begin + { have we already generated this selector? } + if not assigned(entry^.Data) then + begin + { create new one + (no getdatalabel, because these labels have to be local) + } + current_asmdata.getlabel(reflab,alt_data); + current_asmdata.getlabel(strlab,alt_data); + entry^.Data:=reflab; + getmem(pc,entry^.keylength+1); + move(entry^.key^,pc^,entry^.keylength); + pc[entry^.keylength]:=#0; + { add a pointer to the message name in the string references section } + new_section(current_asmdata.asmlists[al_objc_data],refsec,reflab.name,sizeof(pint)); + current_asmdata.asmlists[al_objc_data].concat(Tai_label.Create(reflab)); + current_asmdata.asmlists[al_objc_data].concat(Tai_const.Create_sym(strlab)); + + { and now add the message name to the associated strings section } + new_section(current_asmdata.asmlists[al_objc_data],stringsec,strlab.name,1); + current_asmdata.asmlists[al_objc_data].concat(Tai_label.Create(strlab)); + current_asmdata.asmlists[al_objc_data].concat(Tai_string.Create_pchar(pc,entry^.keylength+1)); + end; + end; + +end. diff --git a/compiler/objcutil.pas b/compiler/objcutil.pas new file mode 100644 index 0000000000..2966af4724 --- /dev/null +++ b/compiler/objcutil.pas @@ -0,0 +1,60 @@ +{ + Copyright (c) 2009 by Jonas Maebe + + This unit implements some Objective-C helper routines at the node tree + level. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + **************************************************************************** +} + +{$i fpcdefs.inc} + +unit objcutil; + +interface + +uses + node, + symdef; + +function objcsuperclassnode(def: tobjectdef): tnode; + +implementation + +uses + pass_1, + verbose, + symtable,symconst, + nbas,nmem,ncal,nld; + +function objcsuperclassnode(def: tobjectdef): tnode; + var + block: tblocknode; + statements: tstatementnode; + para: tcallparanode; + begin + { only valid for Objective-C classes } + if not is_objcclass(def) then + internalerror(2009032903); + block:=internalstatements(statements); + para:=ccallparanode.create(cloadvmtaddrnode.create(ctypenode.create(def)),nil); + addstatement(statements,ccallnode.createinternfromunit('OBJC1','CLASS_GETSUPERCLASS',para)); + typecheckpass(block); + result:=block; + end; + +end. diff --git a/compiler/pdecl.pas b/compiler/pdecl.pas index 5e6c4e767c..a125e722ee 100644 --- a/compiler/pdecl.pas +++ b/compiler/pdecl.pas @@ -278,6 +278,22 @@ implementation procedure types_dec; + procedure finish_objc_class(od: tobjectdef); + begin + { Objective-C classes can be external -> all messages inside are + external (defined at the class level instead of per method, so + that you cannot define some methods as external and some not) + } + if (token = _ID) and + (idtoken = _EXTERNAL) then + begin + consume(_EXTERNAL); + consume(_SEMICOLON); + od.make_all_methods_external; + end; + end; + + function parse_generic_parameters:TFPObjectList; var generictype : ttypesym; @@ -361,7 +377,8 @@ implementation begin if ((token=_CLASS) or (token=_INTERFACE) or - (token=_DISPINTERFACE)) and + (token=_DISPINTERFACE) or + (token=_OBJCCLASS)) and (assigned(ttypesym(sym).typedef)) and is_class_or_interface_or_dispinterface(ttypesym(sym).typedef) and (oo_is_forward in tobjectdef(ttypesym(sym).typedef).objectoptions) then @@ -376,6 +393,8 @@ implementation objecttype:=odt_interfacecorba; _DISPINTERFACE : objecttype:=odt_dispinterface; + _OBJCCLASS : + objecttype:=odt_objcclass; else internalerror(200811072); end; @@ -473,7 +492,8 @@ implementation { Build VMT indexes, skip for type renaming and forward classes } if (hdef.typesym=newtype) and not(oo_is_forward in tobjectdef(hdef).objectoptions) and - not(df_generic in hdef.defoptions) then + not(df_generic in hdef.defoptions) and + not is_objcclass(hdef) then begin vmtbuilder:=TVMTBuilder.Create(tobjectdef(hdef)); vmtbuilder.generate_vmt; @@ -481,6 +501,9 @@ implementation end; try_consume_hintdirective(newtype.symoptions); consume(_SEMICOLON); + + if is_objcclass(hdef) then + finish_objc_class(tobjectdef(hdef)); end; recorddef : begin diff --git a/compiler/pdecobj.pas b/compiler/pdecobj.pas index 04e1de79fe..624060bd0b 100644 --- a/compiler/pdecobj.pas +++ b/compiler/pdecobj.pas @@ -267,6 +267,9 @@ implementation odt_cppclass: if not(is_cppclass(childof)) then Message(parser_e_mix_of_classes_and_objects); + odt_objcclass: + if not(is_objcclass(childof)) then + Message(parser_e_mix_of_classes_and_objects); odt_object: if not(is_object(childof)) then Message(parser_e_mix_of_classes_and_objects); @@ -295,6 +298,9 @@ implementation odt_interfacecom: if current_objectdef<>interface_iunknown then childof:=interface_iunknown; + odt_objcclass: + if current_objectdef<>objcclass_nsobject then + childof:=objcclass_nsobject; end; end; @@ -362,6 +368,21 @@ implementation procedure parse_object_members; + procedure chkobjc(pd: tprocdef); + begin + if is_objcclass(pd._class) then + begin + { none of the explicit calling conventions should be allowed } + if (po_hascallingconvention in pd.procoptions) then + internalerror(2009032501); + pd.proccalloption:=pocall_cdecl; + if not(po_msgstr in pd.procoptions) then + Message(parser_e_objc_requires_msgstr); + include(pd.procoptions,po_objc); + end; + end; + + procedure chkcpp(pd:tprocdef); begin if is_cppclass(pd._class) then @@ -390,7 +411,7 @@ implementation object_member_blocktype : tblock_type; begin { empty class declaration ? } - if (current_objectdef.objecttype=odt_class) and + if (current_objectdef.objecttype in [odt_class,odt_objcclass]) and (token=_SEMICOLON) then exit; @@ -545,6 +566,7 @@ implementation include(current_objectdef.objectoptions,oo_has_virtual); chkcpp(pd); + chkobjc(pd); end; maybe_parse_hint_directives(pd); diff --git a/compiler/pdecsub.pas b/compiler/pdecsub.pas index e2edfe078b..536e148cfb 100644 --- a/compiler/pdecsub.pas +++ b/compiler/pdecsub.pas @@ -39,7 +39,8 @@ interface pd_notobjintf, { directive can not be used interface declaration } pd_notprocvar, { directive can not be used procvar declaration } pd_dispinterface,{ directive can be used with dispinterface methods } - pd_cppobject { directive can be used with cppclass } + pd_cppobject, { directive can be used with cppclass } + pd_objcclass { directive can be used with objcclass } ); tpdflags=set of tpdflag; @@ -158,7 +159,16 @@ implementation hdef : tdef; vsp : tvarspez; begin - if (pd.typ=procvardef) and + if (pd.typ=procdef) and + is_objcclass(tprocdef(pd)._class) then + begin + { insert Objective-C self and selector parameters } + vs:=tparavarsym.create('$msgsel',paranr_vmt,vs_value,objc_seltype,[vo_is_msgsel,vo_is_hidden_para]); + pd.parast.insert(vs); + vs:=tparavarsym.create('$self',paranr_self,vs_value,voidpointertype,[vo_is_self,vo_is_hidden_para]); + pd.parast.insert(vs); + end + else if (pd.typ=procvardef) and pd.is_methodpointer then begin { Generate self variable } @@ -1018,6 +1028,9 @@ implementation _CONSTRUCTOR : begin + { Objective-C does not know the concept of a constructor } + if is_objcclass(aclass) then + Message(parser_e_objc_no_constructor_destructor); consume(_CONSTRUCTOR); parse_proc_head(aclass,potype_constructor,pd); if assigned(pd) and @@ -1038,6 +1051,9 @@ implementation _DESTRUCTOR : begin + { Objective-C does not know the concept of a destructor } + if is_objcclass(aclass) then + Message(parser_e_objc_no_constructor_destructor); consume(_DESTRUCTOR); parse_proc_head(aclass,potype_destructor,pd); if assigned(pd) then @@ -1330,21 +1346,33 @@ var begin if pd.typ<>procdef then internalerror(2003042613); - if not is_class(tprocdef(pd)._class) then + if not is_class(tprocdef(pd)._class) and + not is_objcclass(tprocdef(pd)._class) then Message(parser_e_msg_only_for_classes); { check parameter type } - paracnt:=0; - pd.parast.SymList.ForEachCall(@check_msg_para,@paracnt); - if paracnt<>1 then - Message(parser_e_ill_msg_param); + if not is_objcclass(tprocdef(pd)._class) then + begin + paracnt:=0; + pd.parast.SymList.ForEachCall(@check_msg_para,@paracnt); + if paracnt<>1 then + Message(parser_e_ill_msg_param); + end; pt:=comp_expr(true); if pt.nodetype=stringconstn then begin include(pd.procoptions,po_msgstr); + if (tstringconstnode(pt).len>255) then + Message(parser_e_message_string_too_long); tprocdef(pd).messageinf.str:=stringdup(tstringconstnode(pt).value_str); + { the message string is the last part we need to set the mangled name + for an Objective-C message + } + if is_objcclass(tprocdef(pd)._class) then + tprocdef(pd).setmangledname(tprocdef(pd).objcmangledname); end else - if is_constintnode(pt) then + if is_constintnode(pt) and + is_class(tprocdef(pd)._class) then begin include(pd.procoptions,po_msgint); if (Tordconstnode(pt).value'OBJCBASE') then + AddUnit('objcbase'); + end; { Profile unit? Needed for go32v2 only } if (cs_profile in current_settings.moduleswitches) and (target_info.system in [system_i386_go32v2,system_i386_watcom]) then diff --git a/compiler/ptype.pas b/compiler/ptype.pas index 9a6c5dcdbd..4fd71d7b1a 100644 --- a/compiler/ptype.pas +++ b/compiler/ptype.pas @@ -987,6 +987,11 @@ implementation consume(token); def:=object_dec(odt_cppclass,name,genericdef,genericlist,nil); end; + _OBJCCLASS : + begin + consume(token); + def:=object_dec(odt_objcclass,name,genericdef,genericlist,nil); + end; _INTERFACE : begin { need extra check here since interface is a keyword @@ -1099,7 +1104,8 @@ implementation { Init } if ( assigned(def.typesym) and - (st.symtabletype=globalsymtable) + (st.symtabletype=globalsymtable) and + not is_objcclass(def) ) or def.needs_inittable or (ds_init_table_used in def.defstates) then @@ -1107,7 +1113,8 @@ implementation { RTTI } if ( assigned(def.typesym) and - (st.symtabletype=globalsymtable) + (st.symtabletype=globalsymtable) and + not is_objcclass(def) ) or (ds_rtti_table_used in def.defstates) then RTTIWriter.write_rtti(def,fullrtti); diff --git a/compiler/scanner.pas b/compiler/scanner.pas index d6db1a4ec8..38ba4706db 100644 --- a/compiler/scanner.pas +++ b/compiler/scanner.pas @@ -449,9 +449,18 @@ implementation current_settings.modeswitches:=init_settings.modeswitches; Result:=true; if doinclude then - include(current_settings.modeswitches,i) + begin + include(current_settings.modeswitches,i); + if (i=m_objectivec1) then + include(current_settings.modeswitches,m_class); + end else - exclude(current_settings.modeswitches,i); + begin + exclude(current_settings.modeswitches,i); + if (i=m_objectivec1) and + ([m_delphi,m_objfpc]*current_settings.modeswitches=[]) then + exclude(current_settings.modeswitches,m_class); + end; { set other switches depending on changed mode switch } HandleModeSwitches(changeinit); diff --git a/compiler/symconst.pas b/compiler/symconst.pas index 9da706e546..e6b6e19b0f 100644 --- a/compiler/symconst.pas +++ b/compiler/symconst.pas @@ -289,7 +289,8 @@ type odt_interfacecom_function, odt_interfacecorba, odt_cppclass, - odt_dispinterface + odt_dispinterface, + odt_objcclass ); { Variations in interfaces implementation } @@ -364,7 +365,9 @@ type vo_is_range_check, vo_is_overflow_check, vo_is_typinfo_para, - vo_is_weak_external + vo_is_weak_external, + { Objective-C message selector parameter } + vo_is_msgsel ); tvaroptions=set of tvaroption; diff --git a/compiler/symdef.pas b/compiler/symdef.pas index 9ef979ad1e..d09ddf69fe 100644 --- a/compiler/symdef.pas +++ b/compiler/symdef.pas @@ -299,6 +299,7 @@ interface procedure register_created_object_type;override; procedure register_maybe_created_object_type; procedure register_created_classref_type; + procedure make_all_methods_external; end; tclassrefdef = class(tabstractpointerdef) @@ -517,6 +518,7 @@ interface procedure setmangledname(const s : string); function fullprocname(showhidden:boolean):string; function cplusplusmangledname : string; + function objcmangledname : string; function is_methodpointer:boolean;override; function is_addressonly:boolean;override; end; @@ -660,6 +662,13 @@ interface of all interfaces } rec_tguid : trecorddef; + { Objective-C base types } + objc_metaclasstype, + objc_superclasstype, + objc_idtype, + objc_seltype : tpointerdef; + objcclass_nsobject : tobjectdef; + const {$ifdef i386} pbestrealtype : ^tdef = @s80floattype; @@ -708,10 +717,13 @@ interface function is_object(def: tdef): boolean; function is_class(def: tdef): boolean; function is_cppclass(def: tdef): boolean; + function is_objcclass(def: tdef): boolean; + function is_objcclassref(def: tdef): boolean; function is_class_or_interface(def: tdef): boolean; function is_class_or_interface_or_object(def: tdef): boolean; function is_class_or_interface_or_dispinterface(def: tdef): boolean; + procedure loadobjctypes; {$ifdef x86} function use_sse(def : tdef) : boolean; @@ -3498,6 +3510,24 @@ implementation end; + function tprocdef.objcmangledname : string; + begin + if not (po_msgstr in procoptions) then + internalerror(2009030901); + { we may very well need longer strings to handle these... } + if ((255-length(tobjectdef(procsym.owner.defowner).objrealname^) + -length('+[ ]')-length(messageinf.str^)) < 0) then + Message1(parser_e_objc_message_name_too_long,messageinf.str^); + if not(po_classmethod in procoptions) then + result:='-[' + else + result:='+['; + result:= + result+tobjectdef(procsym.owner.defowner).objrealname^+' '+ + messageinf.str^+']'; + end; + + procedure tprocdef.setmangledname(const s : string); begin { This is not allowed anymore, the forward declaration @@ -3685,6 +3715,12 @@ implementation else ImplementedInterfaces:=nil; writing_class_record_dbginfo:=false; + + { make NSObject immediately known in the same unit } + if (childof=nil) and + (objecttype=odt_objcclass) and + (objrealname^='NSObject') then + objcclass_nsobject:=self; end; @@ -3761,6 +3797,10 @@ implementation (objecttype=odt_interfacecom) and (objname^='IUNKNOWN') then interface_iunknown:=self; + if (childof=nil) and + (objecttype=odt_objcclass) and + (objrealname^='NSObject') then + objcclass_nsobject:=self; writing_class_record_dbginfo:=false; end; @@ -4031,7 +4071,7 @@ implementation { inherit options and status } objectoptions:=objectoptions+(c.objectoptions*inherited_objectoptions); { add the data of the anchestor class/object } - if (objecttype in [odt_class,odt_object]) then + if (objecttype in [odt_class,odt_object,odt_objcclass]) then begin tObjectSymtable(symtable).datasize:=tObjectSymtable(symtable).datasize+tObjectSymtable(c.symtable).datasize; { inherit recordalignment } @@ -4053,7 +4093,7 @@ implementation var vs: tfieldvarsym; begin - if objecttype in [odt_interfacecom,odt_interfacecorba,odt_dispinterface] then + if objecttype in [odt_interfacecom,odt_interfacecorba,odt_dispinterface,odt_objcclass] then exit; if (oo_has_vmt in objectoptions) then internalerror(12345) @@ -4148,7 +4188,7 @@ implementation function tobjectdef.size : aint; begin - if objecttype in [odt_class,odt_interfacecom,odt_interfacecorba,odt_dispinterface] then + if objecttype in [odt_class,odt_interfacecom,odt_interfacecorba,odt_dispinterface,odt_objcclass] then result:=sizeof(pint) else result:=tObjectSymtable(symtable).datasize; @@ -4157,7 +4197,7 @@ implementation function tobjectdef.alignment:shortint; begin - if objecttype in [odt_class,odt_interfacecom,odt_interfacecorba,odt_dispinterface] then + if objecttype in [odt_class,odt_interfacecom,odt_interfacecorba,odt_dispinterface,odt_objcclass] then alignment:=sizeof(pint) else alignment:=tObjectSymtable(symtable).recordalignment; @@ -4171,6 +4211,8 @@ implementation odt_class: { the +2*sizeof(pint) is size and -size } vmtmethodoffset:=(index+10)*sizeof(pint)+2*sizeof(pint); + odt_objcclass: + vmtmethodoffset:=0; odt_interfacecom,odt_interfacecorba: vmtmethodoffset:=index*sizeof(pint); else @@ -4203,7 +4245,8 @@ implementation needs_inittable:=is_related(interface_iunknown); odt_object: needs_inittable:=tObjectSymtable(symtable).needs_init_final; - odt_cppclass: + odt_cppclass, + odt_objcclass: needs_inittable:=false; else internalerror(200108267); @@ -4286,6 +4329,25 @@ implementation end; end; + + procedure make_procdef_external(data: tobject; arg: pointer); + var + def: tdef absolute data; + begin + if (def.typ = procdef) then + begin + include(tprocdef(def).procoptions,po_external); + tprocdef(def).forwarddef:=false; + end; + end; + + + procedure tobjectdef.make_all_methods_external; + begin + self.symtable.deflist.foreachcall(@make_procdef_external,nil); + end; + + {**************************************************************************** TImplementedInterface ****************************************************************************} @@ -4566,6 +4628,24 @@ implementation end; + function is_objcclass(def: tdef): boolean; + begin + is_objcclass:= + assigned(def) and + (def.typ=objectdef) and + (tobjectdef(def).objecttype=odt_objcclass); + end; + + + function is_objcclassref(def: tdef): boolean; + begin + is_objcclassref:= + assigned(def) and + (def.typ=classrefdef) and + is_objcclass(tclassrefdef(def).pointeddef); + end; + + function is_class_or_interface(def: tdef): boolean; begin result:= @@ -4593,7 +4673,17 @@ implementation end; + procedure loadobjctypes; + begin + objc_metaclasstype:=tpointerdef(search_named_unit_globaltype('OBJC1','POBJC_CLASS').typedef); + objc_superclasstype:=tpointerdef(search_named_unit_globaltype('OBJC1','POBJC_SUPER').typedef); + objc_idtype:=tpointerdef(search_named_unit_globaltype('OBJC1','ID').typedef); + objc_seltype:=tpointerdef(search_named_unit_globaltype('OBJC1','SEL').typedef); + end; + + {$ifdef x86} + function use_sse(def : tdef) : boolean; begin use_sse:=(is_single(def) and (current_settings.fputype in sse_singlescalar)) or diff --git a/compiler/symtable.pas b/compiler/symtable.pas index ca53259251..a0f8254639 100644 --- a/compiler/symtable.pas +++ b/compiler/symtable.pas @@ -196,10 +196,12 @@ interface function searchsym(const s : TIDString;out srsym:tsym;out srsymtable:TSymtable):boolean; function searchsym_type(const s : TIDString;out srsym:tsym;out srsymtable:TSymtable):boolean; function searchsym_in_module(pm:pointer;const s : TIDString;out srsym:tsym;out srsymtable:TSymtable):boolean; + function searchsym_in_named_module(const unitname, symname: TIDString; out srsym: tsym; out srsymtable: tsymtable): boolean; function searchsym_in_class(classh,contextclassh:tobjectdef;const s : TIDString;out srsym:tsym;out srsymtable:TSymtable):boolean; function searchsym_in_class_by_msgint(classh:tobjectdef;msgid:longint;out srdef : tdef;out srsym:tsym;out srsymtable:TSymtable):boolean; function searchsym_in_class_by_msgstr(classh:tobjectdef;const s:string;out srsym:tsym;out srsymtable:TSymtable):boolean; function search_system_type(const s: TIDString): ttypesym; + function search_named_unit_globaltype(const unitname, typename: TIDString): ttypesym; function search_class_member(pd : tobjectdef;const s : string):tsym; function search_assignment_operator(from_def,to_def:Tdef):Tprocdef; {Looks for macro s (must be given in upper case) in the macrosymbolstack, } @@ -1761,6 +1763,43 @@ implementation end; + function searchsym_in_named_module(const unitname, symname: TIDString; out srsym: tsym; out srsymtable: tsymtable): boolean; + var + stackitem : psymtablestackitem; + begin + result:=false; + stackitem:=symtablestack.stack; + while assigned(stackitem) do + begin + srsymtable:=stackitem^.symtable; + if (srsymtable.symtabletype=globalsymtable) and + (srsymtable.name^=unitname) then + begin + srsym:=tsym(srsymtable.find(symname)); + if not assigned(srsym) then + break; + result:=true; + exit; + end; + stackitem:=stackitem^.next; + end; + + { If the module is the current unit we also need + to search the local symtable } + if (current_module.globalsymtable=srsymtable) and + assigned(current_module.localsymtable) then + begin + srsymtable:=current_module.localsymtable; + srsym:=tsym(srsymtable.find(symname)); + if assigned(srsym) then + begin + result:=true; + exit; + end; + end; + end; + + function searchsym_in_class(classh,contextclassh:tobjectdef;const s : TIDString;out srsym:tsym;out srsymtable:TSymtable):boolean; var hashedid : THashedIDString; @@ -1907,6 +1946,28 @@ implementation end; + function search_named_unit_globaltype(const unitname, typename: TIDString): ttypesym; + var + contextobjdef : tobjectdef; + stackitem : psymtablestackitem; + srsymtable: tsymtable; + sym: tsym; + begin + if searchsym_in_named_module(unitname,typename,sym,srsymtable) and + (sym.typ=typesym) then + begin + result:=ttypesym(sym); + exit; + end + else + begin + cgmessage2(cg_f_unknown_type_in_unit,typename,unitname); + result:=nil; + end; + end; + + + function search_class_member(pd : tobjectdef;const s : string):tsym; { searches n in symtable of pd and all anchestors } var diff --git a/compiler/tokens.pas b/compiler/tokens.pas index 564d07bb8e..32f55894e4 100644 --- a/compiler/tokens.pas +++ b/compiler/tokens.pas @@ -221,6 +221,7 @@ type _INTERFACE, _INTERRUPT, _NODEFAULT, + _OBJCCLASS, _OTHERWISE, _PROCEDURE, _PROTECTED, @@ -473,6 +474,7 @@ const (str:'INTERFACE' ;special:false;keyword:m_all;op:NOTOKEN), (str:'INTERRUPT' ;special:false;keyword:m_none;op:NOTOKEN), (str:'NODEFAULT' ;special:false;keyword:m_none;op:NOTOKEN), + (str:'OBJCCLASS' ;special:false;keyword:m_objectivec1;op:NOTOKEN), (str:'OTHERWISE' ;special:false;keyword:m_all;op:NOTOKEN), (str:'PROCEDURE' ;special:false;keyword:m_all;op:NOTOKEN), (str:'PROTECTED' ;special:false;keyword:m_none;op:NOTOKEN), diff --git a/rtl/darwin/Makefile b/rtl/darwin/Makefile index 881c38e729..5e605c15c4 100644 --- a/rtl/darwin/Makefile +++ b/rtl/darwin/Makefile @@ -1,5 +1,5 @@ # -# Don't edit, this file is generated by FPCMake Version 2.0.0 [2009/02/28] +# Don't edit, this file is generated by FPCMake Version 2.0.0 [2009/03/15] # default: all MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded @@ -295,178 +295,178 @@ ifndef USELIBGGI USELIBGGI=NO endif ifeq ($(FULL_TARGET),i386-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),i386-go32v2) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),i386-win32) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),i386-os2) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),i386-freebsd) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),i386-beos) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),i386-haiku) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),i386-netbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),i386-solaris) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),i386-qnx) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),i386-netware) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),i386-openbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),i386-wdosx) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),i386-darwin) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),i386-emx) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),i386-watcom) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),i386-netwlibc) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),i386-wince) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),i386-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),i386-symbian) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),m68k-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),m68k-freebsd) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),m68k-netbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),m68k-amiga) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),m68k-atari) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),m68k-openbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),m68k-palmos) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),m68k-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),powerpc-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),powerpc-netbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),powerpc-amiga) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),powerpc-macos) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),powerpc-darwin) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),powerpc-morphos) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),powerpc-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),sparc-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),sparc-netbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),sparc-solaris) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),sparc-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),x86_64-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),x86_64-freebsd) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),x86_64-darwin) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),x86_64-win64) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),x86_64-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),arm-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),arm-palmos) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),arm-darwin) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),arm-wince) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),arm-gba) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),arm-nds) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),arm-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),arm-symbian) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),powerpc64-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),powerpc64-darwin) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),powerpc64-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),avr-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),armeb-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),armeb-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 +override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale objc1 objcbase endif ifeq ($(FULL_TARGET),i386-linux) override TARGET_IMPLICITUNITS+=exeinfo @@ -1383,6 +1383,7 @@ endif ifeq ($(OS_TARGET),go32v2) STATICLIBPREFIX= SHORTSUFFIX=dos +IMPORTLIBPREFIX= endif ifeq ($(OS_TARGET),watcom) STATICLIBPREFIX= @@ -1390,6 +1391,7 @@ OEXT=.obj ASMEXT=.asm SHAREDLIBEXT=.dll SHORTSUFFIX=wat +IMPORTLIBPREFIX= endif ifeq ($(OS_TARGET),linux) BATCHEXT=.sh @@ -1426,6 +1428,7 @@ STATICLIBPREFIX= SHAREDLIBEXT=.dll SHORTSUFFIX=os2 ECHO=echo +IMPORTLIBPREFIX= endif ifeq ($(OS_TARGET),emx) BATCHEXT=.cmd @@ -1434,6 +1437,7 @@ STATICLIBPREFIX= SHAREDLIBEXT=.dll SHORTSUFFIX=emx ECHO=echo +IMPORTLIBPREFIX= endif ifeq ($(OS_TARGET),amiga) EXEEXT= @@ -1473,17 +1477,20 @@ ifeq ($(OS_TARGET),netware) EXEEXT=.nlm STATICLIBPREFIX= SHORTSUFFIX=nw +IMPORTLIBPREFIX=imp endif ifeq ($(OS_TARGET),netwlibc) EXEEXT=.nlm STATICLIBPREFIX= SHORTSUFFIX=nwl +IMPORTLIBPREFIX=imp endif ifeq ($(OS_TARGET),macos) BATCHEXT= EXEEXT= DEBUGSYMEXT=.xcoff SHORTSUFFIX=mac +IMPORTLIBPREFIX=imp endif ifeq ($(OS_TARGET),darwin) BATCHEXT=.sh @@ -1510,14 +1517,17 @@ STATICLIBEXT=.a1 SHAREDLIBEXT=.so1 STATICLIBPREFIX= SHORTSUFFIX=v1 +IMPORTLIBPREFIX= endif ifeq ($(OS_TARGET),go32v2) STATICLIBPREFIX= SHORTSUFFIX=dos +IMPORTLIBPREFIX= endif ifeq ($(OS_TARGET),watcom) STATICLIBPREFIX= SHORTSUFFIX=wat +IMPORTLIBPREFIX= endif ifeq ($(OS_TARGET),linux) BATCHEXT=.sh @@ -1564,6 +1574,7 @@ STATICLIBEXT=.ao2 SHAREDLIBEXT=.dll SHORTSUFFIX=os2 ECHO=echo +IMPORTLIBPREFIX= endif ifeq ($(OS_TARGET),amiga) EXEEXT= @@ -1624,6 +1635,7 @@ STATICLIBEXT=.a SHAREDLIBEXT=.nlm EXEEXT=.nlm SHORTSUFFIX=nw +IMPORTLIBPREFIX=imp endif ifeq ($(OS_TARGET),netwlibc) STATICLIBPREFIX= @@ -1635,6 +1647,7 @@ STATICLIBEXT=.a SHAREDLIBEXT=.nlm EXEEXT=.nlm SHORTSUFFIX=nwl +IMPORTLIBPREFIX=imp endif ifeq ($(OS_TARGET),macos) BATCHEXT= @@ -1646,6 +1659,7 @@ STATICLIBEXT=.a EXEEXT= DEBUGSYMEXT=.xcoff SHORTSUFFIX=mac +IMPORTLIBPREFIX=imp endif endif ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),) @@ -2442,6 +2456,7 @@ strings$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/strings.pp $(INC)/stringsi.inc\ $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\ $(SYSTEMUNIT)$(PPUEXT) objc1$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/objc1.pp +objcbase$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/objcbase.pp objc1$(PPUEXT) baseunix$(PPUEXT) : unixtype$(PPUEXT) sysctl$(PPUEXT) errno.inc ptypes.inc $(UNIXINC)/ctypes.inc \ signal.inc $(UNIXINC)/bunxh.inc \ $(BSDINC)/bunxsysc.inc \ diff --git a/rtl/darwin/Makefile.fpc b/rtl/darwin/Makefile.fpc index 825368a20a..2d59b5c757 100644 --- a/rtl/darwin/Makefile.fpc +++ b/rtl/darwin/Makefile.fpc @@ -16,7 +16,7 @@ units=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixut errors ipc terminfo termio video crt mouse keyboard console \ variants dateutils convutils stdconvs \ sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd \ - fpintres fpextres clocale objc1 + fpintres fpextres clocale objc1 objcbase implicitunits=exeinfo rsts=math varutils typinfo classes variants dateutils sysconst rtlconsts @@ -138,6 +138,8 @@ strings$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/strings.pp $(INC)/stringsi.inc\ objc1$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/objc1.pp +objcbase$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/objcbase.pp objc1$(PPUEXT) + # # System Dependent Units # diff --git a/rtl/inc/objc1.pp b/rtl/inc/objc1.pp index dc8de80e77..2b42acf0c9 100644 --- a/rtl/inc/objc1.pp +++ b/rtl/inc/objc1.pp @@ -29,6 +29,50 @@ const {$error Add support for the current target to the objc1 unit } {$endif} +type + { make all opaque types assignment-incompatible with other typed pointers by + declaring them as pointers to empty records + + WARNING: do NOT change the names, types or field names/types of these + types, as many are used internally by the compiler. + } + tobjc_class = record + end; + pobjc_class = ^tobjc_class; + + objc_object = record + _class: pobjc_class; + end; + id = ^objc_object; + + _fpc_objc_sel_type = record + end; + SEL = ^_fpc_objc_sel_type; + + IMP = function(target: id; msg: SEL): id; varargs; cdecl; + + objc_super = record + receiver: id; + _class: pobjc_class; + end; + pobjc_super = ^objc_super; + + _fpc_objc_protocol_type = record + end; + pobjc_protocal = ^_fpc_objc_protocol_type; + +{ sending messages } +function objc_msgSend(self: id; op: SEL): id; cdecl; varargs; external libname; +function objc_msgSendSuper(const super: pobjc_super; op: SEL): id; cdecl; varargs; external libname; +procedure objc_msgSend_stret(stret: Pointer; self: id; op: SEL); cdecl; varargs; external libname; +procedure objc_msgSendSuper_stret(stret: Pointer; const super: pobjc_super; op: SEL); cdecl; varargs; external libname; +{$ifdef cpui386} +function objc_msgSend_fpret (self: id; op: SEL): double; cdecl; varargs; external libname; +{$endif cpui386} + +function class_getSuperclass(cls: pobjc_class): pobjc_class; cdecl; external libname; + + implementation end. diff --git a/rtl/inc/objc1h.inc b/rtl/inc/objc1h.inc deleted file mode 100644 index ed9f31c401..0000000000 --- a/rtl/inc/objc1h.inc +++ /dev/null @@ -1,33 +0,0 @@ -{ - This file is part of the Free Pascal run time library. - Copyright (c) 2009 by the Free Pascal development team - - This unit contains Objective-C compatibility stuff. - - Additionally this file defines the interface of TObject, providing - their basic implementation in the corresponding objpas.inc file. - - WARNING: IF YOU CHANGE SOME OF THESE INTERNAL RECORDS, MAKE SURE - TO MODIFY THE COMPILER AND OBJPAS.INC ACCORDINGLY, OTHERWISE - THIS WILL LEAD TO CRASHES IN THE RESULTING COMPILER AND/OR RTL. - - IN PARTICULAR, THE IMPLEMENTATION PART OF THIS INCLUDE FILE, - OBJPAS.INC, USES SOME HARDCODED RECORD MEMBER OFFSETS. - - See the file COPYING.FPC, included in this distribution, - for details about the copyright. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - **********************************************************************} - -{***************************************************************************** - Basic Types/constants -*****************************************************************************} - - type - { make sel assignment-incompatible with other typed pointers } - _fpc_objc_sel_type = record end; - SEL = ^_fpc_objc_sel_type; diff --git a/rtl/inc/objcbase.pp b/rtl/inc/objcbase.pp new file mode 100644 index 0000000000..63c21f2578 --- /dev/null +++ b/rtl/inc/objcbase.pp @@ -0,0 +1,125 @@ +{ + This file is part of the Free Pascal run time library. + Copyright (c) 2009 by the Free Pascal development team + + This unit provides the definition of the NSObject root class + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} + +unit objcbase; + +{$ifdef FPC_HAS_FEATURE_OBJECTIVEC1} + +{$modeswitch objectivec1} + +interface + +uses + ctypes; + +type +{ + NSString = objcclass; external; + NSZone = objcclass; external; + NSInvocation = objcclass; external; + NSMethodSignature = objcclass; external; + NSCoder = objcclass; external; +} + + NSObject = objcclass + strict protected + isa: pobjc_class; + public + { NSObject protocol } + function isEqual_(obj: id): boolean; message 'isEqual:'; + function hash: cuint; message 'hash'; +// implemented as class method instead? +// function superclass: pobjc_class; + { "self" is both a hidden parameter to each method, and a method of + NSObject and thereby of each subclass as well + } + function self: id; message 'self'; + function zone: id; message 'zone';{ NSZone } + + function performSelector_(aSelector: SEL): id; message 'performSelector:'; + function performSelector_withObject_(aSelector: SEL; obj: id): id; message 'performSelector:withObject:'; + function performSelector_withObject_withObject(aSelector: SEL; obj1, obj2: id): id; message 'performSelector:withObject:withObject:'; + + function isProxy: boolean; message 'isProxy'; + + function isKindOfClass_(aClass: pobjc_class): boolean; message 'isKindOfClass:'; + function isMemberOfClass_(aClass: pobjc_class): boolean; message 'isMemberOfClass:'; +// implemented as class method instead? +// function conformsToProtocol(aProtocol: pobjc_protocal): boolean; + + function respondsToSelector_(aSelector: SEL): boolean; message 'respondsToSelector:'; + + function retain: id; message 'retain'; + procedure release; message 'release'; { oneway } + function autorelease: id; message 'autorelease'; + function retainCount: cint; message 'retainCount'; + +// implemented as class method instead? +// function description: NSString; + + { NSObject methods } + + class procedure load; message 'load'; + + class procedure initialize; message 'initialize'; + function init: id; message 'init'; + + class function new: id; message 'new'; + class function allocWithZone_(_zone: id {NSZone}): id; message 'allocWithZone:'; + class function alloc: id; message 'alloc'; + procedure dealloc; message 'dealloc'; + { if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 } + procedure finalize; message 'finalize'; + { endif } + + function copy: id; message 'copy'; + function mutableCopy: id; message 'mutableCopy'; + + class function copyWithZone_(_zone: id {NSZone}): id; message 'copyWithZone:'; + class function mutableCopyWithZone_(_zone: id {NSZone}): id; message 'mutableCopyWithZone:'; + + class function superclass: pobjc_class; message 'superclass'; + class function _class: pobjc_class; message 'class'; + class procedure poseAsClass_(aClass: pobjc_class); message 'poseAsClass:'; + class function instancesRespondToSelector_(aSelector: SEL): boolean; message 'instancesRespondToSelector:'; + class function conformsToProtocol_(aProtocol: pobjc_protocal): boolean; message 'conformsToProtocol:'; + function methodForSelector_(aSelector: SEL): IMP; message 'methodForSelector:'; + class function instanceMethodForSelector_(aSelector: SEL): IMP; message 'instanceMethodForSelector:'; + class function version: cint; message 'version'; + class procedure setVersion_(aVersion: cint); message 'setVersion:'; + procedure doesNotRecognizeSelector_(aSelector: SEL); message 'doesNotRecognizeSelector:'; + procedure forwardInvocation_(anInvocation: id {NSInvocation}); message 'forwardInvocation:'; + function methodSignatureForSelector_(aSelector: SEL): id {NSMethodSignature}; message 'methodSignatureForSelector:'; + + class function description: id {NSString}; message 'description'; + + function classForCoder: pobjc_class; message 'classForCoder'; + function replacementObjectForCoder_(aCoder: id {NSCoder}): id; message 'replacementObjectForCoder:'; + function awakeAfterUsingCoder_(aDecoder: id {NSCoder}): id; message 'awakeAfterUsingCoder:'; + end; external; + +implementation + +{$else } + +interface + +implementation + +{$endif} + +end. + + diff --git a/rtl/inc/systemh.inc b/rtl/inc/systemh.inc index 9b19ff1b52..bc9ba36968 100644 --- a/rtl/inc/systemh.inc +++ b/rtl/inc/systemh.inc @@ -1061,15 +1061,6 @@ const {$i objpash.inc} {$endif FPC_HAS_FEATURE_CLASSES} -{***************************************************************************** - Objective-C support -*****************************************************************************} - -{$ifdef FPC_HAS_FEATURE_OBJECTIVEC1} -{$i objc1h.inc} -{$endif FPC_HAS_FEATURE_OBJECTIVEC1} - - {***************************************************************************** Variant support *****************************************************************************} diff --git a/tests/test/tobjc1.pp b/tests/test/tobjc1.pp new file mode 100644 index 0000000000..4fb03810cb --- /dev/null +++ b/tests/test/tobjc1.pp @@ -0,0 +1,24 @@ +{$mode objfpc} +{$modeswitch objectivec1} + +uses + ctypes; + +var + a: NSObject; +begin + a:=NSObject(NSObject(NSObject.alloc).init); + if a.respondstoselector_(selector('isKindOfClass:')) then + writeln('ok string selector!') + else + halt(1); + if a.respondstoselector_(selector(NSObject.init)) then + writeln('ok method selector!') + else + halt(2); + + if (a.self<>id(a)) then + halt(3); + if (a.superclass<>nil) then + halt(4); +end.