Skip to content

Commit

Permalink
Merge branch 'master' into fix/alloca
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-cooper authored Nov 22, 2024
2 parents 0d22091 + f38b61a commit 280d732
Show file tree
Hide file tree
Showing 5 changed files with 238 additions and 164 deletions.
7 changes: 6 additions & 1 deletion docs/compiling-a-contract.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Include the ``-f`` flag to specify which output formats to return. Use ``vyper -

.. code:: shell
$ vyper -f abi,abi_python,bytecode,bytecode_runtime,blueprint_bytecode,interface,external_interface,ast,annotated_ast,integrity,ir,ir_json,ir_runtime,asm,opcodes,opcodes_runtime,source_map,source_map_runtime,archive,solc_json,method_identifiers,userdoc,devdoc,metadata,combined_json,layout yourFileName.vy
$ vyper -f abi,abi_python,bb,bb_runtime,bytecode,bytecode_runtime,blueprint_bytecode,cfg,cfg_runtime,interface,external_interface,ast,annotated_ast,integrity,ir,ir_json,ir_runtime,asm,opcodes,opcodes_runtime,source_map,source_map_runtime,archive,solc_json,method_identifiers,userdoc,devdoc,metadata,combined_json,layout yourFileName.vy
.. note::
The ``opcodes`` and ``opcodes_runtime`` output of the compiler has been returning incorrect opcodes since ``0.2.0`` due to a lack of 0 padding (patched via `PR 3735 <https://github.com/vyperlang/vyper/pull/3735>`_). If you rely on these functions for debugging, please use the latest patched versions.
Expand Down Expand Up @@ -134,6 +134,11 @@ In codesize optimized mode, the compiler will try hard to minimize codesize by
* out-lining code, and
* using more loops for data copies.

Enabling Experimental Code Generation
===========================

When compiling, you can use the CLI flag ``--experimental-codegen`` or its alias ``--venom`` to activate the new `Venom IR <https://github.com/vyperlang/vyper/blob/master/vyper/venom/README.md>`_.
Venom IR is inspired by LLVM IR and enables new advanced analysis and optimizations.

.. _evm-version:

Expand Down
10 changes: 10 additions & 0 deletions docs/structure-of-a-contract.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ EVM Version

The EVM version can be set with the ``evm-version`` pragma, which is documented in :ref:`evm-version`.

Experimental Code Generation
-----------------
The new experimental code generation feature can be activated using the following directive:

.. code-block:: vyper
#pragma experimental-codegen
Alternatively, you can use the alias ``"venom"`` instead of ``"experimental-codegen"`` to enable this feature.

Imports
=======

Expand Down
Loading

0 comments on commit 280d732

Please sign in to comment.