Is it standard for VMs to run *= computationallyHeavyFunction() if the left hand side is 0?
Optimizing 0 * f(…) is correct only if f has no side effect and its result is known to be finite. If f has side effects, they must be executed even if the result does not matter. If f might return a result such as NaN or infinity then the result of the calculation might be NaN and not 0.

A VM that is optimized for numerical or symbolic calculations and that has access to enough type information to know that f has no side effects and has a finite result would presumably optimize the call away. Any other type of VM would not do this optimization.