You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Changelog.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,10 @@
3
3
Language Features:
4
4
5
5
Compiler Features:
6
+
* Commandline Interface: Introduce `--experimental` flag required for enabling the experimental mode.
7
+
* General: Restrict the existing experimental features (`generic-solidity`, `lsp`, `ethdebug`, `eof`, `evm`, `ast-import`, `evmasm-import`, `ir-ast`, `ssa-cfg`) to experimental mode.
8
+
* Metadata: Store the state of the experimental mode in JSON and CBOR metadata. In CBOR this broadens the meaning of the existing `experimental` field, which used to indicate only the presence of certain experimental pragmas in the source.
9
+
* Standard JSON Interface: Introduce `settings.experimental` setting required for enabling the experimental mode.
// ir - Yul intermediate representation of the code before optimization
438
-
// irAst - AST of Yul intermediate representation of the code before optimization
445
+
// irAst - AST of Yul intermediate representation of the code before optimization (experimental)
439
446
// irOptimized - Intermediate representation after optimization
440
-
// irOptimizedAst - AST of intermediate representation after optimization
441
-
// storageLayout - Slots, offsets and types of the contract's state variables in storage.
442
-
// transientStorageLayout - Slots, offsets and types of the contract's state variables in transient storage.
447
+
// irOptimizedAst - AST of intermediate representation after optimization (experimental)
448
+
// storageLayout - Slots, offsets and types of the contract's state variables in storage
449
+
// transientStorageLayout - Slots, offsets and types of the contract's state variables in transient storage
443
450
// evm.assembly - New assembly format
444
451
// evm.legacyAssembly - Old-style assembly format in JSON
452
+
// evm.bytecode.ethdebug - Debug information in ethdebug format (ethdebug/format/program schema). Can only be requested when compiling via IR. (experimental)
453
+
// evm.deployedBytecode.ethdebug - Like evm.bytecode.ethdebug, but for the runtime part of the contract (experimental)
445
454
// evm.bytecode.functionDebugData - Debugging information at function level
446
455
// evm.bytecode.object - Bytecode object
447
456
// evm.bytecode.opcodes - Opcodes list
@@ -452,6 +461,7 @@ Input Description
452
461
// evm.deployedBytecode.immutableReferences - Map from AST ids to bytecode ranges that reference immutables
453
462
// evm.methodIdentifiers - The list of function hashes
454
463
// evm.gasEstimates - Function gas estimates
464
+
// yulCFGJson - Control Flow Graph (CFG) of the Single Static Assignment (SSA) form of the contract (experimental)
455
465
//
456
466
// Note that using `evm`, `evm.bytecode`, etc. will select every
457
467
// target part of that output. Additionally, `*` can be used as a wildcard to request everything.
@@ -604,6 +614,8 @@ Output Description
604
614
"legacyAssembly": {},
605
615
// Bytecode and related details.
606
616
"bytecode": {
617
+
// Ethdebug output (experimental)
618
+
"ethdebug": {/* ... */},
607
619
// Debugging data at the level of functions.
608
620
"functionDebugData": {
609
621
// Now follows a set of functions including compiler-internal and
@@ -646,6 +658,8 @@ Output Description
646
658
}
647
659
},
648
660
"deployedBytecode": {
661
+
// Ethdebug output (experimental)
662
+
"ethdebug": {/* ... */},
649
663
/* ..., */// The same layout as above.
650
664
"immutableReferences": {
651
665
// There are two references to the immutable with AST ID 3, both 32 bytes long. One is
@@ -670,11 +684,15 @@ Output Description
670
684
"internal": {
671
685
"heavyLifting()":"infinite"
672
686
}
673
-
}
687
+
},
688
+
// Yul CFG representation of the SSA form (experimental)
689
+
"yulCFGJson": {/* ... */}
674
690
}
675
691
}
676
692
}
677
-
}
693
+
},
694
+
// Global Ethdebug output (experimental)
695
+
"ethdebug": {/* ... */ }
678
696
}
679
697
680
698
@@ -696,3 +714,57 @@ Error Types
696
714
13. ``YulException``: Error during Yul code generation - this should be reported as an issue.
697
715
14. ``Warning``: A warning, which didn't stop the compilation, but should be addressed if possible.
698
716
15. ``Info``: Information that the compiler thinks the user might find useful, but is not dangerous and does not necessarily need to be addressed.
717
+
718
+
.. index:: ! Experimental mode, ! --experimental
719
+
.. _experimental-mode:
720
+
721
+
Experimental Mode
722
+
*****************
723
+
724
+
Some language and compiler features included in stable releases are not themselves considered stable.
725
+
They are sparsely documented, if at all, often not adequately tested, and thus not yet intended for production use.
726
+
In many cases it is possible to develop a big feature incrementally, with each iteration being already stable.
727
+
Sometimes, however, it is preferable to start with a prototype and stabilize it over multiple releases, while receiving feedback from users.
728
+
To prevent accidental use, such features can be only accessed by enabling the experimental mode.
729
+
730
+
There are no backwards compatibility guarantees for experimental features.
731
+
They are subject to change in breaking ways in non-breaking releases of the compiler.
732
+
Only major changes affecting them are recorded in the changelog.
733
+
734
+
To enable the experimental mode, use the ``--experimental`` flag on the command line,
735
+
or the analogous ``settings.experimental`` boolean setting in the Standard JSON input.
736
+
737
+
Note that the use of this mode is recorded in the metadata:
738
+
739
+
- ``experimental`` flag in CBOR metadata is set to ``true``,
740
+
- ``settings.experimental`` in JSON metadata is set to ``true``,
741
+
742
+
.. note::
743
+
Prior to version 0.8.34, most of the experimental features were usable without any extra safeguards.
744
+
Some were gated behind ``pragma experimental``, but this was not done consistently.
745
+
The information about them was also only recorded in CBOR metadata and even then not always.
746
+
The main goal of the experimental mode is to systematize this and make users fully aware when relying on features which are unfinished or not production-ready.
747
+
748
+
The table below details all currently available experimental features.
0 commit comments