@@ -66,6 +66,18 @@ function getRowWidth(): number {
6666 return maxTotalWidth .value ;
6767}
6868
69+ function getTitle(section_name : string ): string {
70+ if (section_name === " Frontend" ) {
71+ return " Lexing, parsing, macro expansion, borrow checking, type checking, trait solving, ..." ;
72+ } else if (section_name === " Backend" ) {
73+ return " Monomorphization, MIR-to-IR conversion, backend (LLVM/Cranelift/...) code generation" ;
74+ } else if (section_name === " Linker" ) {
75+ return " Linking of the final artifact (with bfd/lld/...)" ;
76+ } else {
77+ return " " ;
78+ }
79+ }
80+
6981const chartRows: ComputedRef <Array <[string , CompilationSections ]>> = computed (
7082 () => [
7183 [" Before" , props .before ],
@@ -105,6 +117,7 @@ const activeSection: Ref<string | null> = ref(null);
105117function activate(section : string ) {
106118 activeSection .value = section ;
107119}
120+
108121function deactivate() {
109122 activeSection .value = null ;
110123}
@@ -176,6 +189,7 @@ function deactivate() {
176189 @mouseenter =" activate(item.section.name)"
177190 @mouseleave =" deactivate"
178191 :class =" {active: activeSection === item.section.name}"
192+ :title =" getTitle(item.section.name)"
179193 >
180194 <td >
181195 <div class =" color" :style =" {backgroundColor: item.color}" ></div >
@@ -196,6 +210,7 @@ function deactivate() {
196210 display : flex ;
197211 align-items : center ;
198212}
213+
199214.chart {
200215 display : flex ;
201216 justify-content : flex-end ;
@@ -240,6 +255,7 @@ function deactivate() {
240255.section :last-child {
241256 border-radius : 0 5px 5px 0 ;
242257}
258+
243259.legend {
244260 margin-left : 40px ;
245261
@@ -249,13 +265,16 @@ function deactivate() {
249265 padding : 5px ;
250266 }
251267 }
268+
252269 .color {
253270 width : 15px ;
254271 height : 15px ;
255272 }
273+
256274 .active {
257275 font-weight : bold ;
258276 }
277+
259278 .name {
260279 margin-left : 5px ;
261280 }
0 commit comments