Commit 0f42a19
[Java frontend] Fixing Java bytecode local variable table before Sawja transformation
Summary:
The .class format contains a debug table to retrieve the
source name of local variables. The table generated by the Kotlin
compiler does not follow the same convention than the javac
compiler. This patch is a quick fix. it is not fully correct because
we don't check outgoing edge while going forward in the opcode
array, but we expect the bacward iteration to be always safe (and short).
Official JVM spec:
https://docs.oracle.com/javase/specs/jvms/se17/html/jvms-4.html#jvms-4.7.13
Reviewed By: ngorogiannis
Differential Revision: D31431271
fbshipit-source-id: 0cc6080391 parent 8f0596e commit 0f42a19
1 file changed
+60
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
280 | 333 | | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
281 | 340 | | |
282 | | - | |
| 341 | + | |
283 | 342 | | |
284 | 343 | | |
285 | 344 | | |
| |||
0 commit comments