Commit Graph

50185 Commits

Author SHA1 Message Date
maciej-izak
16a11c8b7a Bug fix for getting pointer to function result (mantis #10933 #19861)
git-svn-id: trunk@35495 -
2017-03-01 13:23:02 +00:00
Károly Balogh
07cfb2f43a m68k: removed unused 3 ops taicpu constructors
git-svn-id: trunk@35494 -
2017-02-28 22:10:59 +00:00
svenbarth
74386d444b * use correctly prefixed variant of tls_used (Win64 does not have a C prefix)
git-svn-id: trunk@35493 -
2017-02-28 20:39:36 +00:00
svenbarth
04443b0a94 * correctly create relocations for .pdata sections (fixes linking error with ld)
git-svn-id: trunk@35492 -
2017-02-28 19:46:15 +00:00
michael
0da38fd281 * Patch from Mattias Gaertner:
- local const: declare as local var in singleton parent function 
  - give procedure overloads in module unique names by appending $1, $2, ...
  - give nested procedure overloads unique names by appending $1, $2, ...
  - give reintroduced/overloaded class members unique names by appending $1, $2, ...
  - record operators = and <>
  - static arrays
    - range: enumtype
    - init as arr = rtl.arrayNewMultiDim([dim1,dim2,...],value)
    - init with expression from const array
    - length(1-dim array)
    - low(1-dim array), high(1-dim array)
  - property TargetProcessor
  - ECMAScript6:
    - use 0b for binary literals, and 0o for octal literals

git-svn-id: trunk@35491 -
2017-02-28 13:23:49 +00:00
michael
92af9c1670 * Patch from Mattias Gaertner, better descriptive comment
git-svn-id: trunk@35490 -
2017-02-28 13:22:40 +00:00
michael
b38d804193 * Patch from Mattias Gaertner:
- array[TEnumType]: declare, low, high, length, [], init with const
  - better memory checking
  - fixed mem leak in enumtype scope
  - check reintroduced identifiers
  - fixed class-of to always use forward
  - always use procedure header, instead of body
  - method modifier external

git-svn-id: trunk@35489 -
2017-02-28 13:21:55 +00:00
michael
dc1eb312ba * Patch from Mattias Gaertner: Memleak fixes in case of errors
git-svn-id: trunk@35488 -
2017-02-28 13:20:54 +00:00
michael
220a293aef * Small CamelCase correction from Mattias Gaertner
git-svn-id: trunk@35487 -
2017-02-28 13:20:00 +00:00
lacak
689fa805eb fcl-db: sqldb: when applying updates to modified record, look for parameter ":field_name" in InsertSQL,UpdateSQL,DeleteSQL first in TFields and if not found then in TParams. Bug #31411
git-svn-id: trunk@35486 -
2017-02-28 12:03:24 +00:00
maciej-izak
ffd6465563 * rtti.pp: Update IsManaged function for management operators. Record without managed fields but with management operators is treated as managed record. tests.rtti.pas update.
git-svn-id: trunk@35485 -
2017-02-28 10:18:05 +00:00
nickysn
2fbe5d2a8b * use ObjpasInt instead of longint in fpc_shortstr_currency (generates shorter
and more efficient code on 16 and 8-bit targets)

git-svn-id: trunk@35484 -
2017-02-27 01:29:52 +00:00
joost
3b723aa97f * Merged two versions of check if a package is broken
* If no repository is given, take all repositories into account while
   checking if a package is broken

git-svn-id: trunk@35483 -
2017-02-25 22:28:10 +00:00
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