]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/math-pow-becomes-custom-function.js
8893acc5075ff9ecf803a6ca60222556bfad1801
1 function mathPowWrapper(x
, y
) {
4 noInline(mathPowWrapper
);
6 function testChangingMathPow() {
8 for (var i
= 0; i
< 10000; ++i
) {
9 result
+= mathPowWrapper(3, 2);
11 Math
.pow = function(a
, b
) { return a
+ b
; }
12 for (var i
= 0; i
< 10000; ++i
) {
13 result
+= mathPowWrapper(3, 2);
15 if (result
!== 140000)
16 throw "Result = " + result
+ ", expected 140000";
18 testChangingMathPow();