Index: test/mjsunit/compiler/regress-funcaller.js |
=================================================================== |
--- test/mjsunit/compiler/regress-funcaller.js (revision 9984) |
+++ test/mjsunit/compiler/regress-funcaller.js (working copy) |
@@ -25,6 +25,8 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
+// Flags: --allow-natives-syntax |
+ |
// Test function.caller. |
function A() {} |
@@ -40,9 +42,10 @@ |
var o = new A(); |
-for (var i=0; i<5000000; i++) { |
+for (var i=0; i<5; i++) { |
o.g(i); |
} |
+%OptimizeFunctionOnNextCall(o.g); |
assertEquals(gee, o.g(0)); |
assertEquals(null, o.g(1)); |
@@ -53,9 +56,10 @@ |
return o.g(x); |
} |
-for (var j=0; j<5000000; j++) { |
+for (var j=0; j<5; j++) { |
hej(j); |
} |
+%OptimizeFunctionOnNextCall(hej); |
assertEquals(gee, hej(0)); |
assertEquals(hej, hej(1)); |
@@ -66,8 +70,9 @@ |
return o.g(x); |
} |
-for (var j=0; j<5000000; j++) { |
+for (var j=0; j<5; j++) { |
from_eval(j); |
} |
+%OptimizeFunctionOnNextCall(from_eval); |
assertEquals(gee, from_eval(0)); |
assertEquals(from_eval, from_eval(1)); |