| 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 var rngstate; // Initialized to a Uint32Array during genesis. | 5 var rngstate; // Initialized to a Uint32Array during genesis. |
| 6 | 6 |
| 7 var $abs; | 7 var $abs; |
| 8 var $exp; | 8 var $exp; |
| 9 var $floor; | 9 var $floor; |
| 10 var $max; | 10 var $max; |
| 11 var $min; | 11 var $min; |
| 12 | 12 |
| 13 (function(global, shared, exports) { | 13 (function(global, shared, exports) { |
| 14 | 14 |
| 15 "use strict"; | 15 "use strict"; |
| 16 | 16 |
| 17 %CheckIsBootstrapping(); | 17 %CheckIsBootstrapping(); |
| 18 | 18 |
| 19 // ------------------------------------------------------------------- |
| 20 // Imports |
| 21 |
| 19 var GlobalObject = global.Object; | 22 var GlobalObject = global.Object; |
| 23 var InternalArray = shared.InternalArray; |
| 20 | 24 |
| 21 //------------------------------------------------------------------- | 25 //------------------------------------------------------------------- |
| 22 | 26 |
| 23 // ECMA 262 - 15.8.2.1 | 27 // ECMA 262 - 15.8.2.1 |
| 24 function MathAbs(x) { | 28 function MathAbs(x) { |
| 25 x = +x; | 29 x = +x; |
| 26 return (x > 0) ? x : 0 - x; | 30 return (x > 0) ? x : 0 - x; |
| 27 } | 31 } |
| 28 | 32 |
| 29 // ECMA 262 - 15.8.2.2 | 33 // ECMA 262 - 15.8.2.2 |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 %SetInlineBuiltinFlag(MathTrunc); | 358 %SetInlineBuiltinFlag(MathTrunc); |
| 355 | 359 |
| 356 // Expose to the global scope. | 360 // Expose to the global scope. |
| 357 $abs = MathAbs; | 361 $abs = MathAbs; |
| 358 $exp = MathExp; | 362 $exp = MathExp; |
| 359 $floor = MathFloorJS; | 363 $floor = MathFloorJS; |
| 360 $max = MathMax; | 364 $max = MathMax; |
| 361 $min = MathMin; | 365 $min = MathMin; |
| 362 | 366 |
| 363 }) | 367 }) |
| OLD | NEW |