dplassgit / d2lang

D2 is a strongly-typed, statically-typed, (mostly) inferred-type compiled language.
MIT License
6 stars 1 forks source link

CallCodeGenerator is pushing args on the stack if there are > 3 (should be > 4) #253

Closed dplassgit closed 10 months ago

dplassgit commented 1 year ago

https://github.com/dplassgit/d2lang/blob/18378e5779f29ca3c3e9f01dfa9d99ba43bf9eae/src/com/plasstech/lang/d2/codegen/x64/CallCodeGenerator.java#LL77C1-L78C1

dplassgit commented 1 year ago

This isn't tragic because the subsequent loop stops at argument 5 as expected.

sailee987 commented 1 year ago

How to run the project and view the output

dplassgit commented 1 year ago

How to run the project and view the output

See the README: https://github.com/dplassgit/d2lang#installing

sailee987 commented 1 year ago

I have imported the project in eclipse. How to run the project to view the output?

JavaProject

dplassgit commented 1 year ago

This project is a compiler. There is no UI so you can't just "run the project."

If you want to run a test, find the test in the package explorer and use the "Run" menu: Run/Run as/JUnit Test.

You can probably start with NasmCodeGeneratorProcTest.java to see if anything breaks.

As mentioned in the README you must have nasm and gcc installed, even when running within Eclipse.

For more information about how to use Eclipse, try www.eclipse.org

Ankit8848 commented 1 year ago

@dplassgit is this issue resolved?

dplassgit commented 1 year ago

No.

Ankit8848 commented 1 year ago

@dplassgit sir, here only I have to change 3 to 4 ?

dplassgit commented 1 year ago

@dplassgit sir, here only I have to change 3 to 4 ?

Pretty much, yes. I don't think it's feasible to write a targeted test for that bugfix