<零 ZERO>为lt gt什么意思玩不了?

您的举报已经提交成功,我们将尽快处理,谢谢!
你先耐心等等,一会儿就出来了。等的过程中,你可以玩点儿别的游戏;如果出不来,再点刷新;如果还不行,那可能机器打不开。
这个以前挺快的,现在也不知道怎么了。
这个问题很EASY,你把下载的382M的文件放入魔兽世界的根目录下(在World of Warcraft文件下)然后运行魔兽世界打入你的帐号和密码,然后进入,会...
可能是图的原因,重新下载或找更新的图。
还有你的游戏版本怎样。
跟机子应该没什么关系。
内有个火影忍者OL的垃圾网游 那画面做的。。哎如果有和WOW一样好的一定玩 回复 520zyb9 真的来了……《火影忍者OL》 回复
大家还关注I have by pure chance discovered that the C# compiler turns this method:
static bool IsNotNull(object obj)
return obj !=
…into this :
.method private hidebysig static bool IsNotNull(object obj) cil managed
…or, if you prefer looking at decompiled C# code:
static bool IsNotNull(object obj)
return obj &
// (note: this is not a valid C# expression)
How come that the != gets translated as a "&"?
解决方案 Short answer:
There is no "compare-not-equal" instruction in IL, so the C# != operator has no exact correspondence and cannot be translated literally.
There is however a "compare-equal" instruction (ceq, a direct correspondence to the == operator), so in the general case, x != y gets translated like its slightly longer equivalent (x == y) == false.
There is also a "compare-greater-than" instruction in IL (cgt) which allows the compiler to take certain shortcuts (i.e. generate shorter IL code), one being that inequality comparisons of objects against null, obj != null, get translated as if they were "obj & null".
Let's go into some more detail.
If there is no "compare-not-equal" instruction in IL, then how will the following method get translated by the compiler?
static bool IsNotEqual(int x, int y)
return x !=
As already said above, the compiler will turn the x != y into (x == y) == false:
.method private hidebysig static bool IsNotEqual(int32 x, int32 y) cil managed
// (note: two comparisons in total)
It turns out that the compiler does not always produce this fairly long-winded pattern. Let's see what happens when we replace y with the constant 0:
static bool IsNotZero(int x)
return x != 0;
The IL produced is somewhat shorter than in the general case:
.method private hidebysig static bool IsNotZero(int32 x) cil managed
// (note: just one comparison)
The compiler can take advantage of the fact that signed integers are stored in
(where, if the resulting bit patterns are interpreted as unsigned integers & that's what the .un means & 0 has the smallest possible value), so it translates x == 0 as if it were unchecked((uint)x) & 0.
It turns out the compiler can do just the same for inequality checks against null:
static bool IsNotNull(object obj)
return obj !=
The compiler produces almost the same IL as for IsNotZero:
.method private hidebysig static bool IsNotNull(object obj) cil managed
// (note: this is the only difference)
Apparently, the compiler is allowed to assume that the bit pattern of the null reference is the smallest bit pattern possible for any object reference.
This shortcut is explicitly mentioned in the
(on page 491, as a footnote of Table 6-4, "Binary Comparisons or Branch Operations"):
"cgt.un is allowed and verifiable on ObjectRefs (O). This is commonly used when comparing an ObjectRef with null (there is no "compare-not-equal" instruction, which would otherwise be a more obvious solution)."
本文地址: &
我有纯粹的偶然发现,C#编译器开启此方法:
静态布尔IsNotNull(obj对象) {回报的obj!= NULL; }
...这个的:
。方法私人hidebysig静态布尔IsNotNull(obj对象)CIL管理 { ldarg.0 // OBJ
cgt.un 沤}
...或者,如果你喜欢看反编译的C#代码:
静态布尔IsNotNull(obj对象) {回报的obj>空值; //(注意:这不是一个有效的C#表达式)}
怎么来的在 = 被翻译成“> ”!?
解决方案 简短的回答:
有在IL没有“比较 - 不等于”指令,所以C#!= 经营者有没有确切的对应关系,不能直译。
有不过是一个“比较平等”指令(
CEQ ,直接对应到 == 运营商),因此在一般情况下,到X!= Y 被翻译像它稍长相当于(X == Y)==虚假。
有是的也的一个“比较-大于”指令IL( CGT ),这使编译器可以采取一定的快捷方式(即产生较短的IL代码),一个是对空对象,的obj!= NULL ,得到好像他们是“翻译的不平等比较 OBJ>空“
让我们进入一些细节。
如果没有在IL没有“比较 - 不等于”指令,那么如何将下面的方法得到由编译器编译?
静态布尔IsNotEqual(INT X,int y)对 {返回X = Y!; }
正如上面已经说过,编译器将打开 !X = Y 到(X == Y)==虚假:
。方法私人hidebysig静态布尔IsNotEqual(INT32 X,INT32 Y)CIL管理 { ldarg.0 //点?x ldarg.1 //?
ldc.i4.0 //虚假 CEQ //(注:共有两个比较)沤}
原来,编译器不会总是产生这个相当冗长的格局。让我们看看,当我们更换是与常数0会发生什么:
静态布尔IsNotZero(INT X) {返回X!= 0; }
中IL产生比在一般情况下稍短
。方法私人hidebysig静态布尔IsNotZero(INT32 X)CIL管理 { ldarg.0 //点?x ldc.i4.0 // 0
cgt.un //(注意:只是一个比较)沤}
编译器可以利用这一符号整数存储在的(其中,如果生成的位模式被解释为无符号整数&MDASH;这是什么 .UN 表示&MDASH; 0具有最小的可能值) ,所以它转换 X == 0 ,好像它是选中((UINT)x)> 0 。
原来,编译器可以对空:
静态布尔IsNotNull(obj对象) {回报的obj = NULL; }
编译器生成几乎相同的IL为 IsNotZero :
。方法私人hidebysig静态布尔IsNotNull(obj对象)CIL管理 {
ldnull //(注意:这是唯一的区别) cgt.un 沤}
显然,编译器允许假设空引用的位模式是任何对象引用最小的比特模式成为可能。
此快捷方式中显式的(491页,如表6-4的脚注,关于”二进制比较或分公司业务部“):
的“ cgt.un 是允许的,可核查的ObjectRefs(O),这比较时,通常使用用空的ObjectRef(没有“比较 - 不等于”指令,这本来是一个比较明显的解决方案)。“的
本文地址: &
扫一扫关注官方微信

参考资料

 

随机推荐