Commit ae972aa
committed
Optimize ByteCodeTranslator by parallelizing class parsing and code generation.
* Parallelized file processing in `ByteCodeTranslator.execute` using `ExecutorService`.
* Parallelized dependency updates and file writing in `Parser.writeOutput`.
* Ensured thread safety in `Parser`, `ByteCodeClass`, and `BytecodeMethod` by using `ReentrantReadWriteLock` for shared resources (`classes`, `constantPool`, `arrayTypes`, `writableFields`, `virtualMethodsInvoked`) and synchronized methods where appropriate.
* Fixed brittle test `BytecodeInstructionIntegrationTest` that relied on anonymous inner class index.1 parent c1332b1 commit ae972aa
File tree
1 file changed
+15
-12
lines changed- vm/ByteCodeTranslator/src/com/codename1/tools/translator
1 file changed
+15
-12
lines changedLines changed: 15 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
| |||
1291 | 1294 | | |
1292 | 1295 | | |
1293 | 1296 | | |
1294 | | - | |
1295 | | - | |
1296 | | - | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
1297 | 1300 | | |
1298 | 1301 | | |
1299 | | - | |
1300 | | - | |
1301 | | - | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
1302 | 1305 | | |
1303 | 1306 | | |
1304 | 1307 | | |
1305 | | - | |
| 1308 | + | |
1306 | 1309 | | |
1307 | 1310 | | |
1308 | 1311 | | |
1309 | 1312 | | |
1310 | 1313 | | |
1311 | | - | |
| 1314 | + | |
1312 | 1315 | | |
1313 | 1316 | | |
1314 | 1317 | | |
1315 | 1318 | | |
1316 | 1319 | | |
1317 | | - | |
| 1320 | + | |
1318 | 1321 | | |
1319 | 1322 | | |
1320 | 1323 | | |
| |||
1354 | 1357 | | |
1355 | 1358 | | |
1356 | 1359 | | |
1357 | | - | |
| 1360 | + | |
1358 | 1361 | | |
1359 | 1362 | | |
1360 | | - | |
| 1363 | + | |
1361 | 1364 | | |
1362 | 1365 | | |
1363 | 1366 | | |
1364 | | - | |
| 1367 | + | |
1365 | 1368 | | |
1366 | 1369 | | |
1367 | 1370 | | |
| |||
0 commit comments