Software transactional protection of managed pointers
First Claim
1. A method for providing software transactional protection of managed pointers comprising the steps of:
- at compile time, using a compiler that emits calls to a software transactional memory system, the software transaction memory system is a concurrency control mechanism for controlling access to shared memory in concurrent computing;
determining by the compiler that there are one or more variables being passed by reference to separately compiled code segments in at least one code segment being compiled, each variable being passed by reference using an address of the particular variable;
selecting by the compiler at least one technique of a plurality of techniques for communicating the sources of the variables being passed by reference, wherein the at least one technique comprises either a fattened by-ref technique or a modified fattened by-ref technique that uses enumerations and structures, wherein the fattened by-ref technique comprises;
creating a new by-ref info type that contains information necessary to distinguish different kinds of actual arguments;
for a method that has at least one by-ref argument, change the by-ref argument to include an additional argument for a variable using the new by-ref info type; and
at a call site for the method that has the at least one by-ref argument, inserting code to assign an appropriate one or more values to the new by-ref info type, and adding the type as a call site argument to the call to the method; and
,wherein the modified fatten by-ref technique comprises;
at each call site that invokes a particular method that has reference arguments needing identified, allocating a by-ref information holder; and
passing the by-ref information holder by reference;
modifying by the compiler the at least one code segment to implement the selected technique; and
creating an executable using the modified code segment.
2 Assignments
0 Petitions
Accused Products
Abstract
Various technologies and techniques are disclosed that provide software transactional protection of managed pointers. A software transactional memory system interacts with and/or includes a compiler. At compile time, the compiler determines that there are one or more reference arguments in one or more code segments being compiled whose source cannot be recovered. The compiler executes a procedure to select one or more appropriate techniques or combinations thereof for communicating the sources of the referenced variables to the called code segments to ensure the referenced variables can be recovered when needed. Some examples of these techniques include a fattened by-ref technique, a static fattening technique, a dynamic ByRefInfo type technique, and others. One or more combinations of these techniques can be used as appropriate.
-
Citations
7 Claims
-
1. A method for providing software transactional protection of managed pointers comprising the steps of:
-
at compile time, using a compiler that emits calls to a software transactional memory system, the software transaction memory system is a concurrency control mechanism for controlling access to shared memory in concurrent computing; determining by the compiler that there are one or more variables being passed by reference to separately compiled code segments in at least one code segment being compiled, each variable being passed by reference using an address of the particular variable; selecting by the compiler at least one technique of a plurality of techniques for communicating the sources of the variables being passed by reference, wherein the at least one technique comprises either a fattened by-ref technique or a modified fattened by-ref technique that uses enumerations and structures, wherein the fattened by-ref technique comprises; creating a new by-ref info type that contains information necessary to distinguish different kinds of actual arguments; for a method that has at least one by-ref argument, change the by-ref argument to include an additional argument for a variable using the new by-ref info type; and at a call site for the method that has the at least one by-ref argument, inserting code to assign an appropriate one or more values to the new by-ref info type, and adding the type as a call site argument to the call to the method; and
,wherein the modified fatten by-ref technique comprises; at each call site that invokes a particular method that has reference arguments needing identified, allocating a by-ref information holder; and passing the by-ref information holder by reference; modifying by the compiler the at least one code segment to implement the selected technique; and creating an executable using the modified code segment. - View Dependent Claims (2, 3)
-
-
4. A memory having computer-executable instructions for causing a computer to:
-
at compile time, use a compiler that emits calls to a software transactional memory system, the software transaction memory system is a concurrency control mechanism for controlling access to shared memory in concurrent computing; determine by the compiler that there are one or more variables being passed by reference to separately compiled code segments in at least one code segment being compiled, each variable being passed by reference using an address of the particular variable; select by the compiler at least one technique of a plurality of techniques for communicating the sources of the variables being passed by reference, wherein the at least one technique comprises either a fattened by-ref technique or a modified fattened by-ref technique that uses enumerations and structures, wherein the fattened by-ref technique comprises; creating a new by-ref info type that contains information necessary to distinguish different kinds of actual arguments; for a method that has at least one by-ref argument, change the by-ref argument to include an additional argument for a variable using the new by-ref info type; and at a call site for the method that has the at least one by-ref argument, inserting code to assign an appropriate one or more values to the new by-ref info type, and adding the type as a call site argument to the call to the method; and
,wherein the modified fatten by-ref technique comprises; at each call site that invokes a particular method that has reference arguments needing identified, allocating a by-ref information holder; and passing the by-ref information holder by reference; modify by the compiler the at least one code segment to implement the selected technique; and create an executable using the modified code segment.
-
-
5. A memory having computer-executable instructions for causing a computer to perform steps comprising:
-
at compile time, using a compiler that emits calls to a software transactional memory system, wherein the software transaction memory system is a concurrency control mechanism for controlling access to shared memory in concurrent computing; using the compiler, determine that there is a first argument and a second argument referenced in at least one code segment being compiled whose source cannot be recovered because the first argument and the second argument are variables being passed by reference using addresses of the variables; select at least one technique of a plurality of techniques for communicating a first source of the first argument, wherein the at least one technique comprises either a fattened by-ref technique or a modified fattened by-ref technique that uses enumerations and structures, wherein the fattened by-ref technique comprises; creating a new by-ref info type that contains information necessary to distinguish different kinds of actual arguments; for a method that has at least one by-ref argument, change the by-ref argument to include an additional argument for a variable using the new by-ref info type; and at a call site for the method that has the at least one by-ref argument, inserting code to assign an appropriate one or more values to the new by-ref info type, and adding the type as a call site argument to the call to the method; and
,wherein the modified fatten by-ref technique comprises; at each call site that invokes a particular method that has reference arguments needing identified, allocating a by-ref information holder; and passing the by-ref information holder by reference; select at least one technique of the plurality of techniques for communicating a second source of the second argument, the second technique solving a problem that is only present with the second argument and not the first argument; and modify the at least one code segment to implement the first technique for the first argument and the second technique for the second argument. - View Dependent Claims (6, 7)
-
Specification