FAST UNSAFE
自从 3.12
FAST UNSAFE
UNSAFE
关键字与
FAST
一起使用,允许即时编译器使用不安全但速度更快的代码。
使用该关键字会产生以下效果:
-
Conversion from Float to Single does not check for overflow.
-
Public object variables are accessed without checking if the object reference is null, or if the object is invalid.
-
Array access does not check for index validity.
-
Division by zero is not checked.
-
Bit access functions do not check the bit index.
-
Mathematical functions result validity is not checked.
-
Memory access functions do not check for illegal memory access.
-
Arithmetic overflows are ignored.
因此,不正确的代码使用
UNSAFE
关键字编译通常会导致解释器崩溃,或者充其量是不确定的行为。
See also