Compiling inheritance using partial evaluation