File tree 2 files changed +13
-0
lines changed 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -278,6 +278,12 @@ The ID ``0`` is reserved for uninitialized function pointers which then cause a
278
278
In the old code generator, internal function pointers are initialized with a special function that always causes a panic.
279
279
This causes a storage write at construction time for internal function pointers in storage.
280
280
281
+ .. note ::
282
+ The compiler is free to omit internal functions that are never explicitly referenced by name.
283
+ As a consequence, assigning to a function type variable in inline assembly does not guarantee
284
+ that the assigned value will be included in the internal dispatch.
285
+ The function must also be explicitly referenced elsewhere in the code.
286
+
281
287
Cleanup
282
288
-------
283
289
Original file line number Diff line number Diff line change @@ -894,6 +894,13 @@ the contract code is never going to be updated.
894
894
It is also always possible to side-step any safeguards by using inline assembly.
895
895
Such use always needs careful consideration.
896
896
897
+ .. note ::
898
+ The removal of unused internal functions only takes into account explicit references to
899
+ such functions by name.
900
+ Implicit references, such as assigning a new value to a function type variable in inline assembly
901
+ may still lead to the removal of the function if it is not also referenced explicitly elsewhere
902
+ in the source.
903
+
897
904
Examples
898
905
^^^^^^^^
899
906
You can’t perform that action at this time.
0 commit comments