Skip to content

Commit f824164

Browse files
Document that local optimisations assumes final fields are final
1 parent cd035b2 commit f824164

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

docs/docs/reference/optimisations.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
layout: doc-page
3+
title: "Local Optimisations"
4+
---
5+
6+
The Dotty compiler implements several local optimisations to generate faster bytecode. These optimisations can be enabled by compiling with the `-optimise` flag. The current best source of documentation about what tree transformations are performed under `-optimise` is the Scaladoc classes in the [localopt package](https://github.com/lampepfl/dotty/tree/master/compiler/src/dotty/tools/dotc/transform/localopt).
7+
8+
Local optimisations assumes no use of Java Reflection to mutate static final fields.

docs/sidebar.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ sidebar:
5151
url: docs/reference/auto-parameter-tupling.html
5252
- title: Named Type Arguments
5353
url: docs/reference/named-typeargs.html
54+
- title: Local Optimisations
55+
url: docs/reference/optimisations.html
5456
- title: Changed Features
5557
subsection:
5658
- title: Volatile Lazy Vals

0 commit comments

Comments
 (0)