Commit Graph

47674 Commits

Author SHA1 Message Date
Jonas Maebe
fad7c8f151 * fixed indexing dynamic arrays and strings with a constant index (the index
was ignored in this case)

git-svn-id: trunk@32741 -
2015-12-26 20:01:32 +00:00
Jonas Maebe
31bd38c45b * only add the procdef's parentfpinitblock if there are any statements in it
* internalerror if we try to add a non-empty parentfpinitblock to a
    pure assembler routine

git-svn-id: trunk@32740 -
2015-12-26 20:01:25 +00:00
Jonas Maebe
5a8c151a72 * don't create the nestedvars struct for pure assembler routines, as
those will never call a nested routine using Pascal-level support
    for accessing local variables (even if the nestedvars stayed empty,
    this caused a stack frame to be allocated because a temp of 0
    bytes is rounded up to 4 bytes)

git-svn-id: trunk@32739 -
2015-12-26 20:01:14 +00:00
Jonas Maebe
aef6120438 * fixed shortstring constant emission after r28210: the terminating #0
was no longer included, so things went wrong if the string was reused
    for a pchar

git-svn-id: trunk@32738 -
2015-12-26 20:01:06 +00:00
Jonas Maebe
ea1e368328 + added div-by-zero and overflow checking support for mod/div
git-svn-id: trunk@32737 -
2015-12-26 20:00:57 +00:00
Jonas Maebe
4939c9a7b9 * implemented overflow checking for llvm
git-svn-id: trunk@32736 -
2015-12-26 20:00:44 +00:00
Jonas Maebe
9258b5d76b + non-functional 128 bit integer types (inaccessible from Pascal), for use
in the LLVM high level code generator to implement overflow checking

git-svn-id: trunk@32735 -
2015-12-26 20:00:33 +00:00
Jonas Maebe
cd5db0d186 * register the types for the cgparas instead of for the parameters of
procvardefs, as it's those types that we use in the LLVM IR

git-svn-id: trunk@32734 -
2015-12-26 20:00:18 +00:00
yury
f838251662 * pas2jni: Added TDateTime Java support class.
git-svn-id: trunk@32733 -
2015-12-26 19:52:03 +00:00
joost
51a216f5ca * PackageLocalArchive should always return a filename, to avoid hanlding directories as being archives
git-svn-id: trunk@32732 -
2015-12-26 17:30:54 +00:00
michael
ed2d21fd97 * Fix for bug ID #29144
git-svn-id: trunk@32731 -
2015-12-26 17:16:31 +00:00
michael
42804c935f * Declare TStringSplitOptions with scopedenum (bug ID 29032)
git-svn-id: trunk@32730 -
2015-12-26 16:16:02 +00:00
michael
5ab123883a * Make sure formatting settings are not used when passing datetime values
git-svn-id: trunk@32729 -
2015-12-26 16:08:14 +00:00
michael
143acd2497 * Patch from Mattias Gaertner to check for name when adding elements
git-svn-id: trunk@32728 -
2015-12-26 16:01:43 +00:00
michael
891aaa9732 * Fix bug ID #28737
git-svn-id: trunk@32727 -
2015-12-26 15:15:34 +00:00
michael
d392f7043f * Patch from Mark Morgan LLoyd to enable compilation for Solaris (bug ID 29223)
git-svn-id: trunk@32726 -
2015-12-26 15:04:37 +00:00
michael
e13c95443f * Create setters with const in front of value argument
git-svn-id: trunk@32725 -
2015-12-26 13:55:06 +00:00
michael
a756a2afac * Patch from Dmitriy A. Voroshin to handle clsoed named pipe more gracefully. (bug ID 29203)
git-svn-id: trunk@32724 -
2015-12-26 13:43:20 +00:00
michael
464e40bfd9 * Applies patch from Laco (bug ID 29113)
git-svn-id: trunk@32723 -
2015-12-26 11:27:13 +00:00
michael
dcefe41fe3 * Applied patch from Manfred Hahn to fic bcdSubtract (bug ID 29207)
git-svn-id: trunk@32722 -
2015-12-26 11:23:44 +00:00
florian
a7f1ce2e98 * patch by Dmitry Boyarintsev: initialize dyn. arrays more cleverly in a setlength call with ref. count>1, resolves issue #29250
git-svn-id: trunk@32721 -
2015-12-26 08:53:56 +00:00
florian
1857fd513e * osuinttype and ossinttype must match OS_INT and OS_UINT on avr as well
git-svn-id: trunk@32720 -
2015-12-26 08:38:53 +00:00
Jonas Maebe
99aaec5431 * handle typed constant definitions of variant records using different fields
than the one we use to construct the LLVM equivalent (which doesn't support
    variants), or in case the complete record is not defined in the source and
    has to be padded with zeroes
   o we do this by creating a new recorddef in this case with as elements the
     defs of the actually emitted constant data, and replacing the original
     def with this new def; note that this can also replace arrays in case of,
     e.g., an array of a variant record type
   o the pass in llvmtype takes care of inserting type conversions (bitcasts)
     when these constants are accessed using the original def

git-svn-id: trunk@32719 -
2015-12-25 21:05:45 +00:00
Jonas Maebe
926e62c886 + tai_aggregatetypedconst.changetorecord() to change the type of an
aggregate to a (new) recorddef
   o the size of the original type and that of the record must match
   o will be used by the LLVM generator in case of a variant record, or
     an array of variant records with constant data that does not match
     our canonical LLVM definition

git-svn-id: trunk@32718 -
2015-12-25 21:05:40 +00:00
Jonas Maebe
00c777e51a * add padding byte fields all as unsigned, as that is also how we
generate them in aasmcnst

git-svn-id: trunk@32717 -
2015-12-25 21:05:36 +00:00
Jonas Maebe
abcf441c00 * moved tllvmshadowsymtable items default property from private to public
section (although the compiler doesn't seem to care about it)

git-svn-id: trunk@32716 -
2015-12-25 21:05:31 +00:00
Jonas Maebe
f83f9168ee * emit all resource strings and internal dynamic string data using the
def representing that string type, instead of using p(wide)char
   o these string types are represented the same in llvm as p(wide)char,
     but this way we can check whether the emitted data type matches the
     expected one in the future

git-svn-id: trunk@32715 -
2015-12-25 21:05:26 +00:00
Jonas Maebe
787caf4dda * treat records with {$packrecords c} the same as other records for LLVM
o while in principle LLVM can layout those the same as we do, this would
     require special treatment in case some fields are not initialised in
     a typed record declaration (because then we have to emit padding only
     for the skipped fields, and not for any padding between them)
   o exception: records we create to represent parameters, as those have to
     match the ABI definitions exactly for them to be treated as expected

git-svn-id: trunk@32714 -
2015-12-25 21:05:22 +00:00
Jonas Maebe
f57a94b5aa * explicitly name the fields we add in llvmgettemprecorddef()
* use those field names when loading their addresses in
    thlcgllvm.a_load_ref_cgpara()/gen_load_cgpara_loc(), instead of
    assuming the field indices in the llvm representation of those
    records matches the parameter location order (it currently does
    because we let llvm lay out C-packed records, but that will
    change)

git-svn-id: trunk@32713 -
2015-12-25 21:05:17 +00:00
Jonas Maebe
5774238887 * always keep track of the field about to be emitted in curfield, as we
will need this for LLVM to determine whether the emitted data completely
    matches the definition (if not, we have to create a def for the actual
    data)
  - removed no longer used fieldoffsets property

git-svn-id: trunk@32712 -
2015-12-25 21:05:12 +00:00
Károly Balogh
c7ea73dccf morphunits: removed things which belong to internal input.device API accidentally exposed in the public headers
git-svn-id: trunk@32711 -
2015-12-25 20:47:38 +00:00
Károly Balogh
6bbc078ef8 morphunits: added input.device and keyboard.device interfaces, based on fpc-triforce
git-svn-id: trunk@32710 -
2015-12-24 19:19:32 +00:00
Károly Balogh
336e054bb0 morphunits: renamed WriteStr macro to dosWriteStr, to avoid clash with WriteStr in system unit
git-svn-id: trunk@32709 -
2015-12-24 17:43:18 +00:00
Károly Balogh
1f88db0bd3 morphunits: removed KVM unit, which was never meant for public use, and it's no longer used internally in the keyboard/video/mouse units.
git-svn-id: trunk@32708 -
2015-12-24 17:29:17 +00:00
Jonas Maebe
8f645fdc83 * removed hack to disable dircache for DragonFly BSD now that its dirent
handling has been fixed

git-svn-id: trunk@32707 -
2015-12-24 10:54:53 +00:00
Jonas Maebe
f8f03ac4ad * fixed dirent handling for DragonFly BSD (patch by John Marino,
mantis #29228)

git-svn-id: trunk@32706 -
2015-12-24 10:54:47 +00:00
Károly Balogh
d866e0be32 amunits: fixed error to be PLongInt instead of PCxObj in CxBroker. Shouldn't make a big actual difference, but for the sake of correctness...
git-svn-id: trunk@32705 -
2015-12-24 08:02:37 +00:00
Károly Balogh
21352ca934 amunits: actually, the DoMethodA() fix by Marcus added in r32699 is correct, and the old version was wrong. so remove remark about TODO, and leftovers of the old code.
git-svn-id: trunk@32704 -
2015-12-24 06:12:32 +00:00
Károly Balogh
c10272d879 amunits, arosunits, morphunits: don't pass the calculated object address through a local var in OCLASS, it's not needed really. also allow inlining of the macros. this results in better code generated
git-svn-id: trunk@32703 -
2015-12-24 05:54:03 +00:00
Károly Balogh
5d7b08d28f amunits: fixed CreateCxObj argument locations in commodities
git-svn-id: trunk@32702 -
2015-12-24 05:00:08 +00:00
Károly Balogh
bafefd52f6 morphunits: amigalib rework
* use Pascal implementations instead of assembler for DoMethodA, DoSuperMethodA and DISPATCHERARG
* the above fixed trasing of register r31 in DoMethodA and DoSuperMethodA
* these implementations might not be that optimal, but easier to understand and more maintainable on the long run
* depends on the newly added EmulHandle stuff in exec
* use const arguments for array of ... stuff where possible

git-svn-id: trunk@32701 -
2015-12-23 04:14:49 +00:00
Károly Balogh
d196f8f341 morphunits: added some of the EmulHandle magic for exec unit, which will be required for some upcoming amigalib cleanup
git-svn-id: trunk@32700 -
2015-12-23 03:42:53 +00:00
marcus
26e19330f5 Amiga: DoMethodA repaired (crashed always)
git-svn-id: trunk@32699 -
2015-12-22 20:27:53 +00:00
marcus
fe87417345 Amiga: Added DoMethod varargs version
git-svn-id: trunk@32698 -
2015-12-22 18:55:14 +00:00
nickysn
55a38bf895 * increased the default dosbox timeout to 60 seconds
git-svn-id: trunk@32697 -
2015-12-22 10:01:13 +00:00
nickysn
61d76e837f + support specifying the dosbox timeout (the maximal amount of time a test is
allowed to run, before dosbox is killed) via the DOSBOX_TIMEOUT environment
  variable

git-svn-id: trunk@32696 -
2015-12-22 00:05:39 +00:00
Károly Balogh
ddc387891b amunits: removed pastoc dependency from workbench unit. this was the last unit which depend on pastoc in coreunits
git-svn-id: trunk@32695 -
2015-12-21 22:37:47 +00:00
Károly Balogh
49e4ea153a amunits: removed pastoc dependency from icon unit. also removed two BumpRevision() overlays which were simply broken since day 1. (newname is an output buffer the caller must allocate, not an input parameter)
git-svn-id: trunk@32694 -
2015-12-21 22:34:13 +00:00
Károly Balogh
61e60bd46f amunits: syscallified reqtools, and zapped dependency on pastoc unit
git-svn-id: trunk@32693 -
2015-12-21 21:56:13 +00:00
Tomas Hajny
b48b758a23 * fix for bug #29158 - added definition of REMOTE_NAME_INFOW (and REMOTE_NAME_INFOA), the W version used in ExpandUNCFileName now
git-svn-id: trunk@32692 -
2015-12-21 02:05:13 +00:00