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

Add abi offset #219

Merged
merged 48 commits into from
Apr 26, 2020
Merged

Add abi offset #219

merged 48 commits into from
Apr 26, 2020

Conversation

ShawnYun
Copy link
Contributor

@ShawnYun ShawnYun commented Mar 24, 2020

close #207

  1. Modify the optimizer to record the method entry offset when optimizing code.
  2. Offset of method entry is added when generating abi file.
  3. Remove the auto-insert main method when generating abi file.

@lightszero @shargon @Tommo-L Could you help review the code?

@ShawnYun ShawnYun marked this pull request as ready for review March 24, 2020 08:00
@shargon shargon self-requested a review March 24, 2020 10:41
Copy link
Member

@lightszero lightszero left a comment

Choose a reason for hiding this comment

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

this codes make people confused,
we could do better.

we could let optimizer ouput a label addrConvTable.do not let optimizer to parse module direct.

@lightszero
Copy link
Member

lightszero commented Mar 24, 2020

@ShawnYun I just clear optimizer, check it please and continue.
I think we need a unittest for it too.

@lightszero
Copy link
Member

sorry addrconvtable has bug,only convert labels,I will fix it.

@ShawnYun
Copy link
Contributor Author

@lightszero Thanks, It's better now.

Tommo-L
Tommo-L previously approved these changes Mar 26, 2020
@ShawnYun
Copy link
Contributor Author

Now we can use _engine.ExecuteTestCaseStandard("method_name", arg1, arg2, arg3) to invoke contract method.

@shargon shargon mentioned this pull request Apr 23, 2020
src/Neo.Compiler.MSIL/MSIL/Converter.cs Outdated Show resolved Hide resolved
src/Neo.Compiler.MSIL/MSIL/Converter.cs Outdated Show resolved Hide resolved
Tommo-L
Tommo-L previously approved these changes Apr 24, 2020
Copy link
Contributor

@Tommo-L Tommo-L left a comment

Choose a reason for hiding this comment

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

It's ready for review, @lightszero @shargon could help review it.

lightszero
lightszero previously approved these changes Apr 26, 2020
Copy link
Member

@lightszero lightszero left a comment

Choose a reason for hiding this comment

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

looks good for me,

but conflict by #253

please fix it

@ShawnYun ShawnYun dismissed stale reviews from lightszero and Tommo-L via 575c3d7 April 26, 2020 06:35
@ShawnYun
Copy link
Contributor Author

@lightszero Thanks, Have fixed it.

@lightszero lightszero merged commit 0c68a4f into neo-project:master Apr 26, 2020
return new byte[1] { (byte)value };
}
//[TestMethod]
//public void Test_Optimize_Recalculate_Positive_PUSHA()
Copy link
Member

Choose a reason for hiding this comment

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

Why these tests was removed?

Copy link
Member

Choose a reason for hiding this comment

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

https://github.com/neo-project/neo-devpack-dotnet/pull/252/files#r415749579

This should not have been merged if it didn't work with the unit test, the solution is not to comment the code that doesn't work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@shargon Sorry, I will restore them after I fix the Parser_DeleteDeadCode.

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.

Adjust abi and manifest file
7 participants