I made one final commit and now I’m submitting a patch for review. I’ve
probably made mistakes in the patch process but I want to get this into the
pipeline so it’s not just sitting there wasting space on my computer. Tests are
included now and the link to the source on git is included in the re
> On Feb 15, 2019, at 1:52 PM, Jeppe Johansen wrote:
>
> Hi,
>
> Do you know why this doesn't work?
Jeppe I got this fixed now so if you update and rebuild from git it should work
now. Really stupid one liner mistake that took my all morning to find.
I included this into the tests which all
> On Feb 16, 2019, at 9:42 AM, Sven Barth via fpc-pascal
> wrote:
>
> When you create the constant symbols for the specialization you need to make
> sure that they belong to the surrounding symtable, not the specialized
> generic.
>
I probably didn’t get that right then. The constants are
Am Sa., 16. Feb. 2019, 15:34 hat Ryan Joseph
geschrieben:
>
>
> > On Feb 16, 2019, at 3:33 AM, Sven Barth via fpc-pascal <
> fpc-pascal@lists.freepascal.org> wrote:
> >
> > While you're at it, you should probably also ensure that internal error
> 2014050904 does not trigger ;)
>
> That’s what got
On 16/02/19 15:04, Ryan Joseph wrote:
Btw, how does FPC generate internal errors numbers? I needed to add some errors
myself and I didn’t know how to increment the counter.
YearMonthDay00, YearMonthDay01, ...
Jonas
___
fpc-pascal maillist - fpc-p
> On Feb 16, 2019, at 3:33 AM, Sven Barth via fpc-pascal
> wrote:
>
> While you're at it, you should probably also ensure that internal error
> 2014050904 does not trigger ;)
That’s what got my in the first place. I saw the internal error and made it not
trigger but didn’t bother to check i
Am 15.02.2019 um 23:00 schrieb Ryan Joseph:
On Feb 15, 2019, at 4:19 PM, Sven Barth via fpc-pascal
wrote:
It could be that the method body is not generated. Look for
generate_specialization_procs in pgenutil as that is what generates the bodies
at the end of a unit (simplified).
Really g
> On Feb 15, 2019, at 4:19 PM, Sven Barth via fpc-pascal
> wrote:
>
> It could be that the method body is not generated. Look for
> generate_specialization_procs in pgenutil as that is what generates the
> bodies at the end of a unit (simplified).
>
Really good catch Sven. tstoreddef.is_s
Hi,
Do you know why this doesn't work?
type
TGPIO = class
public
class function ReadValue: NativeUInt; virtual; abstract;
class procedure SetValue(AValue: NativeUInt); virtual; abstract;
class function GetPin(const AIndex: NativeInt): boolean; virtual;
end;
generic TStm32GP
Am Fr., 15. Feb. 2019, 21:54 hat Ryan Joseph
geschrieben:
>
>
> > On Feb 15, 2019, at 2:11 PM, Ryan Joseph
> wrote:
> >
> > Something with class functions in particular. Very strange it can’t find
> the declaration. So never mind about submitting, I need to fix this now. :)
>
> I just looked ove
> On Feb 15, 2019, at 2:11 PM, Ryan Joseph wrote:
>
> Something with class functions in particular. Very strange it can’t find the
> declaration. So never mind about submitting, I need to fix this now. :)
I just looked over this and indeed I have no idea idea what happened. I suspect
there’s
Am Fr., 15. Feb. 2019, 20:58 hat Ryan Joseph
geschrieben:
>
>
> > On Feb 15, 2019, at 2:11 PM, Ryan Joseph
> wrote:
> >
> > Also I just noticed that I’m getting warnings from the “U” constant
> which is declared in the “strict private” section (Private const
> "TTest$1.U" never used). That needs
> On Feb 15, 2019, at 2:11 PM, Ryan Joseph wrote:
>
> Also I just noticed that I’m getting warnings from the “U” constant which is
> declared in the “strict private” section (Private const "TTest$1.U" never
> used). That needs to be fixed also. Sven or some other compiler guy, do you
> know
Good catch, I have no idea what broke or how that could have happened.
I got it distilled down to this:
type
generic TTest = class
class procedure DoThis; // <—— Forward declaration not solved "class
DoThis;"
end;
class procedure TTest.DoThis;
begin
end;
type
ATest = specia
Am Mi., 9. Jan. 2019, 17:03 hat Ryan Joseph
geschrieben:
>
>
> > On Jan 8, 2019, at 3:49 PM, Benito van der Zander
> wrote:
> >
> > that reminds me of https://bugs.freepascal.org/view.php?id=34232
>
> In this case maybe generics should just not give range errors unless
> they’re specialized? Thi
> On Jan 8, 2019, at 3:49 PM, Benito van der Zander wrote:
>
> that reminds me of https://bugs.freepascal.org/view.php?id=34232
In this case maybe generics should just not give range errors unless they’re
specialized? This bug and the problem I have are only for unspecialized
generics. That
Am Di., 8. Jan. 2019, 23:49 hat Benito van der Zander
geschrieben:
> Hi,
>
> that reminds me of https://bugs.freepascal.org/view.php?id=34232
>
Yes, that falls into the same category...
Regards,
Sven
___
fpc-pascal maillist - fpc-pascal@lists.freepa
Hi,
that reminds me of https://bugs.freepascal.org/view.php?id=34232
Bye,
Benito
Am 08.01.19 um 23:28 schrieb Sven Barth via fpc-pascal:
Am Di., 8. Jan. 2019, 21:01 hat Ryan Joseph
mailto:r...@thealchemistguild.com>>
geschrieben:
I’ve made constants respect their proper definition now
Am Di., 8. Jan. 2019, 21:01 hat Ryan Joseph
geschrieben:
> I’ve made constants respect their proper definition now so we can do range
> checking but this broke some other things. For example there’s a range
> check error with static arrays now because “U” has a value of 0 so 0-1 = -1:
>
> type
>
I’ve made constants respect their proper definition now so we can do range
checking but this broke some other things. For example there’s a range check
error with static arrays now because “U” has a value of 0 so 0-1 = -1:
type
generic TList = record
list: array[0..U-1] o
On 08/01/19 17:34, Ryan Joseph wrote:
I made a little utility function which works in most cases but I don’t think
it’s correct and more importantly this function probably already exists in the
compiler.
function compare_orddef_by_range(param1,param2:torddef): boolean;
var
Yesterday I discovered I wasn’t doing proper range checking for ordinal
constants so for example, a generic with “const U: byte” could be specialized
as <1000>. We want ordinal constants to respect range checks right?
I made a little utility function which works in most cases but I don’t think
Am 07.01.2019 um 02:05 schrieb Ryan Joseph:
I updated the github with the requested changes. Is that everything? I’ll
submit a patch if so.
https://github.com/genericptr/freepascal/tree/generic_constants
Looks better.
The following points remain:
- make sure that you don't have any unrelated
> On Jan 6, 2019, at 11:32 PM, Ben Grasset wrote:
>
> Also, there's:
>
> pgenutil.pas(158,28) Warning: Class types "tenumdef" and "torddef" are not
> related
>
> which breaks compilation because the compiler is built with -sew turned on if
> you do it through the normal makefiles. I think y
Also, there's:
pgenutil.pas(158,28) Warning: Class types "tenumdef" and "torddef" are not
related
which breaks compilation because the compiler is built with -sew turned on
if you do it through the normal makefiles. I think you need tests before
you do a patch, also? (Unless you already have them
You still have two C-style operator += instances in pgenutil.pas FYI, that
don't compile with the default settings.
On Sun, Jan 6, 2019 at 8:36 PM Ryan Joseph
wrote:
> I updated the github with the requested changes. Is that everything? I’ll
> submit a patch if so.
>
> https://github.com/generic
I updated the github with the requested changes. Is that everything? I’ll
submit a patch if so.
https://github.com/genericptr/freepascal/tree/generic_constants
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
ht
Am So., 6. Jan. 2019, 22:38 hat Ryan Joseph
geschrieben:
> Since we introduced “const” keywords to generic params does it make sense
> to use an optional “type” keyword also? That just occurred to me as
> something worth discussing. No opinion either way except there’s a
> inconsistency now which
Am So., 6. Jan. 2019, 19:07 hat Ryan Joseph
geschrieben:
> Last question I have I think.
>
> Is this the best way to get "pretty name" string for a set? Having to loop
> through the entire range of the set is not so great but I don’t see another
> way. I feel like there should be some utility fun
Since we introduced “const” keywords to generic params does it make sense to
use an optional “type” keyword also? That just occurred to me as something
worth discussing. No opinion either way except there’s a inconsistency now
which may bother some people.
generic TStuff = record end;
Regards,
On Sun, Jan 6, 2019 at 4:23 PM Ryan Joseph
wrote:
> This is exactly the reason I added the feature, there’s no way to extend
> static arrays otherwise! Beyond this one thing I have no idea what to use
> them for. ;)
>
I've got a bunch of stuff in mind actually that I'm waiting on the "final"
ver
> On Jan 6, 2019, at 1:31 PM, Ben Grasset wrote:
>
> generic TStaticList = record
>
This is exactly the reason I added the feature, there’s no way to extend static
arrays otherwise! Beyond this one thing I have no idea what to use them for. ;)
Regards,
Ryan Joseph
___
Just wanted to say, I've been playing around with Ryan's github branch that
contains this functionality and I'm loving it! It really opens up a ton of
interesting possibilities in general, and also a lot of potential for
optimization via constant folding for generic containers that wasn't really
po
Last question I have I think.
Is this the best way to get "pretty name" string for a set? Having to loop
through the entire range of the set is not so great but I don’t see another
way. I feel like there should be some utility functions to get names for ord
defs also but I just did a crude str
> On Jan 6, 2019, at 1:28 AM, Sven Barth via fpc-pascal
> wrote:
>
> Just think about it logically: B and C can't be anything else than const, so
> why would we need to repeat it?
I’m not saying anyone would actually write that generic but if it does appear
what terminator is used? A more
Am Sa., 5. Jan. 2019, 22:57 hat Ryan Joseph
geschrieben:
> Here’s the new syntax requirements for const params which require types
> and consts be separated by semicolons.
>
> Does TStuff2 need a ; between the two const params? Sven said consts must
> follow ; or < but they’re both consts so I th
Here’s the new syntax requirements for const params which require types and
consts be separated by semicolons.
Does TStuff2 need a ; between the two const params? Sven said consts must
follow ; or < but they’re both consts so I thought I’d ask to make sure.
type
generic TStuff0 = recor
Am Sa., 5. Jan. 2019, 17:28 hat Ryan Joseph
geschrieben:
>
>
> > On Jan 5, 2019, at 1:18 AM, Sven Barth via fpc-pascal <
> fpc-pascal@lists.freepascal.org> wrote:
> >
> > I didn't design the original implementation, but the improvements for
> the last five years or so have been mine. 😅
> >
> > @R
On 05/01/19 18:51, Ryan Joseph wrote:
Given the new syntax requirements we talked about there needs to be a ; after T
now. What error should be used if there isn’t a ; semicolon separator between
types and consts? I just used a parser_e_illegal_expression for now.
scan_f_syn_expected=02003_F_
Given the new syntax requirements we talked about there needs to be a ; after T
now. What error should be used if there isn’t a ; semicolon separator between
types and consts? I just used a parser_e_illegal_expression for now.
generic TStuff = record
Regards,
Ryan Joseph
__
> On Jan 5, 2019, at 1:18 AM, Sven Barth via fpc-pascal
> wrote:
>
> I didn't design the original implementation, but the improvements for the
> last five years or so have been mine. 😅
>
> @Ryan: I can give it a try to rework the list from defs to syms and you can
> then put your const impl
On 1/5/19 3:18 AM, Sven Barth via fpc-pascal wrote:
Am Fr., 4. Jan. 2019, 21:11 hat geschrieben:
On 1/4/19 1:47 PM, Ryan Joseph wrote:
> Who designed the generics btw?
unless i'm highly mistaken, you've been talking to them... they're quoted
above, even ;)
I didn't design the
Am Fr., 4. Jan. 2019, 21:11 hat geschrieben:
> On 1/4/19 1:47 PM, Ryan Joseph wrote:
> >
> >> On Jan 3, 2019, at 11:11 PM, Sven Barth via fpc-pascal <
> fpc-pascal@lists.freepascal.org> wrote:
> >>
> >> Fair enough. In that case support for constants in generics will have
> to wait as well. 🤷
>
On 1/4/19 1:47 PM, Ryan Joseph wrote:
On Jan 3, 2019, at 11:11 PM, Sven Barth via fpc-pascal
wrote:
Fair enough. In that case support for constants in generics will have to wait
as well. 🤷
Who designed the generics btw?
unless i'm highly mistaken, you've been talking to them... they'r
> On Jan 3, 2019, at 11:11 PM, Sven Barth via fpc-pascal
> wrote:
>
> Fair enough. In that case support for constants in generics will have to wait
> as well. 🤷
Who designed the generics btw? I’m not 100% certain that it’s even safe to
change their design like this so it would be nice to h
Am 03.01.2019 um 23:14 schrieb Ryan Joseph:
On Jan 3, 2019, at 11:33 AM, Sven Barth via fpc-pascal
wrote:
The approach should be like this:
- const is allowed at the start of the parameters or after a ";"
- a parameter name is either followed by a ",", ";", ":" or ">" (that should
already b
> On Jan 3, 2019, at 11:33 AM, Sven Barth via fpc-pascal
> wrote:
>
> The approach should be like this:
> - const is allowed at the start of the parameters or after a ";"
> - a parameter name is either followed by a ",", ";", ":" or ">" (that should
> already be the case)
> - a ":" is either
Am Do., 3. Jan. 2019, 17:50 hat Ryan Joseph
geschrieben:
>
>
> > On Jan 3, 2019, at 6:20 AM, Sven Barth via fpc-pascal <
> fpc-pascal@lists.freepascal.org> wrote:
> >
> > Correct. ";" separates different parameter types, "," separates those of
> the same type. Though I agree with Mattias that "co
> On Jan 3, 2019, at 6:20 AM, Sven Barth via fpc-pascal
> wrote:
>
> Correct. ";" separates different parameter types, "," separates those of the
> same type. Though I agree with Mattias that "const T, const U" (with or
> without ": Integer") should not work (but then "T, const U" should als
Am Do., 3. Jan. 2019, 14:24 hat Alexander Shishkin via fpc-pascal <
fpc-pascal@lists.freepascal.org> geschrieben:
> 03.01.2019 15:45, Mattias Gaertner via fpc-pascal пишет:
> > On Thu, 3 Jan 2019 14:58:00 +0300
> > Alexander Shishkin via fpc-pascal
> > wrote:
> >
> >> [...]
> >> This is OK (both
03.01.2019 15:45, Mattias Gaertner via fpc-pascal пишет:
On Thu, 3 Jan 2019 14:58:00 +0300
Alexander Shishkin via fpc-pascal
wrote:
[...]
This is OK (both T and U are integer):
generic TMyRecord1 = record end;
That is inconsistent to normal Pascal arguments.
Name[, Name ...][:type]
Isn't
Am Do., 3. Jan. 2019, 12:58 hat Alexander Shishkin via fpc-pascal <
fpc-pascal@lists.freepascal.org> geschrieben:
> 03.01.2019 6:32, Ryan Joseph пишет:
> >
> >
> >> On Jan 2, 2019, at 8:25 PM, Alexander Shishkin via fpc-pascal <
> fpc-pascal@lists.freepascal.org> wrote:
> >>
> >> This is not consi
On Thu, 3 Jan 2019 14:58:00 +0300
Alexander Shishkin via fpc-pascal
wrote:
>[...]
> This is OK (both T and U are integer):
> generic TMyRecord1 = record end;
That is inconsistent to normal Pascal arguments.
Name[, Name ...][:type]
Isn't it?
Mattias
___
03.01.2019 6:32, Ryan Joseph пишет:
On Jan 2, 2019, at 8:25 PM, Alexander Shishkin via fpc-pascal
wrote:
This is not consistent with constraints. Should be ";" after T.
And what about following examples?
The semicolon is only needed following a generic parameter which is
constrained. T
> On Jan 2, 2019, at 8:25 PM, Alexander Shishkin via fpc-pascal
> wrote:
>
> This is not consistent with constraints. Should be ";" after T.
>
> And what about following examples?
>
The semicolon is only needed following a generic parameter which is
constrained. This was the normal behavio
03.01.2019 4:29, Ryan Joseph пишет:
type
generic TMyRecord_Int = record
end;
This is not consistent with constraints. Should be ";" after T.
And what about following examples?
type
generic TMyRecord1 = record
end;
type
generic TMyRecord2 = record
> On Jan 2, 2019, at 5:52 PM, Alexander Shishkin via fpc-pascal
> wrote:
>
> Thanks, now I`ve lost is a discussion again. What is the decision about
> syntax? Is "const" prefix and/or ": type" suffix required?
const is required but the type is not.
Here’s a test for all the const types supp
> On Jan 2, 2019, at 3:13 PM, Alexander Shishkin via fpc-pascal
> wrote:
>
> I`d like to see constant parameter to be constrained with type
>
> type
> generic TList = record
> list: array[0..U-1] of T;
> function capacity: integer;
> end;
This is the s
Thanks, now I`ve lost is a discussion again. What is the decision about
syntax? Is "const" prefix and/or ": type" suffix required?
generic TList1 = class
var data: array[0..U] of T; end;
generic TList2 = class
var data: array[0..U] of T; end;
generic TLis3 = class
var data: array[0..U]
Am Mi., 2. Jan. 2019, 23:41 hat Alexander Shishkin via fpc-pascal <
fpc-pascal@lists.freepascal.org> geschrieben:
> 06.11.2018 10:13, Ryan Joseph пишет:
> >
> > program generic_constants;
> >
> > type
> > generic TList = record
> > list: array[0..U-1] of T;
> > fu
06.11.2018 10:13, Ryan Joseph пишет:
program generic_constants;
type
generic TList = record
list: array[0..U-1] of T;
function capacity: integer;
end;
I`d like to see constant parameter to be constrained with type
type
generic TList =
Well, I'll wait then.That's definitely nice to have feature.02.01.2019, 16:33, "Sven Barth via fpc-pascal" :Am Mi., 2. Jan. 2019, 11:20 hat denisgolovan geschrieben:Hi, allCould someone confirm this functionality is merged into trunk? I mean constants in generics.I can conf
Am Mi., 2. Jan. 2019, 11:20 hat denisgolovan
geschrieben:
> Hi, all
>
> Could someone confirm this functionality is merged into trunk? I mean
> constants in generics.
>
I can confirm that it is not integrated in trunk.
Regards,
Sven
___
fpc-pascal mai
Hi, allCould someone confirm this functionality is merged into trunk? I mean constants in generics.29.11.2018, 05:24, "Ryan Joseph" : On Nov 29, 2018, at 5:15 AM, Sven Barth via fpc-pascal wrote: Looks better. The next thing to nuke is the tgenericparamdef. The par
> On Nov 28, 2018, at 11:25 PM, Sven Barth via fpc-pascal
> wrote:
>
> You're not wrong, but a type alias is definitely the wrong way.
> But that is a completely different topic, one that I'm not willing to discuss
> right now, aside from "we don't support something like that”.
Ok, maybe so
> On Nov 29, 2018, at 5:15 AM, Sven Barth via fpc-pascal
> wrote:
>
> Looks better.
> The next thing to nuke is the tgenericparamdef. The parameters stored in
> tdef.genericparas are the parameter symbols, so there should be no need for
> defs. If necessary some of the code in pgenutil (and
Am 27.11.2018 um 11:35 schrieb Sven Barth:
Am Di., 27. Nov. 2018, 08:18 hat Ryan Joseph
mailto:r...@thealchemistguild.com>>
geschrieben:
> On Nov 27, 2018, at 4:59 AM, Sven Barth via fpc-pascal
mailto:fpc-pascal@lists.freepascal.org>> wrote:
>
> Best check again once you've d
Am Mi., 28. Nov. 2018, 15:27 hat Ryan Joseph
geschrieben:
>
>
> > On Nov 28, 2018, at 7:26 PM, Sven Barth via fpc-pascal <
> fpc-pascal@lists.freepascal.org> wrote:
> >
> > Because that is not supposed to work. Generic routines are *routines*,
> not types. You can't define aliases for routines ei
> On Nov 28, 2018, at 7:26 PM, Sven Barth via fpc-pascal
> wrote:
>
> Because that is not supposed to work. Generic routines are *routines*, not
> types. You can't define aliases for routines either, not to mention the
> problems with scoping as generic methods exist as well.
It seems natu
Am Mi., 28. Nov. 2018, 09:41 hat Ryan Joseph
geschrieben:
> I just noticed I sent this to the wrong person and the list never saw it
> so I’m sending it again. I feel like I should try to fix it while I’ve got
> my eyes on the generics code before I forget.
>
> Is there a reason it’s not implemen
> On Nov 27, 2018, at 11:07 PM, Sven Barth via fpc-pascal
> wrote:
>
> Does it also work correctly if you change the constant and then recompile?
> The same if the specialization is inside another unit used by the program?
>
It appears to work. I’ll make a proper test suite once we have th
I just noticed I sent this to the wrong person and the list never saw it so I’m
sending it again. I feel like I should try to fix it while I’ve got my eyes on
the generics code before I forget.
Is there a reason it’s not implemented yet? In theory you should be able to
specialize a function as
Am Di., 27. Nov. 2018, 15:08 hat Ryan Joseph
geschrieben:
> > You did read the part about the generic and the specialization being
> located in two different units? 😉
>
> Oops. This still works so I guess it’s ok.
>
> program gc_ppu;
> uses
> gc_types_unit;
>
> var
> a: specialize
> On Nov 27, 2018, at 8:11 PM, Sven Barth via fpc-pascal
> wrote:
>
> We can add a new message that says "type id or untyped constant expected".
> But if it correctly errors right now, we can leave it be for now.
>
Fine by me.
> You did read the part about the generic and the specializati
Am Di., 27. Nov. 2018, 14:00 hat Ryan Joseph
geschrieben:
>
>
> > On Nov 27, 2018, at 5:35 PM, Sven Barth via fpc-pascal <
> fpc-pascal@lists.freepascal.org> wrote:
> >
> > 1) kSomeDays is a typed const so I get a load node instead of
> tsetconstnode, which I need to need to know in order to make
Am Di., 27. Nov. 2018, 12:03 hat Mattias Gaertner via fpc-pascal <
fpc-pascal@lists.freepascal.org> geschrieben:
> On Tue, 27 Nov 2018 11:35:22 +0100
> Sven Barth via fpc-pascal wrote:
>
> >[...]
> > > const
> > > kSomeDays:TDays = [Mon, Wed];
> >[...]
> > The difference between typed and
> On Nov 27, 2018, at 5:35 PM, Sven Barth via fpc-pascal
> wrote:
>
> 1) kSomeDays is a typed const so I get a load node instead of tsetconstnode,
> which I need to need to know in order to make the name string. See the TODO’s
> in tgenericparamdef.create.
>
> type
> TDay = (Mon, Tu
On Tue, 27 Nov 2018 11:35:22 +0100
Sven Barth via fpc-pascal wrote:
>[...]
> > const
> > kSomeDays:TDays = [Mon, Wed];
>[...]
> The difference between typed and untyped constants are available
> everywhere else in the language as well, so I have no qualms (at
> least for now?) to error ou
Am Di., 27. Nov. 2018, 08:18 hat Ryan Joseph
geschrieben:
>
>
> > On Nov 27, 2018, at 4:59 AM, Sven Barth via fpc-pascal <
> fpc-pascal@lists.freepascal.org> wrote:
> >
> > Best check again once you've done the switch to tconstsym for constants.
> :)
> >
>
> I made most of the changes you mention
> On Nov 27, 2018, at 2:25 PM, denisgolovan wrote:
>
> Hi
>
> Sorry for breaking in, but I'd like to know if this functionality supports
> specializing generic functions with const parameters?
>
> BR,
> Denis
Here’s my test which seems to be working.
program gc_procs;
generic procedure Do
> Here’s my test which seems to be working.
>
> program gc_procs;
>
> generic procedure DoThis(msg:string = U);
> begin
> writeln(msg, ' ',sizeof(T), ' ', U);
> end;
>
> begin
> specialize DoThis('hello world’); // prints "hello world 4 foo"
> specialize DoThis; // prints “foo 4 foo"
> end.
Th
Hi
Sorry for breaking in, but I'd like to know if this functionality supports
specializing generic functions with const parameters?
BR,
Denis
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listin
> On Nov 27, 2018, at 4:59 AM, Sven Barth via fpc-pascal
> wrote:
>
> Best check again once you've done the switch to tconstsym for constants. :)
>
I made most of the changes you mentioned so please look. Including the
constsyms didn’t break anything and helped to clean up the code. I woul
Am Mo., 26. Nov. 2018, 15:47 hat Ryan Joseph
geschrieben:
>
>
> > On Nov 26, 2018, at 8:18 PM, Sven Barth via fpc-pascal <
> fpc-pascal@lists.freepascal.org> wrote:
> >
> > You don't need to manually check for U. The parser will find U in the
> symbol table of the TMyClass generic and then a list
> On Nov 26, 2018, at 8:18 PM, Sven Barth via fpc-pascal
> wrote:
>
> You don't need to manually check for U. The parser will find U in the symbol
> table of the TMyClass generic and then a list containing the parameters will
> be generated and passed to parse_generic_specialization_type_int
Am Mo., 26. Nov. 2018, 12:14 hat Ryan Joseph
geschrieben:
>
>
> > On Nov 26, 2018, at 5:16 PM, Sven Barth via fpc-pascal <
> fpc-pascal@lists.freepascal.org> wrote:
> >
> > Am Mo., 26. Nov. 2018, 10:46 hat Ryan Joseph
> geschrieben:
> >
> >
> > > On Nov 26, 2018, at 12:09 AM, Sven Barth via fpc-
> On Nov 26, 2018, at 5:16 PM, Sven Barth via fpc-pascal
> wrote:
>
> Am Mo., 26. Nov. 2018, 10:46 hat Ryan Joseph
> geschrieben:
>
>
> > On Nov 26, 2018, at 12:09 AM, Sven Barth via fpc-pascal
> > wrote:
> >
> > - your pretty name is wrong; the pretty name for a specialization with
>
Am Mo., 26. Nov. 2018, 10:46 hat Ryan Joseph
geschrieben:
>
>
> > On Nov 26, 2018, at 12:09 AM, Sven Barth via fpc-pascal <
> fpc-pascal@lists.freepascal.org> wrote:
> >
> > - your pretty name is wrong; the pretty name for a specialization with
> constants should be "TSomeGeneric", not
> "TSomeGe
> On Nov 26, 2018, at 12:09 AM, Sven Barth via fpc-pascal
> wrote:
>
> - your pretty name is wrong; the pretty name for a specialization with
> constants should be "TSomeGeneric", not
> "TSomeGeneric" as it would be now
I’ll change the # prefix for const params but the unit prefix was not a
Am 14.11.2018 um 03:25 schrieb Ryan Joseph:
I think I have this done except for cleanup. Here’s the status:
- Integer,string,real,set and nil constant for parameters.
- Consts can have type restrictions which correspond to the above types.
- Const can be assigned to from generic const params.
-
I think I have this done except for cleanup. Here’s the status:
- Integer,string,real,set and nil constant for parameters.
- Consts can have type restrictions which correspond to the above types.
- Const can be assigned to from generic const params.
- PPU loading.
Technical compiler issues:
- I
On Thu, Nov 8, 2018 at 11:50 PM Ryan Joseph
wrote:
> Question: should other consts besides integers be allowed? I don’t think
> it makes sense personally to use strings, floats or sets but maybe I’m
> wrong.
>
As a daily FPC user there's nothing I find more annoying than compiler
restrictions th
Am Sa., 10. Nov. 2018, 14:47 hat Ryan Joseph
geschrieben:
>
>
> > On Nov 10, 2018, at 7:22 PM, Florian Klämpfl
> wrote:
> >
> > If you "export" a generic taking a const from a unit, this info has to
> be stored in the ppu.
>
> Can you show a test case I could use to see where this is triggered i
> On Nov 10, 2018, at 7:22 PM, Florian Klämpfl wrote:
>
> If you "export" a generic taking a const from a unit, this info has to be
> stored in the ppu.
Can you show a test case I could use to see where this is triggered in the
compiler? I don’t even know where to begin looking.
Regards,
Am 10.11.2018 um 13:20 schrieb Ryan Joseph:
>>>
- the compiler contains already a type called tgenericdef
>>>
>>> I think I changed that name in the last commit. Btw I made all those types
>>> because I didn’t want to populate the main types like ttypesym with extra
>>> bytes but I don’t kno
> On Nov 10, 2018, at 7:16 PM, Florian Klämpfl wrote:
>
> This does not prevent you from creating proper commits, especially as the
> patch series from github could be easily
> applied later on to fpc's main repository.
I’ll assume these commits could be public some day then. I originally tho
Am 09.11.2018 um 03:13 schrieb Ryan Joseph:
>
>
>> On Nov 9, 2018, at 4:28 AM, Florian Klämpfl wrote:
>>
>> I like the idea of const in generics, but it needs serious cleanup when it's
>> working:
>> - commit messages like "first commit" are useless
>
> Those are for github so I could share bu
Am 09.11.2018 um 05:20 schrieb Ryan Joseph:
>
>
>> On Nov 9, 2018, at 4:28 AM, Florian Klämpfl wrote:
>>
>> I like the idea of const in generics, but it needs serious cleanup when it's
>> working:
>
> Question: should other consts besides integers be allowed? I don’t think it
> makes sense pe
Am Fr., 9. Nov. 2018, 03:44 hat Ryan Joseph
geschrieben:
>
>
> > On Nov 9, 2018, at 4:28 AM, Florian Klämpfl
> wrote:
> >
> > I like the idea of const in generics, but it needs serious cleanup when
> it's working:
> > - commit messages like "first commit" are useless
>
> Those are for github so
> On Nov 9, 2018, at 4:28 AM, Florian Klämpfl wrote:
>
> I like the idea of const in generics, but it needs serious cleanup when it's
> working:
Question: should other consts besides integers be allowed? I don’t think it
makes sense personally to use strings, floats or sets but maybe I’m wro
1 - 100 of 115 matches
Mail list logo