Skip to content

Instantly share code, notes, and snippets.

@cgewecke
Last active June 23, 2017 21:25
Show Gist options
  • Save cgewecke/8989ee02fe56899b2441be008fa0f5b5 to your computer and use it in GitHub Desktop.
Save cgewecke/8989ee02fe56899b2441be008fa0f5b5 to your computer and use it in GitHub Desktop.

AST for:

assembly {
    mstore(0x40, sload(0))
    address(0)
    byte(0)
    return(0x40,32)
}
{
"type": "InlineAssemblyStatement",
"body": {
 "type": "InlineAssemblyBlock",
 "items": [
  {
   "type": "FunctionalAssemblyInstruction",
   "name": {
    "type": "Identifier",
    "name": "mstore",
    "start": 7647,
    "end": 7653
   },
   "arguments": [
    {
     "type": "Literal",
     "value": "0x40",
     "start": 7654,
     "end": 7658
    },
    {
     "type": "FunctionalAssemblyInstruction",
     "name": {
      "type": "Identifier",
      "name": "sload",
      "start": 7660,
      "end": 7665
     },
     "arguments": [
      {
       "type": "Literal",
       "value": 0,
       "start": 7666,
       "end": 7667
      }
     ],
     "start": 7660,
     "end": 7668
    }
   ],
   "start": 7647,
   "end": 7669
  },
  {
   "type": "FunctionalAssemblyInstruction",
   "name": {
    "type": "Identifier",
    "name": "byte",
    "start": 7678,
    "end": 7682
   },
   "arguments": [
    {
     "type": "Literal",
     "value": 0,
     "start": 7683,
     "end": 7684
    }
   ],
   "start": 7678,
   "end": 7685
  },
  {
   "type": "FunctionalAssemblyInstruction",
   "name": {
    "type": "Identifier",
    "name": "address",
    "start": 7694,
    "end": 7701
   },
   "arguments": [
    {
     "type": "Literal",
     "value": 0,
     "start": 7702,
     "end": 7703
    }
   ],
   "start": 7694,
   "end": 7704
  },
  {
   "type": "FunctionalAssemblyInstruction",
   "name": {
    "type": "Identifier",
    "name": "return",
    "start": 7713,
    "end": 7719
   },
   "arguments": [
    {
     "type": "Literal",
     "value": "0x40",
     "start": 7720,
     "end": 7724
    },
    {
     "type": "Literal",
     "value": 32,
     "start": 7725,
     "end": 7727
    }
   ],
   "start": 7713,
   "end": 7728
  }
 ],
 "start": 7637,
 "end": 7734
},
"start": 7628,
"end": 7734
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment