runtime: Rewrite synchronized.m.