1. A method of generating codes for inlining, the method comprising the steps of: scanning a code, wherein the code comprises a method; determining that the method is too large in size to be inlined: determining that the method comprises a branch that is based on a set of runtime types of arguments; profiling the set of runtime types of arguments at a call site in said the method to identify a set of profile parameters, the profiling including checking a probability distribution of the set of runtime types, wherein the probability distribution is used to determine a bias to a high frequency usage of the runtime types; generating a polymorphic inline cache (PIC) code from a plurality of runtime types of arguments, wherein the plurality of runtime types of arguments are based on the set of profile parameters; generating a specialized method for a frequently appearing combination of arguments in the plurality of runtime types of arguments, the frequently appearing combination of arguments being invokable from the PIC code, wherein the specialized method is specialized according to a corresponding pair of profile parameters within the set of profile parameters; and inlining a body of the specialized method into the call site, where the body has a size that is within a permissible size range, wherein at least one of the steps is carried out using a computer device.