| 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 "use strict"; | 5 "use strict"; |
| 6 | 6 |
| 7 // This file relies on the fact that the following declarations have been made | 7 // This file relies on the fact that the following declarations have been made |
| 8 // in runtime.js: | 8 // in runtime.js: |
| 9 // var $Object = global.Object; | 9 // var $Object = global.Object; |
| 10 | 10 |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 (dy - kCosXIntervalTable[index + 1]) * t1)) | 253 (dy - kCosXIntervalTable[index + 1]) * t1)) |
| 254 * (1 - (phase & 2)) + 0; | 254 * (1 - (phase & 2)) + 0; |
| 255 } | 255 } |
| 256 | 256 |
| 257 // ------------------------------------------------------------------- | 257 // ------------------------------------------------------------------- |
| 258 | 258 |
| 259 function SetUpMath() { | 259 function SetUpMath() { |
| 260 %CheckIsBootstrapping(); | 260 %CheckIsBootstrapping(); |
| 261 | 261 |
| 262 %SetPrototype($Math, $Object.prototype); | 262 %SetPrototype($Math, $Object.prototype); |
| 263 %AddProperty(global, "Math", $Math, DONT_ENUM); | 263 %AddNamedProperty(global, "Math", $Math, DONT_ENUM); |
| 264 %FunctionSetInstanceClassName(MathConstructor, 'Math'); | 264 %FunctionSetInstanceClassName(MathConstructor, 'Math'); |
| 265 | 265 |
| 266 // Set up math constants. | 266 // Set up math constants. |
| 267 InstallConstants($Math, $Array( | 267 InstallConstants($Math, $Array( |
| 268 // ECMA-262, section 15.8.1.1. | 268 // ECMA-262, section 15.8.1.1. |
| 269 "E", 2.7182818284590452354, | 269 "E", 2.7182818284590452354, |
| 270 // ECMA-262, section 15.8.1.2. | 270 // ECMA-262, section 15.8.1.2. |
| 271 "LN10", 2.302585092994046, | 271 "LN10", 2.302585092994046, |
| 272 // ECMA-262, section 15.8.1.3. | 272 // ECMA-262, section 15.8.1.3. |
| 273 "LN2", 0.6931471805599453, | 273 "LN2", 0.6931471805599453, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 | 305 |
| 306 %SetInlineBuiltinFlag(MathCeil); | 306 %SetInlineBuiltinFlag(MathCeil); |
| 307 %SetInlineBuiltinFlag(MathRandom); | 307 %SetInlineBuiltinFlag(MathRandom); |
| 308 %SetInlineBuiltinFlag(MathSin); | 308 %SetInlineBuiltinFlag(MathSin); |
| 309 %SetInlineBuiltinFlag(MathCos); | 309 %SetInlineBuiltinFlag(MathCos); |
| 310 %SetInlineBuiltinFlag(MathTan); | 310 %SetInlineBuiltinFlag(MathTan); |
| 311 %SetInlineBuiltinFlag(TrigonometricInterpolation); | 311 %SetInlineBuiltinFlag(TrigonometricInterpolation); |
| 312 } | 312 } |
| 313 | 313 |
| 314 SetUpMath(); | 314 SetUpMath(); |
| OLD | NEW |