]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - tests/stress/new-function-expression-has-structures.js
JavaScriptCore-7600.1.4.9.tar.gz
[apple/javascriptcore.git] / tests / stress / new-function-expression-has-structures.js
diff --git a/tests/stress/new-function-expression-has-structures.js b/tests/stress/new-function-expression-has-structures.js
new file mode 100644 (file)
index 0000000..ce0751a
--- /dev/null
@@ -0,0 +1,11 @@
+function foo() {
+    var f = function() { return 42 };
+    f.prototype.f = function() { return 43; };
+    return f.prototype.f;
+}
+
+noInline(foo);
+
+for (var i = 0; i < 10000; ++i)
+    foo();
+