Commit Graph

41125 Commits

Author SHA1 Message Date
paul
c22c364f43 compiler: regenerate parameter list in tprocvardef.getcopy (fixes compiler crash, issue #0025077)
git-svn-id: trunk@25561 -
2013-09-25 03:28:14 +00:00
paul
ce6c8c1b59 compiler: search namespace symbols also in the interface symtable of a unit when we are registering a unit with a namespace in the implementation section (fixes issue #0025059)
git-svn-id: trunk@25560 -
2013-09-25 02:25:26 +00:00
paul
d373ad27bc compiler: don't allow unit/namespace symbols be visible outside current unit or unit of currently specialized generic
git-svn-id: trunk@25559 -
2013-09-25 00:29:56 +00:00
Jonas Maebe
44b141ea1a * also load the methodpointer type for managed VM types. It's required
now that there is no special assigned handling anymore, because the
    generic "<>nil" code for method pointers loads the "proc" field
    via an internally generated tmethod() typecast (using the
    methodpointer type). Additionally, not loading this type was
    an artefact from the time that it wasn't available yet for the
    JVM target

git-svn-id: trunk@25558 -
2013-09-24 23:57:21 +00:00
Jonas Maebe
20d6db20c8 * fixed compilation of length(unicode/ansistring) on JVM target after r25499
(we previously internally generated assigned(unicode/ansistring) nodes,
     which now cause typecheck errors because there is no special assigned
     handling anymore)

git-svn-id: trunk@25557 -
2013-09-24 23:57:17 +00:00
nickysn
1f783f539c * emit a cld instruction before the rep movsXX in tcg8086.g_copyvaluepara_openarray as well
git-svn-id: trunk@25556 -
2013-09-24 20:09:11 +00:00
nickysn
5c46e6f474 * emit a cld instruction before the rep movsXX in tcg386.g_copyvaluepara_openarray
git-svn-id: trunk@25555 -
2013-09-24 20:07:53 +00:00
sergei
d981861433 * IsNan(single): can be written much simpler, because representation of single casted to longint is the same on big-endian and little-endian targets.
git-svn-id: trunk@25554 -
2013-09-24 18:55:44 +00:00
nickysn
35c0c76034 * i8086/mathu.inc converted to asmmode intel
git-svn-id: trunk@25553 -
2013-09-24 18:31:10 +00:00
nickysn
07bbfc7c60 + added { on} to test tfarcal1.pp
git-svn-id: trunk@25552 -
2013-09-24 18:15:43 +00:00
sergei
0914bb7944 - Removed empty include file wustrings.inc
git-svn-id: trunk@25551 -
2013-09-24 16:35:04 +00:00
sergei
5dd10ade50 - Removed register lists after pure assembler procedures, they are ignored anyway.
git-svn-id: trunk@25550 -
2013-09-24 16:27:34 +00:00
sergei
d6a4e30f06 * fpc_val_real_shortstr: track amount of digits in mantissa and limit integer exponent values. This does not (yet) prevent floating-point overflows, but is a necessary step to prevent them.
git-svn-id: trunk@25549 -
2013-09-24 15:57:01 +00:00
sergei
5ec95691c0 * fpc_val_real_shortstr: some more minor/style cleanup.
git-svn-id: trunk@25548 -
2013-09-24 15:38:15 +00:00
nickysn
2afea8fc19 + allow {$apptype com} and {$apptype exe} to set the msdos binary format
+ added extra check to ensure that {$apptype console} and {$apptype gui} produce a warning and do not change the binary format to .exe on msdos

git-svn-id: trunk@25547 -
2013-09-24 13:35:44 +00:00
marco
1a4a745993 * fix for mantis #25078
git-svn-id: trunk@25546 -
2013-09-24 12:56:43 +00:00
pierre
7ab7dcc846 Accept both mips and mipseb as architecture
git-svn-id: trunk@25545 -
2013-09-24 12:23:41 +00:00
nickysn
52a5ffc386 * use apptype to indicate that the target is a DOS .COM file, instead of introducing a new field in tsettings (as suggested by Sven)
git-svn-id: trunk@25544 -
2013-09-24 12:13:47 +00:00
lacak
139b498296 fcl-db: base: move method GetNewBlobBuffer from public to protected section as it was before rev.21735
For usage in TDataPacketReader descendants use RestoreBlobField method.

git-svn-id: trunk@25543 -
2013-09-24 07:35:20 +00:00
lacak
7842e9f823 fcl-db: datapacketreader: change of interface methods. Pass reference to TCustomBufDataset only once in constructor of TDatapacketReader, so instance of datapacketreader will know about BufDataset for which it was created and there is no need to pass this reference on "every" call to methods of TDataPacketReader. It brings simplicity and more flexibility IMHO.
DO NOT BACKPORT THIS TO 2.6.3

git-svn-id: trunk@25542 -
2013-09-24 07:07:05 +00:00
Tomas Hajny
3e5601d89e * fix ChDir and GetDir handling for other than the current drive and avoid changing the current directory in GetDir in that case
git-svn-id: trunk@25541 -
2013-09-23 20:41:54 +00:00
michael
10eb918bed * Register/Unregister SQL Statements less often
git-svn-id: trunk@25540 -
2013-09-23 18:11:34 +00:00
pierre
edd59a4eb5 Add missing i after dollar for include directive
git-svn-id: trunk@25539 -
2013-09-23 11:56:41 +00:00
lacak
9013ff6724 fcl-db:fcl-db: base: fix streaming (restoring) of ftWideMemo fields in XMLDatapacketReader
+ extend test of streaming of "FieldDataset" to test all fields (not only Blob and Memo)

git-svn-id: trunk@25538 -
2013-09-23 11:09:07 +00:00
pierre
22e9cb48dd Fix get_caller_stackinfo function: Addr parameter must also be by var
git-svn-id: trunk@25537 -
2013-09-23 09:51:20 +00:00
paul
f3963172ba compiler: don't look at unit and namespace symbols from other units while searching for a type (issue #0025054)
git-svn-id: trunk@25536 -
2013-09-23 09:22:47 +00:00
nickysn
4fc4e4cb88 * removed the dummy fpc_sin_real and fpc_cos_real that halt with a runtime error
from the i8086 rtl, because the FSIN and FCOS instructions are 387+ and on
  earlier FPUs the real helper functions are needed.

git-svn-id: trunk@25535 -
2013-09-22 15:06:45 +00:00
nickysn
ce123b6956 + started the i8086-msdos version of the unit graph, based on the go32v2
version. Only the CGA routines are enabled for now and the unit compiles, but
  does not work yet.

git-svn-id: trunk@25534 -
2013-09-21 22:06:55 +00:00
nickysn
aaf1a54778 * graph unit 'ExitSave' variable changed to codepointer for i8086 medium memory model compilation
git-svn-id: trunk@25533 -
2013-09-21 21:44:11 +00:00
nickysn
4d86d44e38 * several i8086 fixes for 'data element too large' errors
git-svn-id: trunk@25532 -
2013-09-21 20:36:18 +00:00
nickysn
a04cbc09b0 * changed the default i8086 asmmode to Intel
git-svn-id: trunk@25531 -
2013-09-21 18:43:34 +00:00
nickysn
912299e9e7 + documented the new options -Wtexe and -Wtcom in the fpc help
git-svn-id: trunk@25530 -
2013-09-21 17:17:50 +00:00
nickysn
b0be805561 * actually use the .com suffix, instead of .exe when creating a .com file
git-svn-id: trunk@25529 -
2013-09-21 17:06:06 +00:00
nickysn
567cdf875b + added new i8086 compiler options -Wtexe and -Wtcom for specifying the MS-DOS
binary format (.exe or .com)
* the default format for i8086 tiny model binaries changed to .exe

git-svn-id: trunk@25528 -
2013-09-21 16:44:14 +00:00
nickysn
e2903ded95 + added CGA snow checking to the WriteChar routine of the CRT unit for i8086-msdos; scrolling and clreol still produces snow
git-svn-id: trunk@25527 -
2013-09-21 13:40:21 +00:00
marco
03ac735bb9 * Patch from bug #25062 fixing parsing of coordinates within [] in windows section of hhp
git-svn-id: trunk@25526 -
2013-09-21 12:29:20 +00:00
nickysn
661e11ecb8 * on i8086 added section .fpc to the group 'dgroup'. This fixes a bug that caused the bss section to not be left out from the executable in tiny model, which caused, ironically, tiny model executables to be larger than the small model executables
git-svn-id: trunk@25525 -
2013-09-21 11:28:01 +00:00
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