If you're in the modding and theming community, your work is about to get a bit faster, because Smali v2.0 is now in beta and firing on all cylinders. The new version brings multithreaded processing and a few tweaks to the language that should result in cleaner-looking code.
The biggest change to come with this update is multithreading, which splits processing of classes across as many as 6 cores. The developers recommend increasing available memory via a command line option to account for running several threads simultaneously. Concurrent processing is enabled by default, but the maximum number of cores can also be adjusted. The speed increase should be pretty noticeable, especially on larger and very complicated apps.
Command line call with option to boost memory usage:
smali -JXmx512m out -o classes.dex
The developer also took the opportunity to make a few changes to Smali code syntax to improve readability and function. A very welcome modification comes to the .parameter directive, which is now called .param and no longer requires ordered sequential lines for each parameter slot.
Similarly, .array-data has been tweaked so that numbers can be written in simple little-endian order without breaking them into a series bytes.
.array-data 0x4 0x0t 0x0t 0x80t 0x0t 0x0t 0x0t 0x40t 0x0t 0x0t 0x0t 0x20t 0x0t 0x0t 0x0t 0x10t 0x0t .end array-data /** Becomes **/ .array-data 4 0x800000 0x400000 0x200000 0x100000 .end array-data
Rounding out the list of changes, const/high16 and const-wide/high16 no longer accept just 16 bits for the instruction, but require the full value to be loaded into the register.
const/high16 v0, 0x1234 const-wide/high16 v0, 0x1234 /** Becomes **/ const/high16 v0, 0x12340000 const-wide/high16 v0, 0x1234000000000000
If you can't wait to give all of your processor cores a workout, hurry over to the Smali repository to pick up the latest version. Remember, this is still in beta, so check back frequently as updates and bug fixes will probably be uploaded often.
Source: Smali 2.0 on Google Code