主权项 |
1. A machine-readable non-transitory storage medium having instructions therein, which when executed by a machine, cause the machine to perform a method, the method comprising:
generating initial inline code from a source code block of a source code, the source code block specifying at least one access to an object, the initial inline code having serial inline cache code to perform the one access to the object, wherein the serial inline cache code includes a serial slow code path and a fast code path, the serial inline cache code to determine whether to perform the one access to the object via the fast code path or the serial slow code path; generating concurrent inline code from the source code block, the concurrent inline code having concurrent inline cache code to perform the one access to the object, wherein the concurrent inline cache code includes a concurrent slow code path and the fast code path, the concurrent inline cache code to determine whether to perform the access to the object via the fast code path or the concurrent slow code path; executing the initial inline code via a particular thread to perform the at least one access to the object, wherein the serial inline cache code embeds one or more constant parameters associated with an object type for the fast code path, wherein the serial slow code path is executed via the particular thread to update values of the constant parameters of the serial inline cache code; and executing the concurrent inline code via one or more threads to perform the at least one access to the object, wherein the concurrent inline cache code embeds the constant parameters for the fast code path, wherein the concurrent slow code path is executed concurrently to update values of the constant parameters of the concurrent inline cache code, wherein the fast code path is executed to perform the at least one access to the object if the updated constant parameters of the serial inline cache code or the updated constant parameters of the concurrent inline cache code correspond to an object type matching a type of the object. |