Fix deterministic code optimizer, implement @Deterministic annotation