Commit 8150cb2c authored by bmeurer's avatar bmeurer Committed by Commit bot

[macros] Implement NUMBER_IS_NAN in terms of strict equality.

This slighty improves the Map/Set implementations in the new pipeline,
which makes heavy use of NUMBER_IS_NAN.

BUG=v8:5267
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2740433003
Cr-Commit-Position: refs/heads/master@{#43632}
parent 98d03583
......@@ -82,7 +82,7 @@ macro IS_CALLABLE(arg) = (typeof(arg) === 'function');
macro CHECK_OBJECT_COERCIBLE(arg, functionName) = if (IS_NULL(%IS_VAR(arg)) || IS_UNDEFINED(arg)) throw %make_type_error(kCalledOnNullOrUndefined, functionName);
# Inline macros. Use %IS_VAR to make sure arg is evaluated only once.
macro NUMBER_IS_NAN(arg) = (!%_IsSmi(%IS_VAR(arg)) && !(arg == arg));
macro NUMBER_IS_NAN(arg) = (%IS_VAR(arg) !== arg);
macro NUMBER_IS_FINITE(arg) = (%_IsSmi(%IS_VAR(arg)) || ((arg == arg) && (arg != 1/0) && (arg != -1/0)));
macro TO_BOOLEAN(arg) = (!!(arg));
macro TO_INTEGER(arg) = (%_ToInteger(arg));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment