Some changes:

* Previously, it was possible to declare a metavariable to match only a 
local variable, by saying "local idexpression x;".  Now it is also 
possible to match a global variable, by saying "global expression x;".

* By default, when a semantic patch changes a function header, eg adding  
new parameter, Coccinelle generates a corresponding rule for changing the 
function prototype.  It is now possible to disable this behavior, by 
putting disable prototypes in the rule header.

* Varargs.  It is now possible to match and transform functions that have 
varargs in their parameter list.  Because of the conflict with the ... 
notation of Coccinelle, the ... of C is written ...... (6 dots) in a 
semantc patch.

* Inline in function prototypes.  These were not previously allowed in 
semantic patch code.

* #ifdef on kernel version.  Previously these were always considered to be 
comments.  Now they are treated like other #ifdefs.  Specifically, if such 
an ifdef is around complete statements, the control flow will behave as 
for an if.

* Parallelism in Coccinelle.  The following is an extract from the 
option documentation:

--jobs <int>: Run the specified number of jobs in parallel. Can be 
abbreviated as -j. This option is not compatible with the use of an 
initialize or finalize rule in the semantic patch. This option furthermore 
creates a temporary directory in the directory from which spatch is 
executed that has the name of the semantic patch (without its extension) 
and that contains stdout and stderr files generated by the various 
processes. When the semantic patch completes, the contents of these files 
are printed to standard output and standard error, respectively, and the 
directory is removed.

--chunksize <int>. The specified number of files are dispatched as a 
single unit of parallelism. This option is only interesting with the 
options --all-includes or --recursive-includes, when combined with the 
option --include-headers-for-types. In this case, parsed header files are 
cached. It is only the files that are treated within a single chunk that 
can benefit from this cache, due to the lack of shared memory in ocaml.

julia
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to