@@ -66,6 +66,18 @@ function getRowWidth(): number {
66
66
return maxTotalWidth .value ;
67
67
}
68
68
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
+
69
81
const chartRows: ComputedRef <Array <[string , CompilationSections ]>> = computed (
70
82
() => [
71
83
[" Before" , props .before ],
@@ -105,6 +117,7 @@ const activeSection: Ref<string | null> = ref(null);
105
117
function activate(section : string ) {
106
118
activeSection .value = section ;
107
119
}
120
+
108
121
function deactivate() {
109
122
activeSection .value = null ;
110
123
}
@@ -176,6 +189,7 @@ function deactivate() {
176
189
@mouseenter =" activate(item.section.name)"
177
190
@mouseleave =" deactivate"
178
191
:class =" {active: activeSection === item.section.name}"
192
+ :title =" getTitle(item.section.name)"
179
193
>
180
194
<td >
181
195
<div class =" color" :style =" {backgroundColor: item.color}" ></div >
@@ -196,6 +210,7 @@ function deactivate() {
196
210
display : flex ;
197
211
align-items : center ;
198
212
}
213
+
199
214
.chart {
200
215
display : flex ;
201
216
justify-content : flex-end ;
@@ -240,6 +255,7 @@ function deactivate() {
240
255
.section :last-child {
241
256
border-radius : 0 5px 5px 0 ;
242
257
}
258
+
243
259
.legend {
244
260
margin-left : 40px ;
245
261
@@ -249,13 +265,16 @@ function deactivate() {
249
265
padding : 5px ;
250
266
}
251
267
}
268
+
252
269
.color {
253
270
width : 15px ;
254
271
height : 15px ;
255
272
}
273
+
256
274
.active {
257
275
font-weight : bold ;
258
276
}
277
+
259
278
.name {
260
279
margin-left : 5px ;
261
280
}
0 commit comments