Reintroduce %GetRootNaN to fix MIPS.
R=dusan.milosavljevic@imgtec.com Review URL: https://codereview.chromium.org/1101503003 Cr-Commit-Position: refs/heads/master@{#27967}
This commit is contained in:
parent
7bcc3d1083
commit
f3e5183347
@ -169,7 +169,7 @@ macro SET_PRIVATE(obj, sym, val) = (obj[sym] = val);
|
||||
macro DELETE_PRIVATE(obj, sym) = (delete obj[sym]);
|
||||
|
||||
# Constants. The compiler constant folds them.
|
||||
const NAN = (0/0);
|
||||
const NAN = $NaN;
|
||||
const INFINITY = (1/0);
|
||||
const UNDEFINED = (void 0);
|
||||
|
||||
|
@ -22,6 +22,7 @@ var $String = global.String;
|
||||
var $Number = global.Number;
|
||||
var $Function = global.Function;
|
||||
var $Boolean = global.Boolean;
|
||||
var $NaN = %GetRootNaN();
|
||||
|
||||
// ECMA-262 Section 11.9.3.
|
||||
function EQUALS(y) {
|
||||
|
@ -579,5 +579,12 @@ RUNTIME_FUNCTION(Runtime_IsNonNegativeSmi) {
|
||||
return isolate->heap()->ToBoolean(obj->IsSmi() &&
|
||||
Smi::cast(obj)->value() >= 0);
|
||||
}
|
||||
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_GetRootNaN) {
|
||||
SealHandleScope shs(isolate);
|
||||
DCHECK(args.length() == 0);
|
||||
return isolate->heap()->nan_value();
|
||||
}
|
||||
}
|
||||
} // namespace v8::internal
|
||||
|
@ -380,7 +380,8 @@ namespace internal {
|
||||
F(MaxSmi, 0, 1) \
|
||||
F(NumberToString, 1, 1) \
|
||||
F(IsSmi, 1, 1) \
|
||||
F(IsNonNegativeSmi, 1, 1)
|
||||
F(IsNonNegativeSmi, 1, 1) \
|
||||
F(GetRootNaN, 0, 1)
|
||||
|
||||
|
||||
#define FOR_EACH_INTRINSIC_OBJECT(F) \
|
||||
|
Loading…
Reference in New Issue
Block a user