| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 | 182 |
| 183 // ECMA 262 - 15.8.2.17 | 183 // ECMA 262 - 15.8.2.17 |
| 184 function MathSqrt(x) { | 184 function MathSqrt(x) { |
| 185 if (!IS_NUMBER(x)) x = NonNumberToNumber(x); | 185 if (!IS_NUMBER(x)) x = NonNumberToNumber(x); |
| 186 return %_MathSqrt(x); | 186 return %_MathSqrt(x); |
| 187 } | 187 } |
| 188 | 188 |
| 189 // ECMA 262 - 15.8.2.18 | 189 // ECMA 262 - 15.8.2.18 |
| 190 function MathTan(x) { | 190 function MathTan(x) { |
| 191 if (!IS_NUMBER(x)) x = NonNumberToNumber(x); | 191 if (!IS_NUMBER(x)) x = NonNumberToNumber(x); |
| 192 return %Math_tan(x); | 192 return %_MathTan(x); |
| 193 } | 193 } |
| 194 | 194 |
| 195 | 195 |
| 196 // ------------------------------------------------------------------- | 196 // ------------------------------------------------------------------- |
| 197 | 197 |
| 198 function SetUpMath() { | 198 function SetUpMath() { |
| 199 %CheckIsBootstrapping(); | 199 %CheckIsBootstrapping(); |
| 200 // Set up math constants. | 200 // Set up math constants. |
| 201 // ECMA-262, section 15.8.1.1. | 201 // ECMA-262, section 15.8.1.1. |
| 202 %OptimizeObjectForAddingMultipleProperties($Math, 8); | 202 %OptimizeObjectForAddingMultipleProperties($Math, 8); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 "sqrt", MathSqrt, | 255 "sqrt", MathSqrt, |
| 256 "tan", MathTan, | 256 "tan", MathTan, |
| 257 "atan2", MathAtan2, | 257 "atan2", MathAtan2, |
| 258 "pow", MathPow, | 258 "pow", MathPow, |
| 259 "max", MathMax, | 259 "max", MathMax, |
| 260 "min", MathMin | 260 "min", MathMin |
| 261 )); | 261 )); |
| 262 } | 262 } |
| 263 | 263 |
| 264 SetUpMath(); | 264 SetUpMath(); |
| OLD | NEW |