Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 00:11
    cameel synchronize #10752
  • 00:11

    cameel on yulopti-option-order

    [yulopti] Print options in colu… [yulopti] Sort options by step … [yulopti] Rewrite the check aga… (compare)

  • Jan 15 23:37
    cameel commented #10166
  • Jan 15 21:53
    axic synchronize #10643
  • Jan 15 21:53

    axic on v1

    Replace ABIEncoderV1Only with c… Update tests (compare)

  • Jan 15 21:48

    axic on develop

    Replace "pragma experimental AB… Merge pull request #10795 from … (compare)

  • Jan 15 21:48

    axic on improve-experimental-pragma-tests

    (compare)

  • Jan 15 21:48
    axic closed #10795
  • Jan 15 21:30
    axic commented #10390
  • Jan 15 21:29
    axic commented #10390
  • Jan 15 21:29
    axic closed #10780
  • Jan 15 21:28
    axic commented #10390
  • Jan 15 21:24
    cameel commented #10190
  • Jan 15 21:14
    cameel assigned #10797
  • Jan 15 21:14
    cameel opened #10797
  • Jan 15 21:12
    axic edited #10643
  • Jan 15 21:11
    axic synchronize #10643
  • Jan 15 21:11

    axic on v1

    Replace ABIEncoderV1Only with c… Update tests (compare)

  • Jan 15 21:07
    cameel ready_for_review #10792
  • Jan 15 21:07

    cameel on refactor-and-shellcheck-cleanup-in-report-errors-sh

    check_style.sh: Fix incorrect c… (compare)

mijovic
@mijovic:matrix.org
[m]
it generates invalid IR
ekpyron
@daniel:ekpyron.org
[m]
Sounds like my fault :-).
mijovic
@mijovic:matrix.org
[m]
if (_lhs.type() == _rhs.type())
        for (auto const& [stackItemName, stackItemType]: _lhs.type().stackItems())
            if (stackItemType)
                declareAssign(_lhs.part(stackItemName), _rhs.part(stackItemName), _declare);
            else
                m_code << (_declare ? "let ": "") << _lhs.part(stackItemName).name() << " := " << _rhs.part(stackItemName).name() << "\n";
    else
    {
        if (_lhs.type().sizeOnStack() > 0)
            m_code <<
                (_declare ? "let ": "") <<
                _lhs.commaSeparatedList() <<
                " := ";
        m_code << m_context.utils().conversionFunction(_rhs.type(), _lhs.type()) <<
            "(" <<
            _rhs.commaSeparatedList() <<
            ")\n";
    }
_rhs.commaSeparatedList() is not defined
I mean it generates identifier that is not defined
ekpyron
@daniel:ekpyron.org
[m]
A bit weird though... this ultimately comes from the assignment visit and the RHS should be visited by then...
Ah!
I see!
The assignment doesn't define itself as having the value it was assigned... or sth like that at least :-)...
Or hm... actually it appears to do that...
    if (
        m_currentLValue->type.category() != Type::Category::Struct &&
        m_currentLValue->type.category() != Type::Category::Array &&
        *_assignment.annotation().type != *TypeProvider::emptyTuple()
    )
        define(_assignment, value);
Ah, it doesn't do it here...
I wonder why arrays and structs are excluded there...
My guess would be it might just be fixed by doing this as well for structs and arrays (it's in the end of the assignment visitor)...
mijovic
@mijovic:matrix.org
[m]
I'll need to move now, will check it later after late lunch :) But, I think I added those two conditions over there for some reason, will need to check that
ekpyron
@daniel:ekpyron.org
[m]
You specifically added them at least :-D.
mijovic
@mijovic:matrix.org
[m]
If I am correct you did a review :-P
ekpyron
@daniel:ekpyron.org
[m]
Well possible :-).
hrkrshnn
@hrkrshnn:matrix.org
[m]
axic: What was your idea behind implementing shortcut for address.code.size?
axic
@axic:matrix.org
[m]
I had no idea, it was @chriseth idea :)
I would have preferred .codesize to be honest.
But somehow in codegen you need to find that code.size expression and treat it in a special way.
hrkrshnn
@hrkrshnn:matrix.org
[m]
But then address.code would already get generated a certain way. It's a bit tricky to implement it as a shortcut
axic
@axic:matrix.org
[m]
Even if it is generated, it would be dead code so be removed, isn't it ?
leo
@leonardoalt:matrix.org
[m]
axic
@axic:matrix.org
[m]
So are you saying @mijovic and ekpyron is the same person?
chriseth
@chriseth
<address>.code.length
leo
@leonardoalt:matrix.org
[m]
nothing better as the last act before the weekend
hrkrshnn
@hrkrshnn:matrix.org
[m]

Even if it is generated, it would be dead code so be removed, isn't it ?

Not even the optimizer can remove it because it has an mstore.

chriseth
@chriseth
memory objects!
Daniel Kirchner
@ekpyron
We could just have a visit(MemberAccess) that on seeing .length checks if it's expression is .codeon an address and then not visit it at all, couldn't we? Not that it's nice, but...
chriseth
@chriseth
sure, we do that all the time for libraries, for example
leo
@leonardoalt:matrix.org
[m]
does selfdestruct interrupt execution?
1 reply
ekpyron
@daniel:ekpyron.org
[m]
    if (
        m_currentLValue->type.category() != Type::Category::Struct &&
        m_currentLValue->type.category() != Type::Category::Array &&
        *_assignment.annotation().type != *TypeProvider::emptyTuple()
    )
        define(_assignment, value);
@mijovic I think replacing this with the following should work (still talking about the end of the assignment visit):
    if(dynamic_cast<ReferenceType const*>(&m_currentLValue->type))
        define(_assignment, readFromLValue(*m_currentLValue));
    else if (*_assignment.annotation().type != *TypeProvider::emptyTuple())
        define(_assignment, value);
Should have noticed that when reviewing back then ;-).
But yeah - the assignment should still be defined even for reference types and readFromLValue for reference types will just give you the slot/offset or memory offset to define things from. Needs to be properly tested, but I think that's it.
For storage at least... for memory you need to double-check :-).
ekpyron
@daniel:ekpyron.org
[m]
For memory it might needlessly result in a mstore(x, ...) let v := mload(x), but since the optimizer should resolve that, it should also be fine.
hrkrshnn
@hrkrshnn:matrix.org
[m]
The mstore(x, ...) will still remain though, which is quite annoying.
ekpyron
@daniel:ekpyron.org
[m]
The mstore is from the actual assignment - that has to be there anyways, so it's fine :-).
I.e. it's x = y = z; and the mstore stores to y - the mload just reads that back to assign further to x.
hrkrshnn
@hrkrshnn:matrix.org
[m]
Ah, I see.
ekpyron
@daniel:ekpyron.org
[m]
(Or actually rather x = y[0] = z; or sth)
Kamil Śliwak
@cameel
Looks like one more fix is needed for the dates in bytecode compare: #10791.
axic
@axic:matrix.org
[m]
Another testing idea, how about instead of these various checks for specific pragmas/license, there would be a flag: preamble: none which disables inserting any.
Also of course found some weird bug again 😕
axic
@axic:matrix.org
[m]
Anyone wants to approve ethereum/solidity#10794 ?
I have some incremental PRs cleaning up some pragma/abiencoder stuff leading up to #10643
axic
@axic:matrix.org
[m]
StackenBotten
@stackenbotten
❌ Nightly job t_ubu_ossfuzz failed on develop. Please see https://circleci.com/gh/ethereum/solidity/590853 for details.
✅ Nightly job t_ems_test_ext_colony succeeded on develop. Please see https://circleci.com/gh/ethereum/solidity/590849 for details.