hyperledger / solang

Solidity Compiler for Solana and Polkadot
https://solang.readthedocs.io/
Apache License 2.0
1.22k stars 207 forks source link

Duplicate code (part 5) #1265

Open LucasSte opened 1 year ago

LucasSte commented 1 year ago

1.

https://github.com/hyperledger/solang/blob/1b46d73b32449a09ba1c1e54c8073ecb4d7cf4a0/src/emit/substrate/target.rs#L364-L371

https://github.com/hyperledger/solang/blob/1b46d73b32449a09ba1c1e54c8073ecb4d7cf4a0/src/emit/substrate/target.rs#L452-L459

https://github.com/hyperledger/solang/blob/1b46d73b32449a09ba1c1e54c8073ecb4d7cf4a0/src/emit/substrate/target.rs#L528-L535

https://github.com/hyperledger/solang/blob/1b46d73b32449a09ba1c1e54c8073ecb4d7cf4a0/src/emit/substrate/target.rs#L638-L645

======================================== 2.

https://github.com/hyperledger/solang/blob/1b46d73b32449a09ba1c1e54c8073ecb4d7cf4a0/src/sema/types.rs#L588-L594

https://github.com/hyperledger/solang/blob/1b46d73b32449a09ba1c1e54c8073ecb4d7cf4a0/src/sema/types.rs#L682-L689

======================================== 3.

https://github.com/hyperledger/solang/blob/1b46d73b32449a09ba1c1e54c8073ecb4d7cf4a0/src/codegen/vector_to_slice.rs#L60-L65

https://github.com/hyperledger/solang/blob/1b46d73b32449a09ba1c1e54c8073ecb4d7cf4a0/src/codegen/vector_to_slice.rs#L79-L83

https://github.com/hyperledger/solang/blob/1b46d73b32449a09ba1c1e54c8073ecb4d7cf4a0/src/codegen/vector_to_slice.rs#L91-L95

Arun9650 commented 1 year ago

hi i like to take this issue , so we need to just remove the duplicate the code

LucasSte commented 1 year ago

Hi @Arun9650 , Yes, the idea is just to remove the duplicate code using either functions or Rust macros.

seanyoung commented 1 year ago

hi i like to take this issue , so we need to just remove the duplicate the code

Great, go for it! Please let us know if you have any questions.

Sanket-0510 commented 1 year ago

hello, I would like to take this issue, I have started working to fix repetitive code by adding function to generate the pointer in target.rs, I would like to show you code to check if am going in right direction and also the naming convention I am using for it is correct or not.

LucasSte commented 1 year ago

hello, I would like to take this issue, I have started working to fix repetitive code by adding function to generate the pointer in target.rs, I would like to show you code to check if am going in right direction and also the naming convention I am using for it is correct or not.

Ah, thanks for your contribution. We've seen your PR.

mayank-pathakk commented 1 year ago

Is this issue still open ? If yes, I'd like to work on it

LucasSte commented 1 year ago

Is this issue still open ? If yes, I'd like to work on it

Hey @mayank-pathakk, Yes, the issue is still open. You can work on it.

Nirhar commented 1 month ago

I'd like to work on this issue, if its still open!