.NET参考源代码中EE这个首字母缩写是什么意思?

14
在.NET参考源代码中的String类中,有许多注释提到了一个叫做EE的东西。
第一个是关于m_stringLength的:(链接)
//NOTE NOTE NOTE NOTE
//These fields map directly onto the fields in an EE StringObject.  See object.h for the layout.
//
[NonSerialized]private int  m_stringLength;

对于.Empty,它再次被找到:

// The Empty constant holds the empty string value. It is initialized by the EE during startup.
// It is treated as intrinsic by the JIT as so the static constructor would never run.
// Leaving it uninitialized would confuse debuggers.
//
//We need to call the String constructor so that the compiler doesn't mark this as a literal.
//Marking this as a literal would mean that it doesn't show up as a field which we can access 
//from native.
public static readonly String Empty;

另外还涉及到Length

// Gets the length of this string
//
/// This is a EE implemented function so that the JIT can recognise is specially
/// and eliminate checks on character fetchs in a loop like:
///        for(int I = 0; I < str.Length; i++) str[i]
/// The actually code generated for this will be one instruction and will be inlined.

我猜它可能与Engine或External有关,但我想要一个确切的定义来解释它,EE是什么意思?


1
执行引擎 - vcsjones
1
执行引擎,例如 MSCOR EE.dll。 - Alex K.
哈,我本来以为是 MSCoreE。他们不应该把它标记为 MSCoreEE.dll 吗? - zastrowm
1
没关系,我猜MSCOREE代表微软通用对象运行时执行引擎 - zastrowm
1个回答

16

EEExecution Engine 的缩写。

Microsoft Core Execution Engine(在 mscoree.dll 中找到)是每个 .NET 程序调用以加载 CLR 并执行 IL 代码的引导程序。它是一段非托管的代码。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接