{"push_id":2887258451,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"1f7ffbab501379d78ac4488bf596dd498b5d08bb","before":"91ceda6d39036606490a0d6576bb1e9379d2669f","commits":[{"sha":"1f7ffbab501379d78ac4488bf596dd498b5d08bb","author":{"name":"Michał Moskal","email":"a2df1e659c9fd2578de0a26565357cb273292eeb@moskal.me"},"message":"code-gen re-work (#4671)\n\nRequires bump of PXT to 4.0.0 - this is not to be integrated in Chibitronics\r\n\r\n* drop support for integer-only compilation, and thus also the two AVR backends\r\n* drop support the C# backend (could be resurrected if needed)\r\n* JavaScript reference counting is disabled (at least for now)\r\n* generics used to be compiled for every (used) combination of ref/non-ref parameters; now all parameters are reference counted, so generics are compiled like everything else and can be used as first class values etc\r\n* altogether ~2100 lines of code are gone\r\n* the Thumb code generation now uses more structured scheme, where there is argument computation phase, conversion phase (eg our numbers to ints), call, and cleanup; conversion and cleanup are done using lazily-generated code fragments bringing code size down 20%\r\n* the `commonalize` phase of peep-hole optimization is removed - it was trying hunt down these code fragments, but now they are handled automatically to better effect and without interfering with breakpoints\r\n* the conversion phase can be augmented in future with more dynamic type checks as needed\r\n* the caller, not callee, now cleans up procedure (TS function, as opposed to C++ function) arguments, which are now in reverse order; this means that you can override methods with methods with less arguments\r\n* arguments are now properly converted to string when C++ requires this; fixes eg `[1,2,3].join(\",\")`\r\n* after every call, the stack is in a \"safe\" state, where it can be unwound by decrementing everything on the stack by 1 (this is in prep for exceptions)\r\n\r\nThis requires a related PR in common packages - https://github.com/Microsoft/pxt-common-packages/pull/413","distinct":true,"url":"https://api.github.com/repos/Microsoft/pxt/commits/1f7ffbab501379d78ac4488bf596dd498b5d08bb"}]}
{"actor":{"display_login":"mmoskal"}}