summaryrefslogtreecommitdiff
path: root/Documentation/coding-guidelines
diff options
context:
space:
mode:
authorBen Pye <ben@curlybracket.co.uk>2015-07-11 13:43:46 +0100
committerBen Pye <ben@curlybracket.co.uk>2015-07-11 13:43:46 +0100
commit6d98d1711cd7d788bb5951639d27cd3f01bba55d (patch)
treef1c2e2624053eba15130bbd1ad57ee61252f97d3 /Documentation/coding-guidelines
parentbff51f77734b6eca0cf31d823687c167fcfc7d57 (diff)
downloadcoreclr-6d98d1711cd7d788bb5951639d27cd3f01bba55d.tar.gz
coreclr-6d98d1711cd7d788bb5951639d27cd3f01bba55d.tar.bz2
coreclr-6d98d1711cd7d788bb5951639d27cd3f01bba55d.zip
Fix casing of COMPlus_ in documentation
On Linux the casing of environment variables matters, the documentation commonly had the wrong casing for COMPlus_ which is misleading.
Diffstat (limited to 'Documentation/coding-guidelines')
-rw-r--r--Documentation/coding-guidelines/clr-code-guide.md2
-rw-r--r--Documentation/coding-guidelines/clr-jit-coding-conventions.md6
2 files changed, 4 insertions, 4 deletions
diff --git a/Documentation/coding-guidelines/clr-code-guide.md b/Documentation/coding-guidelines/clr-code-guide.md
index 42731d38b1..54e0f49794 100644
--- a/Documentation/coding-guidelines/clr-code-guide.md
+++ b/Documentation/coding-guidelines/clr-code-guide.md
@@ -1084,7 +1084,7 @@ These declare whether a function or callee deals with the case "GetThread() == N
EE_THREAD_REQUIRED simply asserts that GetThread() != NULL.
-EE_THREAD_NOT_REQUIRED is a noop by default. You must "set COMPLUS_EnforceEEThreadNotRequiredContracts=1" for this to be enforced. Setting the envvar forces a C version of GetThread() to be used, instead of the optimized assembly versions. This C GetThread() always asserts in an EE_THREAD_NOT_REQUIRED scope regardless of whether there actually is an EE Thread available or not. The reason is that if you claim you don't require an EE Thread, then you have no business asking for it (even if you get lucky and there happens to be an EE Thread available).
+EE_THREAD_NOT_REQUIRED is a noop by default. You must "set COMPlus_EnforceEEThreadNotRequiredContracts=1" for this to be enforced. Setting the envvar forces a C version of GetThread() to be used, instead of the optimized assembly versions. This C GetThread() always asserts in an EE_THREAD_NOT_REQUIRED scope regardless of whether there actually is an EE Thread available or not. The reason is that if you claim you don't require an EE Thread, then you have no business asking for it (even if you get lucky and there happens to be an EE Thread available).
Of course, there are exceptions to this. In particular, if there is a clear code path for GetThread() == NULL, then it's ok to call GetThread() in an EE_THREAD_NOT_REQUIRED scope. You declare your intention by using GetThreadNULLOk():
diff --git a/Documentation/coding-guidelines/clr-jit-coding-conventions.md b/Documentation/coding-guidelines/clr-jit-coding-conventions.md
index ddd5cd4822..6b53b473b6 100644
--- a/Documentation/coding-guidelines/clr-jit-coding-conventions.md
+++ b/Documentation/coding-guidelines/clr-jit-coding-conventions.md
@@ -1454,7 +1454,7 @@ Note that periodically we do need to go through and remove FEATURE_* defines tha
It is generally discouraged to permanently disable code by commenting it out or by putting `#if 0` around it, in an attempt to keep it around for reference. This reduces the hygiene of the code base over time and such disabled code is rarely actually useful. Instead, such disabled code should be entirely deleted. If you do disable code without deleting it, then you must add a comment as to why the code is disabled, and why it is better to leave the code disabled than it is to delete it.
-One exception is that it is often useful to `#if 0` code that is useful for debugging an area, but is not otherwise useful. Even in this case, however, it is probably better to introduce a COMPLUS_* variable to enable the special debugging mode.
+One exception is that it is often useful to `#if 0` code that is useful for debugging an area, but is not otherwise useful. Even in this case, however, it is probably better to introduce a COMPlus_* variable to enable the special debugging mode.
### <a name="14.1.3"/>14.1.3 Debug code
@@ -1462,7 +1462,7 @@ Use `#ifdef DEBUG` for debug-only code. Do not use `#ifdef _DEBUG` (with a leadi
Use the `INDEBUG(x)` macro (and related macros) judiciously, for code that only runs in DEBUG, to avoid `#ifdef`s.
-Use the `JITDUMP(x)` macro for printing things to the JIT dump output. Note that these things will only get printed when the `verbose` variable is set, which is when `COMPLUS_JitDump=*` or when `COMPLUS_JitDump=XXX` and we are JITting function XXX; or when `COMPLUS_NgenDump=*` or `COMPLUS_NgenDump=XXX` and we are NGENing function XXX. Do not use `JITDUMP` for all output in a debug-only function that might be useful to call from the debugger. In that case, define a function that uses `printf` (which is a JIT-specific implementation of this function), which can be called from the debugger, and invoke that function like this:
+Use the `JITDUMP(x)` macro for printing things to the JIT dump output. Note that these things will only get printed when the `verbose` variable is set, which is when `COMPlus_JitDump=*` or when `COMPlus_JitDump=XXX` and we are JITting function XXX; or when `COMPlus_NgenDump=*` or `COMPlus_NgenDump=XXX` and we are NGENing function XXX. Do not use `JITDUMP` for all output in a debug-only function that might be useful to call from the debugger. In that case, define a function that uses `printf` (which is a JIT-specific implementation of this function), which can be called from the debugger, and invoke that function like this:
```c++
DBEXEC(verbose, MyDumpFunction());
@@ -1483,7 +1483,7 @@ This could be written on fewer lines as:
JITDUMP("*************** In genGenerateCode()\n");
```
-However, the former is preferred because it is trivial to set an unconditional breakpoint on the "printf" that triggers when we are compiling the function that matches what COMPLUS_JitDump is set to – a very common debugging technique. Note that conditional breakpoints could be used, but they are more cumbersome, and are very difficult to get right in windbg.
+However, the former is preferred because it is trivial to set an unconditional breakpoint on the "printf" that triggers when we are compiling the function that matches what COMPlus_JitDump is set to – a very common debugging technique. Note that conditional breakpoints could be used, but they are more cumbersome, and are very difficult to get right in windbg.
If many back-to-back JITDUMP statements are going to be used it is preferred that they be written using printf().