| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 76 |
| 77 // ECMA 262 - 15.8.2.6 | 77 // ECMA 262 - 15.8.2.6 |
| 78 function MathCeil(x) { | 78 function MathCeil(x) { |
| 79 if (!IS_NUMBER(x)) x = ToNumber(x); | 79 if (!IS_NUMBER(x)) x = ToNumber(x); |
| 80 return %Math_ceil(x); | 80 return %Math_ceil(x); |
| 81 } | 81 } |
| 82 | 82 |
| 83 // ECMA 262 - 15.8.2.7 | 83 // ECMA 262 - 15.8.2.7 |
| 84 function MathCos(x) { | 84 function MathCos(x) { |
| 85 if (!IS_NUMBER(x)) x = ToNumber(x); | 85 if (!IS_NUMBER(x)) x = ToNumber(x); |
| 86 return %Math_cos(x); | 86 return %_Math_cos(x); |
| 87 } | 87 } |
| 88 | 88 |
| 89 // ECMA 262 - 15.8.2.8 | 89 // ECMA 262 - 15.8.2.8 |
| 90 function MathExp(x) { | 90 function MathExp(x) { |
| 91 if (!IS_NUMBER(x)) x = ToNumber(x); | 91 if (!IS_NUMBER(x)) x = ToNumber(x); |
| 92 return %Math_exp(x); | 92 return %Math_exp(x); |
| 93 } | 93 } |
| 94 | 94 |
| 95 // ECMA 262 - 15.8.2.9 | 95 // ECMA 262 - 15.8.2.9 |
| 96 function MathFloor(x) { | 96 function MathFloor(x) { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 | 150 |
| 151 // ECMA 262 - 15.8.2.15 | 151 // ECMA 262 - 15.8.2.15 |
| 152 function MathRound(x) { | 152 function MathRound(x) { |
| 153 if (!IS_NUMBER(x)) x = ToNumber(x); | 153 if (!IS_NUMBER(x)) x = ToNumber(x); |
| 154 return %Math_round(x); | 154 return %Math_round(x); |
| 155 } | 155 } |
| 156 | 156 |
| 157 // ECMA 262 - 15.8.2.16 | 157 // ECMA 262 - 15.8.2.16 |
| 158 function MathSin(x) { | 158 function MathSin(x) { |
| 159 if (!IS_NUMBER(x)) x = ToNumber(x); | 159 if (!IS_NUMBER(x)) x = ToNumber(x); |
| 160 return %Math_sin(x); | 160 return %_Math_sin(x); |
| 161 } | 161 } |
| 162 | 162 |
| 163 // ECMA 262 - 15.8.2.17 | 163 // ECMA 262 - 15.8.2.17 |
| 164 function MathSqrt(x) { | 164 function MathSqrt(x) { |
| 165 if (!IS_NUMBER(x)) x = ToNumber(x); | 165 if (!IS_NUMBER(x)) x = ToNumber(x); |
| 166 return %Math_sqrt(x); | 166 return %Math_sqrt(x); |
| 167 } | 167 } |
| 168 | 168 |
| 169 // ECMA 262 - 15.8.2.18 | 169 // ECMA 262 - 15.8.2.18 |
| 170 function MathTan(x) { | 170 function MathTan(x) { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 "tan", MathTan, | 233 "tan", MathTan, |
| 234 "atan2", MathAtan2, | 234 "atan2", MathAtan2, |
| 235 "pow", MathPow, | 235 "pow", MathPow, |
| 236 "max", MathMax, | 236 "max", MathMax, |
| 237 "min", MathMin | 237 "min", MathMin |
| 238 )); | 238 )); |
| 239 }; | 239 }; |
| 240 | 240 |
| 241 | 241 |
| 242 SetupMath(); | 242 SetupMath(); |
| OLD | NEW |