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
nickysn
70937d93c1
* WinMinX, WinMinY, WinMaxX and WinMaxY helper functions replaced with absolute packed records overlaid on top of WindMin and WindMax for faster access
...
git-svn-id: trunk@25474 -
2013-09-12 23:39:56 +00:00
paul
e42e9bb677
compiler: support ORD() intrinsic in preprocessor expressions
...
git-svn-id: trunk@25471 -
2013-09-12 12:52:07 +00:00
paul
974aeb5573
compiler: support MOD, DIV, SHR, SHL in preprocessor expressions
...
git-svn-id: trunk@25469 -
2013-09-12 11:22:59 +00:00
paul
cc37b19bb2
compiler: allow 1 and 0 to be used as Booleans in preprocessor expressions
...
git-svn-id: trunk@25467 -
2013-09-12 09:30:48 +00:00
paul
06e7808f64
compiler: return short evaluation of preprocessor expressions with AND or OR. This fixes univint package compilation.
...
git-svn-id: trunk@25466 -
2013-09-12 09:06:13 +00:00
paul
038b7746fb
compiler: implement preprocessor expressions (fixes mantis #0010671 )
...
- move operator_levels to topens.pas - it is used from 2 units now
- implement pexpr like sub_expr for preprocessor expressions
- implement +,-,*,/ expressions for the moment
* move OR, AND, IN implemenetation to the new logic
git-svn-id: trunk@25465 -
2013-09-12 08:35:24 +00:00
paul
6eba4226b6
compiler: move OR and AND preprocessor evaluation to texprvalue.evaluate
...
git-svn-id: trunk@25464 -
2013-09-12 06:59:12 +00:00
paul
7ecaaf0ef8
compiler: further improve preprocessor evaluator:
...
* support TRUE,FALSE for all modes
* refactor texprvalue.evaluate to support arithmetic expressions and implement them here
* simplify read_expr and read_factor code
git-svn-id: trunk@25463 -
2013-09-12 06:01:49 +00:00
paul
cac09f9df1
compiler: better handling of '$','%','&' in macros
...
git-svn-id: trunk@25462 -
2013-09-12 02:33:02 +00:00
paul
0eb4244a67
compiler: implement compile-time expression with float numbers (issue #0010670 ), better handling of integer expressions too
...
git-svn-id: trunk@25461 -
2013-09-12 01:59:26 +00:00
paul
eff0403fc1
compiler: reimplement handling of compile time variables - they are stored like tconstsym now instead of string. Expressions are evaluated more accurate now.
...
git-svn-id: trunk@25460 -
2013-09-12 00:38:17 +00:00
svenbarth
6f5a648516
Improve the cpu type handling for M68k just in case we should branch 2.8.0 before I can start working on M68k again.
...
Therefor the cpu type (-Cp...) "coldfire" was split up into "isaa", "isaa+", "isab" and "isac". The Linux RTL can currently compiled for "68020", "isab" and "isac". For the other three Bcc.L must be handled differently (only Bcc.B/W supported) and for "68000" also EXT.L needs to be handled differently.
fpcdefs.inc:
+ define CPUCAPABILITIES if capabilities can be set for a certain CPU type (currently ARM, AVR and M68k)
options.pas:
* check for CPUCAPABILITIES instead of specific CPUs
assemble.pas:
- the handling of the CPU type is already done in m68k/ag68kgas.pas, Tm68kGNUAssembler.MakeCmdLine (and thereby already using the gascputypestr array!)
m68k/cpuinfo.pas:
- tcputype: remove "cpu_coldfire"
+ tcputype: add "cpu_isa_a", "cpu_isa_a_p", "cpu_isa_b" and "cpu_isa_c"
+ add "cpu_coldfire" constant which contains all Coldfire specific cpu types
* adjust "cputypestr" and "gascputypestr"
+ add tcpuflags and cpu_capabilities (DBRA restriction was checked with CPUCOLDFIRE, CAS/TAS will be needed for atomic operations and BRAL restriction was discovered during testing of new cpu types)
m68k/cgcpu.pas:
* adjust checks for "cpu_coldfire"
m68k/n68kadd.pas:
* don't use a BRA.L if it is not supported, but (at least for now) a BRA.W
aggas.pas:
* adjusted check for Coldfire
git-svn-id: trunk@25457 -
2013-09-11 17:07:32 +00:00
svenbarth
2e70575afc
Allow compilation of compiler with 2.6.x RTL for simplyfied development.
...
cfileutl.pas:
+ define a TRawByteSearchRec if we're not compiling with at least a 2.7.1 compiler
git-svn-id: trunk@25456 -
2013-09-11 16:05:24 +00:00
nickysn
6ef912a7a0
* GetScreenCursor (and all places where it's called) var parameters changed to smallint, which is more optimal on i8086
...
git-svn-id: trunk@25455 -
2013-09-11 14:51:59 +00:00
nickysn
771301d7db
* SetScreenCursor parameters changed to smallint, which is more optimal on i8086
...
git-svn-id: trunk@25454 -
2013-09-11 14:40:26 +00:00
nickysn
987e759e20
* WinMinX, WinMinY, WinMaxX and WinMaxY helper functions changed to return 0 based result, which results in slightly more optimal code in a lot of places
...
git-svn-id: trunk@25453 -
2013-09-11 14:18:30 +00:00
lacak
47f9c32f11
fcl-db: tests: fix TestStreamingNullFieldsXML (only fields which are not required and not readonly can be set to Null)
...
git-svn-id: trunk@25452 -
2013-09-11 12:05:20 +00:00
lacak
91783105cc
fcl-db: tests: improve testing Blobs (use not only ascii characters, but also binary data etc.)
...
git-svn-id: trunk@25451 -
2013-09-11 10:48:44 +00:00