Commit Graph

50172 Commits

Author SHA1 Message Date
joost
10dfda977c * Moved global procedure to metod of TpkgFPpkg
git-svn-id: trunk@35482 -
2017-02-25 20:46:42 +00:00
nickysn
f353416fd4 * fixed a bug in graph.OutText and graph.OutTextXY when the unit has
been compiled with range checking on

git-svn-id: trunk@35481 -
2017-02-25 17:30:15 +00:00
florian
ec45a92fb5 * more nodedata printing fixes, similiar to r35477
git-svn-id: trunk@35480 -
2017-02-25 15:41:39 +00:00
Jonas Maebe
4c68ea1000 * use pocalls_cdecl and cstylearrayofconst more consistently instead of
ad hoc set constants containing varying number cdecl-like calling
    conventions
   o added pocall_sysv_abi_cdecl and pocall_ms_abi_cdecl to cstylearrayofconst
   o also allow C-style blocks with mwpascal instead of cdecl (mwpascal = cdecl
     with "const" = "constref" for record parameters)
   o did not touch cases related to name mangling and import/export names,
     because those are a real mess and easily break things left and right :/

git-svn-id: trunk@35479 -
2017-02-25 11:46:35 +00:00
Jonas Maebe
1adde89621 * copy tcallnode.right after copying the callinitblock, as right can be a
temprefnode referring to a temp from the init block (mantis #31421)

git-svn-id: trunk@35478 -
2017-02-24 19:57:40 +00:00
Jonas Maebe
b5fb9beec9 * fixed printing of nodedata to the screen
git-svn-id: trunk@35477 -
2017-02-24 19:57:36 +00:00
pierre
7031c1c1e5 Do not use a set with CP_NONE, whose value is
git-svn-id: trunk@35476 -
2017-02-24 15:25:11 +00:00
florian
81c5d63d4e * do not generate var paras for void* if -w is used, resolves #31425
git-svn-id: trunk@35475 -
2017-02-23 22:03:46 +00:00
michael
cc81abdd83 * Patch from Michal Gawrycki to implement streaming interface properties (IComponent) Bug ID
git-svn-id: trunk@35474 -
2017-02-22 21:14:35 +00:00
florian
b9dba41ad0 * intel assembler reader: scale factor in references can also be a constant symbol, resolves #31165
git-svn-id: trunk@35473 -
2017-02-22 20:59:52 +00:00
michael
2d36af85bb * Patch from Mattias Gaertner with various improvements:
+ changed varname/funcname properties to string, saving many conversion
  + array of record
  + pass by reference
    - pass local var to a var/out parameter
    - pass variable to a var/out parameter
    - pass reference to a var/out parameter
    - pass array element to a var/out parameter
  + proc types
    - implemented as immutable wrapper function
    - assign := nil, proctype (not clone), @function, @method
    - call  explicit and implicit
    - compare equal and notequal with nil, proctype, address, function
    - assigned(proctype)
    - pass as argument
    - methods
    - mode delphi: proctype:=proc
    - mode delphi: functype=funcresulttype
  + class-of
    - assign :=   nil, var
    - call class method
    - call constructor
    - operators =, <>
    - class var, property, method
    - Self in class method
    - typecast

git-svn-id: trunk@35472 -
2017-02-22 20:59:23 +00:00
michael
f022fdc848 * Patch from Mattias Gaertner:
- moved function IsValidJSIdentifier, also needed for code not writing js

git-svn-id: trunk@35471 -
2017-02-22 20:57:54 +00:00
michael
301e6a8b06 * Patch from Mattias gaertner:
- type cast class-of
  - type cast Self in class method
  - bark on statement without call, e.g. "i;"
  - mode delphi procedure types
  - give each message an unique id

git-svn-id: trunk@35470 -
2017-02-22 20:56:56 +00:00
michael
8def379f49 * Patch from Mattias Gaertner: fixed creating binary element for "as" operator
git-svn-id: trunk@35469 -
2017-02-22 20:56:11 +00:00
michael
b456092739 * Patch from Mattias Gaertner: fixed TStreamResolver.FindStreamReader getting a stream twice
git-svn-id: trunk@35468 -
2017-02-22 20:55:22 +00:00
michael
7ff70cbe6e * Fix bug ID #22107
git-svn-id: trunk@35467 -
2017-02-22 19:50:55 +00:00
marco
ef26fbd83d * attributes longword, mantis #30800
git-svn-id: trunk@35466 -
2017-02-22 16:52:46 +00:00
lacak
0c06318dda fcl-db: fpmake: build oracleconnection also for Win64 target. Bug#31430
git-svn-id: trunk@35465 -
2017-02-22 14:03:42 +00:00
pierre
40b76f686c Add -CTsmalltoc option for powerpc64-aix compiled IDE
git-svn-id: trunk@35464 -
2017-02-21 16:46:20 +00:00
maciej-izak
533c89e128 * New test for management operators to detect regressions like regression fixed in r35461 (many times initialized global variables)
git-svn-id: trunk@35463 -
2017-02-21 14:20:15 +00:00
Jonas Maebe
b86f2d7e3c * only initialize global regvars in unit and main program init code
(bug in r35461)

git-svn-id: trunk@35462 -
2017-02-21 07:37:15 +00:00
Jonas Maebe
cadf177a93 * fixed bugs in r33737: that revision was supposed to only move
code from one unit to another, but in splitting some methods
    I made a couple of mistakes :/ (causing global variables to be
    initialised three times)

git-svn-id: trunk@35461 -
2017-02-20 22:15:34 +00:00
florian
a80fcb74d8 * make test working for architectures with no float and ansistring support
git-svn-id: trunk@35460 -
2017-02-19 22:29:52 +00:00
Jonas Maebe
1c985f0a43 * fixed bzip2 units for big endian targets (not optimal, but simplest fix)
git-svn-id: trunk@35459 -
2017-02-19 22:27:49 +00:00
Jonas Maebe
1b42affa8f * optimized PowerPC version of changes in r35454
git-svn-id: trunk@35458 -
2017-02-19 20:27:39 +00:00
florian
99a0c2464d * version update
git-svn-id: trunk@35457 -
2017-02-19 19:15:19 +00:00
florian
e7fd71db36 + write name of segment/group which is too large
git-svn-id: trunk@35456 -
2017-02-19 19:15:18 +00:00
florian
c4fe4ab1f5 * correctly handle push <imm> on 80186+
git-svn-id: trunk@35455 -
2017-02-19 19:15:16 +00:00
florian
7213a13081 * split fpc_mul_<64 bit> into separate procedures with and without overflow checking
git-svn-id: trunk@35454 -
2017-02-19 19:15:14 +00:00
maciej-izak
3900ccf260 * Rename RecordOp to ManagementOp (more relevant name)
git-svn-id: trunk@35453 -
2017-02-19 18:06:54 +00:00
maciej-izak
92c0e57c59 * Test suite for management operators. We have management operators on trunk! Enjoy ^^
git-svn-id: trunk@35452 -
2017-02-19 14:34:09 +00:00
maciej-izak
4154b4ca8a * Call management operators also for records with zero-size. For that purpose was changed function RTTISize. New name for RTTISize is RTTISizeAndOp. RTTISizeAndOp can return size of required type and information about existing management operators for that type in current context (to determine context is used enum TRTTIRecOpType which is passed also as parameter in RTTISizeAndOp). RTTISizeAndOp is used in fpc_initialize_array, fpc_finalize_array, fpc_addref_array and CopyArray.
git-svn-id: trunk@35451 -
2017-02-19 13:20:43 +00:00
maciej-izak
0cff9fe83c * Call management operator (Initialize) for records when SetLength for dynamic arrays is used.
git-svn-id: trunk@35450 -
2017-02-19 12:47:31 +00:00
maciej-izak
5a7d4eb25f * Call management initialize operator for records inside classes (record with management operators as field) (rtl/inc/objpas.inc, TObject.InitInstance)
git-svn-id: trunk@35449 -
2017-02-19 12:17:20 +00:00
maciej-izak
9a9eb1b840 * Use RTTIRecordRttiInfoToInitInfo (when FPC_HAS_MANAGEMENT_OPERATORS is not defined) for records/objects in fpc_Copy as well as for fpc_Initialize, fpc_finalize, fpc_Addref
git-svn-id: trunk@35448 -
2017-02-19 11:53:52 +00:00
maciej-izak
8a68a7aea8 * Declare field RecordOp for TRecordInfoInit only when FPC_HAS_MANAGEMENT_OPERATORS is defined, same for additional types for management operators.
git-svn-id: trunk@35447 -
2017-02-19 01:26:08 +00:00
maciej-izak
d42428bc3c * Initial support for management operators in RTL (rtl/inc/rtti.inc):
* fpc_Initialize: Initialize operator is called after recordrtti(data,typeinfo,@int_initialize);
  * fpc_Finalize: Finalize operator is called before recordrtti(data,typeinfo,@int_finalize);
  * fpc_Addref: AddRef operator is called after recordrtti(data,typeinfo,@int_addref);
  * fpc_Copy: Copy operator (if exists) is called instead of default copy behavior
  * replace RTTIRecordRttiInfoToInitInfo function (which was introduced only to speed-up InitializeArray/FinalizeArray) with a more advanced RTTIRecordOp function. Result of RTTIRecordRttiInfoToInitInfo is now returned in initrtti parameter. Additionally as new result is returned PRecordInfoInit which is usefully in basic RTL functions: fpc_Initialize, fpc_Finalize, fpc_Addref, fpc_Copy

git-svn-id: trunk@35446 -
2017-02-19 01:18:35 +00:00
maciej-izak
af8e0efe57 * Rtti info about Management Operators (MO) in init table for records. Note: commit contains minimal changes for RTL (for proper "make") no functional changes. More RTL changes for fully functionally MO in next commits.
compiler/ncgrtti.pas
  + write_record_operators procedure which fills simple VMT like table for MO.
  * recorddef_rtti save MO (if exists)
  * objectdef_rtti_fields save nil pointer/entry for objects rtti (have same RTL parts like for records)

compiler/options.pas
  + new define FPC_HAS_MANAGEMENT_OPERATORS

compiler/symconst.pas
  + new item itp_init_record_operators for tinternaltypeprefix enum
  + new entry '$init_record_operators$' in internaltypeprefixName

rtl/inc/rtti.inc
  + new field RecordOp (pointer to MO VMT table) in TRecordInfoInit
  + new types to handle MO VMT: TRTTIRecordOpVMT, PRTTIRecordOpVMT, TRTTIRecCopyOp, TRTTIRecVarOp

rtl/objpas/typinfo.pp
  + RecordOp field for TRecInitData record

git-svn-id: trunk@35445 -
2017-02-19 00:22:59 +00:00
maciej-izak
25db29d0a6 * symtable.pas:
+ search_management_operator function to find Tprocdef for selected management operator in record definition

tokens.pas:
  + new constants: first_managment_operator and last_managment_operator used in search_management_operator

git-svn-id: trunk@35444 -
2017-02-18 19:27:53 +00:00
maciej-izak
9441fb3968 * ngenutil.pas, tnodeutils.sym_maybe_initialize: Ensure that management operator (Initialize) is used also for local variables.
git-svn-id: trunk@35443 -
2017-02-18 19:19:46 +00:00
maciej-izak
520bb31fa6 * Parse management operators. Each management operator is special kind of operator without result.
git-svn-id: trunk@35442 -
2017-02-18 19:12:48 +00:00
maciej-izak
168e59837a * New function token2managementoperator for conversion: ttoken to tmanagementoperator
git-svn-id: trunk@35441 -
2017-02-18 18:58:32 +00:00
maciej-izak
b912deae33 * each record with managed field or with any management operator needs init table (update for symdef.pas, trecorddef.needs_inittable)
git-svn-id: trunk@35440 -
2017-02-18 18:50:57 +00:00
maciej-izak
15ba9b54c6 Store informations about management operators in ppu files for records.
ppu.pas:
  * increase ppu version

symconst.pas:
  + new enum tmanagementoperator and set tmanagementoperators

symtable.pas, trecordsymtable:
  + new field managementoperators
  + new method includemanagementoperator

symdef.pas, trecorddef.ppuload and trecorddef.ppuwrite:
  * save/load for managementoperators

git-svn-id: trunk@35439 -
2017-02-18 18:43:25 +00:00
maciej-izak
48b149acd4 New tokens for new management operators: Initialize, Finalize, AddRef and Copy. Small code adjustment for parser (pdecobj.pas, pstatmnt.pas, psub.pas, ptype.pas) was required because few of old token has from now value which is outside range of set: _CONSTRUCTOR, _FINALIZATION.
New tokens for operators:
  * _OP_INITIALIZE, _OP_FINALIZE, _OP_ADDREF, _OP_COPY

New tokens:
  * _INITIALIZE, _FINALIZE, _ADDREF, _COPY

git-svn-id: trunk@35438 -
2017-02-18 18:12:45 +00:00
pierre
3f8f7bc04a Regenerate Makefile after: Add explicit rule for uuchar unit
git-svn-id: trunk@35437 -
2017-02-16 18:24:33 +00:00
pierre
31d9be0c9d Add explicit rule for uuchar unit
git-svn-id: trunk@35436 -
2017-02-16 18:24:14 +00:00
michael
00450470e2 * Make port not stored, since it is in params already
git-svn-id: trunk@35435 -
2017-02-14 21:17:38 +00:00
Tomas Hajny
12dddfb6c8 * fix base path handling - ensure using full path in the cfg files and avoid double slashes
git-svn-id: trunk@35433 -
2017-02-13 00:03:15 +00:00
florian
3d6d5145bf * fix handling of const string symbols in preprocessor expressions
+ accept string constants in preprocessor expressions, resolves #31246

git-svn-id: trunk@35432 -
2017-02-12 17:29:45 +00:00