Commit Graph

50195 Commits

Author SHA1 Message Date
michael
78e7f59982 * Patch from Mattias Gaertner
- external vars
    - untyped parameters
    - varargs
    - SetLength(s,len) is now converted to s.length=len
    - destructor now clears references
    - dynamic arrays now are never null.
      - anArr:=nil  becomes  anArr = []
      - anArr=nil becomes anArr.length==0
      - passing nil to an array parameter passes []
      - length(anArr) becomes anArr.length
      - High(anArr) becomes anArr.length-1
    - sets now uses references when assigning and passing to a parameter.
      Far less clone operations.

git-svn-id: trunk@35505 -
2017-03-01 17:41:16 +00:00
michael
0b42e226f8 * Patch from Mattias Gaertner:
- external vars
    - untyped parameters
    - varargs
    - SetLength(s,len) is now converted to s.length=len
    - destructor now clears references
    - dynamic arrays now are never null.
      - anArr:=nil  becomes  anArr = []
      - anArr=nil becomes anArr.length==0
      - passing nil to an array parameter passes []
      - length(anArr) becomes anArr.length
      - High(anArr) becomes anArr.length-1
    - sets now uses references when assigning and passing to a parameter.
      Far less clone operations.

git-svn-id: trunk@35504 -
2017-03-01 17:40:11 +00:00
michael
487d7ca141 * Patch from Mattias Gaertner:
pastree: changed TPasVariable.LibraryName and ExportName to TPasExpr. 
            It can be constants instead of string literals.
  pscanner: fixed parsing floats 1.2, 1.2E3, 1.E2, 1E2, 1.2E-3, 1E+2
  pparser:  var modifier external with optional lib and symbol
  pasresolver:
    - untyped parameter
    - added option proAllowPropertyAsVarParam allows to pass a property as a var/out argument
    - varargs

git-svn-id: trunk@35503 -
2017-03-01 17:39:05 +00:00
michael
2fbe76532f * Patch from Mattias Gaertner
- fixed writing UTF-8.
  - indent multi line literals, used by asm blocks
  - fixed writing (a+b).c

git-svn-id: trunk@35502 -
2017-03-01 17:36:35 +00:00
Károly Balogh
14ba99ea09 netbsd: bits of the m68k support I started to hack together. non functional yet.
git-svn-id: trunk@35501 -
2017-03-01 17:26:23 +00:00
Károly Balogh
e8cad013f4 ppudump: fix build after r35497
git-svn-id: trunk@35500 -
2017-03-01 15:41:37 +00:00
Károly Balogh
bfd95d6bef fix build with generic_cpu defined after r35497
git-svn-id: trunk@35499 -
2017-03-01 15:32:12 +00:00
pierre
315adde6ef Avoid GNU tar warning about lone zero block
git-svn-id: trunk@35498 -
2017-03-01 15:23:55 +00:00
Károly Balogh
319a397ae8 webassembly: reserve a system id and cpu id slot for the platform
git-svn-id: trunk@35497 -
2017-03-01 15:15:58 +00:00
Károly Balogh
d3f69c1753 atari: tos is no longer a define, so use atari to define shortasmprefix
git-svn-id: trunk@35496 -
2017-03-01 15:14:46 +00:00
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