OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 (function(global, utils) { | 5 (function(global, utils) { |
6 | 6 |
7 %CheckIsBootstrapping(); | 7 %CheckIsBootstrapping(); |
8 | 8 |
9 // ---------------------------------------------------------------------------- | 9 // ---------------------------------------------------------------------------- |
10 // Imports | 10 // Imports |
(...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1537 function NumberIsNaN(number) { | 1537 function NumberIsNaN(number) { |
1538 return IS_NUMBER(number) && NUMBER_IS_NAN(number); | 1538 return IS_NUMBER(number) && NUMBER_IS_NAN(number); |
1539 } | 1539 } |
1540 | 1540 |
1541 | 1541 |
1542 // Harmony isSafeInteger | 1542 // Harmony isSafeInteger |
1543 function NumberIsSafeInteger(number) { | 1543 function NumberIsSafeInteger(number) { |
1544 if (NumberIsFinite(number)) { | 1544 if (NumberIsFinite(number)) { |
1545 var integral = TO_INTEGER(number); | 1545 var integral = TO_INTEGER(number); |
1546 if (integral == number) { | 1546 if (integral == number) { |
1547 return MathAbs(integral) <= GlobalNumber.MAX_SAFE_INTEGER; | 1547 return MathAbs(integral) <= kMaxSafeInteger; |
1548 } | 1548 } |
1549 } | 1549 } |
1550 return false; | 1550 return false; |
1551 } | 1551 } |
1552 | 1552 |
1553 | 1553 |
1554 // ---------------------------------------------------------------------------- | 1554 // ---------------------------------------------------------------------------- |
1555 | 1555 |
1556 %SetCode(GlobalNumber, NumberConstructor); | 1556 %SetCode(GlobalNumber, NumberConstructor); |
1557 %FunctionSetPrototype(GlobalNumber, new GlobalNumber(0)); | 1557 %FunctionSetPrototype(GlobalNumber, new GlobalNumber(0)); |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1813 }); | 1813 }); |
1814 | 1814 |
1815 %InstallToContext([ | 1815 %InstallToContext([ |
1816 "global_eval_fun", GlobalEval, | 1816 "global_eval_fun", GlobalEval, |
1817 "object_define_own_property", DefineOwnPropertyFromAPI, | 1817 "object_define_own_property", DefineOwnPropertyFromAPI, |
1818 "object_get_own_property_descriptor", ObjectGetOwnPropertyDescriptor, | 1818 "object_get_own_property_descriptor", ObjectGetOwnPropertyDescriptor, |
1819 "to_complete_property_descriptor", ToCompletePropertyDescriptor, | 1819 "to_complete_property_descriptor", ToCompletePropertyDescriptor, |
1820 ]); | 1820 ]); |
1821 | 1821 |
1822 }) | 1822 }) |
OLD | NEW |