Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(686)

Unified Diff: test/mjsunit/closures.js

Issue 6910022: Replace long running loops by OptimizeFunctionOnNextCall in some tests. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments. Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-closures-with-eval.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/closures.js
diff --git a/test/mjsunit/closures.js b/test/mjsunit/closures.js
index ee487a4b031af0fedec86ed49e33b12763dd6df7..7c1197107f7b73df789b87507c299ba67f728c2b 100644
--- a/test/mjsunit/closures.js
+++ b/test/mjsunit/closures.js
@@ -25,10 +25,10 @@
// (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
+
function runner(f, expected) {
- for (var i = 0; i < 1000000; i++) {
- assertEquals(expected, f.call(this));
- }
+ assertEquals(expected, f.call(this));
}
function test(n) {
@@ -36,6 +36,8 @@ function test(n) {
var result = n * 2 + arguments.length;
return result;
}
+ for (var i = 0; i < 5; ++i) MyFunction();
+ %OptimizeFunctionOnNextCall(MyFunction)
runner(MyFunction, n * 2);
}
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-closures-with-eval.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698