Allow d8 to run a script multiple times, each time with a new context.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9310001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10580 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
ulan@chromium.org 2012-02-01 16:47:06 +00:00
parent e952765ea0
commit 56024c1511

View File

@ -1485,6 +1485,12 @@ int Shell::Main(int argc, char* argv[]) {
}
printf("======== Full Deoptimization =======\n");
Testing::DeoptimizeAll();
} else if (i::FLAG_stress_runs > 0) {
int stress_runs = i::FLAG_stress_runs;
for (int i = 0; i < stress_runs && result == 0; i++) {
printf("============ Run %d/%d ============\n", i + 1, stress_runs);
result = RunMain(argc, argv);
}
} else {
result = RunMain(argc, argv);
}