Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fixes & changes in InvokeCall.inc #225

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

Vizit0r
Copy link
Contributor

@Vizit0r Vizit0r commented Mar 2, 2020

  1. added type "Variant" to params types list
  2. added Interface to result types list
  3. Changed flag IsStatic for x64 for "String" type, so Strings will be passed and returned to\from Delphi methods correctly in x64.
  4. added notice about using types-synonyms

Issue numbers:
#219
#218
#217

2) added Interface to result types list
3) Changed flag IsStatic for x64 for "String" type, so Strings will be passed and returned to\from Delphi methods correctly in x64.
4) added notice about using types-synonyms
@Vizit0r Vizit0r changed the title 1) added type "Variant" to params types list Bug fixes & changes in InvokeCall.inc Mar 2, 2020
@Vizit0r
Copy link
Contributor Author

Vizit0r commented Mar 6, 2020

@martijnlaan

@carlokok
Copy link
Member

@Vizit0r Can you check the conflict? I'll try to merge it next week.

@Vizit0r
Copy link
Contributor Author

Vizit0r commented Sep 30, 2020

@Vizit0r Can you check the conflict? I'll try to merge it next week.

@carlokok

Negative, atm i'm at work with only smartphone on hand. Will back home after 3-4 week only.

The best will be to wait, if possible. I will check it all again once will be near home pc, and report to you.

@pult
Copy link

pult commented Oct 31, 2020

Some ideas for "openarray,record,set,fpc,xe3"
https://github.com/pult/pascalscript/blob/pult/Source/InvokeCall.inc

@Vizit0r
Copy link
Contributor Author

Vizit0r commented Nov 6, 2020

@carlokok i remember 1 thing, whick cause changes all over the PS files.
in Delphi in x64 POSIX "LongInt" type will have 8 bytes size. All other systems - 4 bytes size.
In FPC this type have constant size 4b anywhere.
same for Integer - in FPC in x64 it has 8b size, in Delphi anywhere - 4b.
My decision was to make define

{$IFDEF FPC}
LongInt4b = LongInt;
{$ELSE}
LongInt4b = Integer;
{$ENDIF}

but in this case ALL "LongInt" in ALL PS files must be changed to LongInt4b. Looks not so good.
Without this changes - all is dying in POSIX x64.

All other changes still checking. Also, will look @pult InvokeCall.inc

@Vizit0r

This comment has been minimized.

@Vizit0r
Copy link
Contributor Author

Vizit0r commented Nov 16, 2020

Discord not work for me :(
Telegram: ....

Joined.

@Vizit0r
Copy link
Contributor Author

Vizit0r commented Nov 16, 2020

@pult i cant write you, thats not a chat, but channel.

Vizit0r and others added 2 commits December 8, 2020 21:23
…Ptr in x64, should be fully rewritten @MyAllMethodsHandler & MyAllMethodsHandler2)

Tests for Android will be done in 1-2 days, after finish will update + attach tests.
1) added support of all 64bits platform on Delphi (not only intel x64). Also Delphi 10.4 added.
2) InvokeCall.inc fully tested (about tests later on) in Delphi on Win x86 + x64, MacOs x64, Linux x64, Android 32b + 64. IOS not tested (i have no iphone etc), and simulator is very slow). All PS types supported, in params and result.
3) Included folder "Invoke Tests", which contains tests for Delphi VCL (Win) + Delphi FMX(all paltforms) + FPC.
4) FPC failed almost all tests. I have not enough FPC skills and power to find a right way with ugly debugger in FPC Invocation, who is strong enough - finish it pls.
5) about calling scripts methods from Delphi for non-Windows systems - its still not completed, i have no time at the moment for this - but i know the way, and will do this later on. It's not the most important and popular thing, really.
@Vizit0r
Copy link
Contributor Author

Vizit0r commented Dec 15, 2020

@carlokok i have finished all.
As described in last commit, big problems with FPC there. Need someone, who have good skills in FPC, to finish its part in InvokeCall.inc. In Delphi all works fine. Tests for checking included in folder "Invoke Tests"
All tested in Delphi, all systems, including Android 64.
Also read remark in commit about calling script methods from Delphi in non-Win systems.

@martijnlaan
Copy link
Collaborator

martijnlaan commented Dec 28, 2020

This is pull request shouldn't be merged as-is in my opinion: the commits contain lots of undocumented and therefore unexplained changes.

I still believe #205 and #207 should be reverted to bring ROPS back to a usable state.

@Vizit0r
Copy link
Contributor Author

Vizit0r commented Dec 28, 2020

okey guys, revert changes, as you want.
If nobody interested in multiplatform - no problem. Sit more on Win only, with existed documented and explained (really, no) code.
For me and two hundreds of my users it works fine on Linux&Windows&Macos, thats was my goal. I try to publish my code for community, to make a pleasure for other developers, but if the problem is "undocumented code" - okey, forgot it.

Tests - its also nothing, code is undocumented.

Normally, who wants to see the explanation - read a commits comments. Have no idea, why you dont want to go this way.

Good bye, and happy new year.

@martijnlaan
Copy link
Collaborator

Just giving my opinion, it's up to Carlo what happens.

It's a fact though that your commits contain changes which don't match the commit descriptions like 8ef297c which has an additional debugger related change and 3b2cabe which has an additional change that looks like a memory leak fix. These are just 2 examples. These changes might be good and intentional but that can't be seen from your descriptions.

I've pointed this out in earlier commits by you which also contained unexplained changes.

One of the commits has a change to uPSRuntime so large that Github can't even display it.

This isn't how you're supposed to make pull requests. Here's a good explainer if you're interested: https://www.jamescroft.co.uk/a-guide-to-making-a-good-pull-request/ The biggest problem of a pull request like this one that it's way too big and doesn't focus on a specific area, making it impossible to properly review.

@Vizit0r
Copy link
Contributor Author

Vizit0r commented Dec 28, 2020

i've not comment EVERY small change, if its not critical or important. F.e. in 8ef297c adding one more condition for checking in "LineInfo" - thats for preventing error, which my user have, very rare error, but its exists. Thats much more explanation, what its done for, than real code. Others same.

I have a lot of changes, which i dont include in my commits, because i'm not sure it can be useful for someone else.

About the rules of commiting - i've never read it, works only with repos alone or in small commands, there were no any problems with my commitment style.

Anyway, @carlokok should decide. If question only in commits styling, i can spent a lot of time and divide them again, but size of some of them cant be decreased.

@zedxxx
Copy link
Contributor

zedxxx commented Dec 29, 2020

Resolves #241

@Vizit0r
Copy link
Contributor Author

Vizit0r commented Jan 7, 2021

Additionally, I beleive Data^[l] and Items[l] point to the same thing so this change doesn't do anything except making the 2 places inconsistent.

Thats jut to to access field in same manner, as all over the PS code.

@Vizit0r The old code where it uses Data is still present in TPSExec.Destroy. Shouldn't it be changed there too?

i dont make an aim to change it anywhere, what i see - i change to common manner.

Vizit0r added 5 commits February 10, 2021 23:59
… - decided to use RTTI types prior to "TypeByKindSize" (with caching RTTI types for corresponding script types names)

2) in uPSRuntime.pas added "Generics.Collections," to uses + fixed invokecall define in FPC
3) fixed bug in uPSPreProcessor.pas for correct parsing of non-Win linebreaks (remobjects#10 instead of remobjects#13#10 in Win).
4) Added POSIX define to uPSPreProcessor.pas
Nothing so, just some small fixes & changes.

P.S. InvokeCall works like a charm.
{$IFDEF DELPHI2009UP}
IPointer = NativeUInt;
{$IFDEF VER140UP}
IPointer = NativeInt;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you change this definition? #233

Copy link
Contributor Author

@Vizit0r Vizit0r Nov 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, have no idea, why VER140 was written there.
P.S. Native(U)Int coming from XE2, not from 2009.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, look into #233 - you should change all definition block for IPointer.

Versions prior XE2 do not have support Win64 at all, so you don't need to check for CPU64 etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants