lacak
fed009e998
fcl-db: base: fix streaming of NULL values in FPCBinaryDatapacketReader (like in Delphi null bitmap is stored in the beginning of record and null values are not stored in row data) + tests
...
git-svn-id: trunk@25524 -
2013-09-20 05:56:27 +00:00
sergei
d25330e367
* Removed tasmdata.realname (it is not used anywhere) and changed tasmdata.name to pshortstring. The name string is owned by tmodule and referenced by tasmdata. This removes 80-char limit on tasmdata.name, Mantis #25009 .
...
git-svn-id: trunk@25523 -
2013-09-19 10:06:43 +00:00
michael
a814e0eb27
* Correction in connection pooling, we were leaking connections
...
git-svn-id: trunk@25522 -
2013-09-19 06:56:53 +00:00
Károly Balogh
81b6e1b9d9
fixed OpenGL to build for MorphOS and hopefully did not break anything in the process
...
git-svn-id: trunk@25521 -
2013-09-18 21:45:17 +00:00
sergei
7fbcf64608
* Disabled r25488 for ARM targets since it causes crashes there, Mantis #25050 .
...
git-svn-id: trunk@25520 -
2013-09-18 18:55:24 +00:00
svenbarth
9d48bc0baf
Implement cross unit type overloading of generics. This fixes the regression introduced with revision 25498.
...
symtable.pas:
+ add new tsymbol_search_flag type which can be passed to various searchsym* routines
+ add support to not call "addsymref"
+ add new searchsym_with_flags function that calls searchsym_maybe_with_symoption
* adjust searchsym_maybe_with_symoption, searchsym_in_class & searchsym_in_helper to use new flag type instead of Boolean arguments
* adjust searchsym & searchsym_with_symoption which call the modified functions
nutils.pas, handle_staticfield_access:
* adjust searchsym_in_class call
pexpr.pas, handle_factor_typenode, postfixoperators, factor:
* adjust searchsym_in_helper and searchsym_in_class calls
pinline.pas, new_function:
* adjust searchsym_in_class call
scanner.pas, try_consume_nestedsym:
* adjust searchsym_in_class call
fmodule.pas, tmodule:
+ add genericdummysyms field which is a TFPHashObjectList that contains TFPObjectList instances per generic dummy that in turn contains tgenericdummysyms instances
pgenutil.pas:
+ add function split_generic_name to split a generic name into non-generic name and count value of type parameters
+ add function resolve_generic_dummysym which tries to use the new genericdummysyms field to find the real symbol of a dummy sym
* generate_specialization: adjust searchsym_in_class call
* specialization_init/specialization_done: save/restore genericdummysyms of module
symdef.pas, tdefawaresymtablestack:
+ add new intermediate method pushcommon which is used by both push and pushafter
+ add new intermediate method remove_helpers_and_generics (which calls remove_generics and remove_helpers if necessary)
* rename removehelpers to remove_helpers
* rename addhelpers to add_helpers_and_generics and extend it to correctly fill current_module.genericdummysyms
* call remove_helpers_and_generics from pop instead of remove_helpers
ptype.pas, single_type, read_named_type.expr_type, read_named_type:
* try to resolve symbols with sp_generic_dummy with resolve_generic_dummysym
+ added test
git-svn-id: trunk@25519 -
2013-09-18 14:28:46 +00:00
paul
2fa739f729
compiler: remove unneeded push/pop to symtablestack
...
git-svn-id: trunk@25518 -
2013-09-18 05:24:19 +00:00
nickysn
6aae88578c
+ getting the address of a label now returns a far pointer in i8086 far code memory models; this fixes the call to fpc_raiseexception in the raise node
...
git-svn-id: trunk@25517 -
2013-09-17 22:45:13 +00:00
nickysn
fccbbd92b2
* Classes unit functions related to exceptions and stacktraces updated to use CodePointer
...
git-svn-id: trunk@25516 -
2013-09-17 22:13:31 +00:00
nickysn
5e09b7a56f
* SysUtils functions related to exceptions and stacktraces updated to use CodePointer
...
git-svn-id: trunk@25515 -
2013-09-17 21:58:53 +00:00
nickysn
5973b231ec
* traisenode.pass_typecheck: in the case of 'raise X at addr,frame' require 'addr' to be a far pointer in i8086 far code memory models
...
git-svn-id: trunk@25514 -
2013-09-17 21:31:30 +00:00
nickysn
c1b0fb81f1
* updated all the RTL helper functions related to exceptions and stack traces to use codepointer instead of pointer
...
git-svn-id: trunk@25513 -
2013-09-17 21:25:26 +00:00
nickysn
b688b79a0d
* fixed the order of parameters in the first call to get_caller_frame in PushExceptObject
...
git-svn-id: trunk@25512 -
2013-09-17 21:20:24 +00:00
svenbarth
fbceb574eb
Fix for Mantis #25041 . Correctly set CurrentThreadVar for those tthread.inc incarnations that don't use the default ThreadProc in classes.inc (this should be changed in the future though...). In addition to Unix systems as described by the bug report this also involved BeOS and Netware LibC.
...
+ added test
git-svn-id: trunk@25511 -
2013-09-17 18:02:12 +00:00
svenbarth
900afaddea
This test was clearly intended differently...
...
tests/webtbs/tw10477.pp:
+ add { %NORUN } (only tests compilation)
* change use of unit "uthlp" to "uw10477"
git-svn-id: trunk@25510 -
2013-09-17 17:50:09 +00:00
svenbarth
2da06b004e
Added test for Mantis #24458 which was fixed in revision 24628.
...
git-svn-id: trunk@25509 -
2013-09-17 14:20:23 +00:00
lacak
baa700925c
fcl-db: bufdataset: make TFpcBinaryDatapacketReader more flexible hence descendant can override version preset in constructor and write in old format.
...
git-svn-id: trunk@25508 -
2013-09-17 12:43:45 +00:00
nickysn
129fddf800
* fixed compilation of unit crt on linux
...
git-svn-id: trunk@25507 -
2013-09-17 11:25:47 +00:00
nickysn
96c7a9325a
* CrtOpen, CrtClose, CrtRead, CrtWrite and CrtReturn changed to procedures, instead of functions
...
git-svn-id: trunk@25506 -
2013-09-17 11:17:29 +00:00
paul
5aa919c2a8
compiler: have unit interface symtable in stack while parsing implementation uses list (fixes issue #10477 )
...
git-svn-id: trunk@25505 -
2013-09-17 08:53:37 +00:00
nickysn
4d369654e0
* fixed test cg/taddr2.pp for i8086 medium memory model
...
git-svn-id: trunk@25504 -
2013-09-17 01:06:06 +00:00
nickysn
8608969eb8
* tx86casenode.genjumptable: explicitly emit near pointers in the case jump table on i8086, regardless of the memory model
...
git-svn-id: trunk@25503 -
2013-09-16 19:58:45 +00:00
nickysn
3bc89a50ed
+ added i8086-specific methods tai_const.Create_sym_near and tai_const.Create_sym_far, which allow creating explicitly a near or far ptr const, regardless of current memory model's defaults
...
git-svn-id: trunk@25502 -
2013-09-16 19:56:49 +00:00
nickysn
5b9341df76
* fixed compilation of unit keyboard in i8086 medium memory model
...
git-svn-id: trunk@25501 -
2013-09-16 16:33:54 +00:00
nickysn
a5284881f5
+ support 6-byte records in registers in thlcgcpu.location_force_mem on the i8086; this fixes the handling of methodpointers typecasted to record (TMethod) in medium and compact memory models
...
git-svn-id: trunk@25500 -
2013-09-16 16:24:00 +00:00
sergei
dac8cbcefc
* Handle assigned(x) expressions entirely in first pass by converting them to "x<>nil", indicate that procedure variables should not be called by setting nf_load_procvar flag (which is already used with typeconvnode for exactly the same purpose). This allows to generate better code when assigned(x) is used on right side of assigments. Mantis #24572 .
...
git-svn-id: trunk@25499 -
2013-09-16 14:38:38 +00:00
svenbarth
4ea89d01ea
Somewhat a fix for Mantis #25025 : added generic variants of the TEnumerable/TEnumerator interfaces. Added to unit ObjPas, because mode ObjFPC does not allow overloading of types with generics (which would be the case in unit System). Also the two interfaces are not completely Delphi compatible on purpose! In Delphi they inherit from corresponding non generic interfaces, but this leads in FPC as well as in Delphi to problems.
...
rtl/objpas/objpas.pp:
+ add generic interfaces IEnumerator<T> and IEnumerable<T> which are equivalent to TEnumerator and TEnumerable
git-svn-id: trunk@25498 -
2013-09-16 10:15:19 +00:00
paul
0d8ad2a932
compiler: don't treat TRUE and FALSE as keywords. They are predefined constants from this moment. This change is compatible with other pascal compilers. Fixes issue #0025030
...
git-svn-id: trunk@25497 -
2013-09-16 09:11:17 +00:00
michael
1449fbb9ff
* Added Read/Write of int64
...
git-svn-id: trunk@25496 -
2013-09-16 08:25:11 +00:00
michael
3ffae89e12
* Null stream implementation
...
git-svn-id: trunk@25495 -
2013-09-16 08:24:46 +00:00
paul
99dadf2998
compiler: allow comparative operators to have result other than Boolean. Reasons:
...
1. It allows to use comparative operators in some unusual cases (issue #25004 ).
2. Regular type checking does not allow to use other than Boolean types in IF expressions anyway.
3. Delphi compatibility (although Delphi documentation states otherwise).
git-svn-id: trunk@25494 -
2013-09-16 05:10:31 +00:00
paul
93f1ba4493
compiler: don't allow to access an enum members through the enum member. It should be only possible throught the enum type name. Fixes issue #0025029
...
git-svn-id: trunk@25493 -
2013-09-16 02:48:52 +00:00
paul
9577aa1d0b
packages: fixed syntax error in fpmake.pp
...
git-svn-id: trunk@25492 -
2013-09-16 02:18:24 +00:00
nickysn
408f53fbda
+ detect whether CGA snow checking is required and initialize the CheckSnow variable accordingly
...
git-svn-id: trunk@25491 -
2013-09-16 00:01:36 +00:00
nickysn
d2c2193505
+ 83/84-key keyboard support added to unit keyboard for i8086-msdos
...
git-svn-id: trunk@25490 -
2013-09-15 19:53:24 +00:00
nickysn
034f9c6b71
+ added and implemented unit keyboard for i8086-msdos, based on the go32v2 version of the unit
...
git-svn-id: trunk@25489 -
2013-09-15 17:48:35 +00:00
sergei
1bd43f0ea1
* Outgoing parameters on stack do not need to inhibit stack frame optimization on targets with fixed stack, because there they do not modify stack pointer in the middle of routine.
...
git-svn-id: trunk@25488 -
2013-09-15 12:19:11 +00:00
nickysn
5c1fb7b009
* Crt.CursorOff fixed after r25483; the correct value of CX is 2000h, not 200h
...
git-svn-id: trunk@25487 -
2013-09-14 15:39:07 +00:00
nickysn
e54c87dab1
* changed a method address typecast to CodePointer instead of Pointer in TStringList.QuickSort for compatibility with the i8086 medium and compact memory models
...
git-svn-id: trunk@25486 -
2013-09-14 13:52:41 +00:00
nickysn
4d4ad5734b
* Crt.CursorOn and CursorBig: use CX values that are CGA compatible, which makes them CGA/EGA/VGA compatible, because EGA/VGA bioses emulate CGA cursor values; as a side effect this also makes these functions work properly under EGA/VGA's 43- and 50-line text modes
...
git-svn-id: trunk@25485 -
2013-09-14 13:28:48 +00:00
nickysn
19d6d202cd
* Crt.CursorOn and CursorBig: use CX values that are CGA compatible, which makes them CGA/EGA/VGA compatible, because EGA/VGA bioses emulate CGA cursor values; as a side effect this also makes these functions work properly under EGA/VGA's 43- and 50-line text modes
...
git-svn-id: trunk@25484 -
2013-09-14 13:28:40 +00:00
nickysn
e60c3ee740
* Crt.CursorOff: use CX=bash200, instead of CX= for making the cursor invisible; this is the correct value, according to the BIOS documentation I've found and it is also the value used by the go32v2 video unit
...
git-svn-id: trunk@25483 -
2013-09-14 12:58:38 +00:00
florian
02e054a09e
+ fpc -i now writes also the available inline assembler input modes
...
git-svn-id: trunk@25482 -
2013-09-13 19:10:59 +00:00
sergei
38c2fb755a
* RTL, fpc_val_real_shortstr(): somewhat simplified, functionality is not changed.
...
git-svn-id: trunk@25481 -
2013-09-13 16:17:58 +00:00
svenbarth
08543ddeba
Fix for Mantis #23899 . Allow to overwrite TStringList.ExchangeItems if necessary.
...
rtl/objpas/classes/classesh.inc, TStringList:
* rename the private ExchangeItems to ExchangeItemsInt and allow inlining
+ add a protected virtual ExchangeItems
rtl/objpas/classes/stringl.inc, TStringList:
* Exchange: call ExchangeItemsInt
+ let default implementation of ExchangeItems simply call ExchangeItemsInt
* QuickSort: call ExchangeItemsInt directly if there is no override otherwise call ExchangeItems
+ added test
git-svn-id: trunk@25480 -
2013-09-13 14:17:01 +00:00
sergei
cf20bbc886
* RTL, Pos() with Variant: added 'const' modifiers to avoid unnecessary local copies of managed parameters.
...
git-svn-id: trunk@25479 -
2013-09-13 11:21:55 +00:00
sergei
b99cf8d680
* RTL: Changed 'shift' parameter of 64-bit shift helpers to CPU-native size, it doesn't have to be 64-bit because only its lower 6 bits are used. Not using 64 bit parameter improves code quality a bit.
...
git-svn-id: trunk@25478 -
2013-09-13 08:32:45 +00:00
nickysn
7e6092c4f2
* ScreenWidth and ScreenHeight changed to word; several other types also changed to 16-bit and added typecasts to avoid 32-bit calculations due to mixing signed and unsigned 16-bit ints
...
git-svn-id: trunk@25477 -
2013-09-13 08:31:53 +00:00
paul
60c0de6c09
compiler: formatting
...
git-svn-id: trunk@25476 -
2013-09-13 02:24:47 +00:00
paul
73dab82a7f
compiler: refactor preproc_substitutedtoken - pass the searchstr into it
...
git-svn-id: trunk@25475 -
2013-09-13 01:19:19 +00:00