Search found 26 matches

by Zorko
Sat Jan 15, 2022 10:03 pm
Forum: Bug
Topic: VAR [nil] for tagged structural parameters
Replies: 3
Views: 4820

Re: VAR [nil] for tagged structural parameters

After this fix, I found one entry in the module WinApi: PROCEDURE [stdcall] SetDIBColorTable* (p0: HDC; p1: INTEGER; p2: INTEGER; VAR [nil] p3: ARRAY OF RGBQUAD): INTEGER; Where RGBQUAD is an untagged record, but p3 is an open tagged array with the length passed to the procedure inside. For array as...
by Zorko
Sat Jan 15, 2022 9:48 pm
Forum: Bug
Topic: VAR [nil] for tagged structural parameters
Replies: 3
Views: 4820

Re: VAR [nil] for tagged structural parameters

Refinement of corrections (we need to additionally check the tagging of a structure):

Code: Select all

		ELSIF (sys # 0) & ((typ.comp = Record) OR (typ.comp = DynArr)) & ~typ.untagged THEN err(142)
by Zorko
Sat Jan 15, 2022 1:56 pm
Forum: Bug
Topic: VAR [nil] for tagged structural parameters
Replies: 3
Views: 4820

VAR [nil] for tagged structural parameters

It is now possible to declare the following parameter: MODULE Win; IMPORT SYSTEM; PROCEDURE Proc (VAR [nil] lpModuleName: ARRAY OF CHAR); END Proc; BEGIN Proc(NIL) END Win. But this makes no sense, since ARRAY is not an untagged pointer, it is a tagged structure with length storage. The same about R...
by Zorko
Mon Sep 13, 2021 5:38 pm
Forum: Feature
Topic: Strings.IntToStringForm: convert a number to Oberon format
Replies: 2
Views: 11867

Strings.IntToStringForm: convert a number to Oberon format

I propose to increase the functionality of the procedure Strings.IntToStringForm. There is an input parameter MinWidth, which is responsible for the minimum number of output characters of a converted number. Any the number can take up one or more characters. But still, ASSERT inside this procedure a...
by Zorko
Sun Aug 23, 2020 2:09 am
Forum: Bug
Topic: MAX with two arguments
Replies: 10
Views: 9912

Re: MAX with two arguments

adimetrius , I tested your fix and found it perfectly. Thank you! In descritpion of CPlang of MIN and MAX with two arguments: MAX(x, y) <= INTEGER INTEGER the larger value of x and y integer type LONGINT <= SHORTREAL SHORTREAL numeric type REAL SHORTCHAR SHORTCHAR character type CHAR MIN(x, y) <= I...
by Zorko
Fri Nov 08, 2019 8:12 am
Forum: Bug
Topic: Unimplemented feature in SYSTEM.VAL
Replies: 1
Views: 4424

Unimplemented feature in SYSTEM.VAL

Code: Select all

MODULE Test; IMPORT SYSTEM;
VAR r: REAL;
BEGIN
  r := SYSTEM.VAL(REAL, 7FEFFFFFFFFFFFFFL)
END Test.
261 unsupported mode or size of second argument of SYSTEM.VAL
by Zorko
Mon Nov 04, 2019 5:43 pm
Forum: Feature
Topic: Strings concatenation optimisation
Replies: 14
Views: 16871

Re: Strings concatenation optimisation

Note that copying the string is not even in itself, but in some buffer? mov edi, 1677721600 \ mov esi, 1677721606 / not the same address Question: why does BlackBox need this buffer if this optimization case involves using the string itself as the buffer? Still, something tells me that all is not we...
by Zorko
Mon Nov 04, 2019 5:38 pm
Forum: Feature
Topic: Strings concatenation optimisation
Replies: 14
Views: 16871

Re: Strings concatenation optimisation

Then why does the current compiler use string copying in the first operation instead of just counting its length (search 0X)? Specifically calling CPC486.AddCopy and CPV486.AddCopy to do this., i.e.: MODULE TestConcat; VAR a: ARRAY 100 OF CHAR; BEGIN a := a + "abc" (* a := a$ + "abc&q...
by Zorko
Mon Nov 04, 2019 3:57 am
Forum: Feature
Topic: Strings concatenation optimisation
Replies: 14
Views: 16871

Re: Strings concatenation optimisation

luowy is right. I like that he is open to new ideas. Josef has a point too. Please, answer the question: do we have a technical possibility at the time of constructing the concatenation operation of the form s := s + "a" + s to find out whether the string s is present in the chain of adde...
by Zorko
Tue Oct 29, 2019 5:15 pm
Forum: Feature
Topic: Strings concatenation optimisation
Replies: 14
Views: 16871

Re: Strings concatenation optimisation

What about

Code: Select all

s := s + "xxx" + s;
, such operation is now decomposed into three operations:

Code: Select all

s := s; s += "xxx"; s += s;
And the buffer overflow check happens in every operation here. And the search for the final 0X occurs here even twice.