Timeline for Why is the jump address calculation so complex in compiled Solidity code?
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 30, 2017 at 6:06 | comment | added | benjaminion | Thank you, appreciated. It was a lot of work digging around in the compiler source code and Github to investigate this. It's basically just the remains of a failed optimisation. | |
Jul 29, 2017 at 21:44 | history | edited | Badr Bellaj♦ | CC BY-SA 3.0 |
deleted 105 characters in body
|
Jul 29, 2017 at 21:14 | comment | added | Badr Bellaj♦ | @benjaminion you were right i have rushed in my answer because i thought this was related to uint8 (in old compiler) i didn't notice the opcode addresses. I'll award you the bounty. | |
Jul 29, 2017 at 21:08 | history | edited | Badr Bellaj♦ | CC BY-SA 3.0 |
added 52 characters in body
|
Jul 29, 2017 at 20:38 | comment | added | benjaminion |
Yes of course, and I think my answer covers it. It's nothing to do with uint8 - try compling the OP's code with uint16 or bigger, it doesn't change the behaviour of this jump calculation between 0x11 and 01E.
|
|
Jul 29, 2017 at 20:37 | history | edited | Badr Bellaj♦ | CC BY-SA 3.0 |
deleted 76 characters in body
|
Jul 29, 2017 at 20:30 | comment | added | Badr Bellaj♦ | @benjaminion have you read these questions : What is the deal with the code between 0x11 and 0x1E - why is it so cumbersome?Isn't it just a waste of gas to go through all these strange steps just to compute the 0x25 value? Moreover, where is the number 7 in the 0x17 instruction coming from? It seems completely pointless. | |
Jul 29, 2017 at 20:29 | comment | added | benjaminion | This has nothing to do with the jump address calculation in the question. | |
Jul 29, 2017 at 19:54 | history | answered | Badr Bellaj♦ | CC BY-SA 3.0 |