Comments (4)
Should we differentiate between functions, like selector()
that compute a value, and include()
which copies opcodes?
from etk.
We could use %include "..."
instead?
from etk.
There's also two possible use cases here:
- Separating code logic - in which case, the code should not have been processed yet
- Writing a contract deploy wrapper - here, the code should have been processed so the label values are filled in.
I'm inclined for include(...)
to do the first, but not certain how to handle the second. assemble(...)
maybe? include_assembled(...)
?
from etk.
I think there are actually three cases:
- Unassembled instructions, for organization/reuse.
- Assembled instructions, for initcode.
- Copy bytes, for including the output of other tools, special data/constants, etc.
I like include(...)
for (1), and maybe include_bytes(...)
or include_hex(...)
for (3).
As for (2)... I think I'm partial to include_asm
or include_assembled
.
I think we want user-defined macros that generate instructions to look the same as the include macros. I don't know if that means using a %
or something else. I guess as long as we're consistent?
from etk.
Related Issues (20)
- Add release binaries HOT 1
- Brainstorm how to insert constants into code while constructing a contract
- Create built-in instruction macros `%hex("...")` and `%string("...")`
- Syntax for specifying exact bytecode offset
- Assertion fails when assembling with two delayed definition instruction macros
- eas: Provide assembly code as argument
- Not possible to specify an opcode directly in hex HOT 2
- `disease` takes ~34s to run on a trivial example when built in debug mode HOT 1
- Add `PREVRANDAO`
- eas assembles broken contracts when the body is split in multiple includes HOT 1
- disease doesn't process truncated PUSH arguments correctly
- If trying to use an undefined label and an undefined macro, etk panics
- ETK Website HOT 2
- labels are not adjusted when including files HOT 5
- Labels are misaligned after using push20 HOT 2
- Labels are sometimes misaligned when using macros
- Parsing error should output original file location
- Wrong parameters for MStore and MStore8 HOT 1
- Assembler panic when instruction macro has a push macro inside
- ecfg panics on certain contracts HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from etk.