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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 "MIN_VALUE", 5e-324, | 390 "MIN_VALUE", 5e-324, |
391 // ECMA-262 section 15.7.3.3. | 391 // ECMA-262 section 15.7.3.3. |
392 "NaN", NaN, | 392 "NaN", NaN, |
393 // ECMA-262 section 15.7.3.4. | 393 // ECMA-262 section 15.7.3.4. |
394 "NEGATIVE_INFINITY", -INFINITY, | 394 "NEGATIVE_INFINITY", -INFINITY, |
395 // ECMA-262 section 15.7.3.5. | 395 // ECMA-262 section 15.7.3.5. |
396 "POSITIVE_INFINITY", INFINITY, | 396 "POSITIVE_INFINITY", INFINITY, |
397 | 397 |
398 // --- Harmony constants (no spec refs until settled.) | 398 // --- Harmony constants (no spec refs until settled.) |
399 | 399 |
400 "MAX_SAFE_INTEGER", %_MathPow(2, 53) - 1, | 400 "MAX_SAFE_INTEGER", 9007199254740991, |
401 "MIN_SAFE_INTEGER", -%_MathPow(2, 53) + 1, | 401 "MIN_SAFE_INTEGER", -9007199254740991, |
402 "EPSILON", %_MathPow(2, -52) | 402 "EPSILON", 2.220446049250313e-16, |
403 ]); | 403 ]); |
404 | 404 |
405 // Set up non-enumerable functions on the Number prototype object. | 405 // Set up non-enumerable functions on the Number prototype object. |
406 utils.InstallFunctions(GlobalNumber.prototype, DONT_ENUM, [ | 406 utils.InstallFunctions(GlobalNumber.prototype, DONT_ENUM, [ |
407 "toString", NumberToStringJS, | 407 "toString", NumberToStringJS, |
408 "toLocaleString", NumberToLocaleString, | 408 "toLocaleString", NumberToLocaleString, |
409 "valueOf", NumberValueOf, | 409 "valueOf", NumberValueOf, |
410 "toFixed", NumberToFixedJS, | 410 "toFixed", NumberToFixedJS, |
411 "toExponential", NumberToExponentialJS, | 411 "toExponential", NumberToExponentialJS, |
412 "toPrecision", NumberToPrecisionJS | 412 "toPrecision", NumberToPrecisionJS |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 to.NumberIsNaN = NumberIsNaN; | 453 to.NumberIsNaN = NumberIsNaN; |
454 to.NumberIsInteger = NumberIsInteger; | 454 to.NumberIsInteger = NumberIsInteger; |
455 to.ObjectHasOwnProperty = GlobalObject.prototype.hasOwnProperty; | 455 to.ObjectHasOwnProperty = GlobalObject.prototype.hasOwnProperty; |
456 }); | 456 }); |
457 | 457 |
458 %InstallToContext([ | 458 %InstallToContext([ |
459 "object_value_of", ObjectValueOf, | 459 "object_value_of", ObjectValueOf, |
460 ]); | 460 ]); |
461 | 461 |
462 }) | 462 }) |
OLD | NEW |