1. A method of generating codes for inlining, the method comprising the steps of: scanning a code, wherein said code comprises a method; determining whether said method comprises a branch if said method is too large in size to be inlined, wherein said branch is based on runtime types of argument; profiling runtime types of actual arguments at a call site in said method if said method includes said branch; generating a polymorphic inline cache (PIC) code from a plurality of arguments, wherein said plurality of arguments are based on a result of said profiling step; generating a specialized method for a frequently appearing combination of said runtime types of argument and arguments that can be invoked from said PIC code; and inlining body of said specialized method into said call site if said specialized method has a body size within a permissible range, wherein at least one of the steps is carried out using a computer device.