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

Unified Diff: test/mjsunit/string-charcodeat.js

Issue 6821009: Introduce runtime function %OptimizeFunctionOnNextCall to manually trigger optimization. (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 | « test/mjsunit/regress/regress-962.js ('k') | test/mjsunit/sum-0-plus-undefined-is-NaN.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/string-charcodeat.js
diff --git a/test/mjsunit/string-charcodeat.js b/test/mjsunit/string-charcodeat.js
index f18d0a532e1e09f90a60885c8bf5f279809c58a6..8be6a092e6b8e557c7ecfe6fe73cea1dce7ecc47 100644
--- a/test/mjsunit/string-charcodeat.js
+++ b/test/mjsunit/string-charcodeat.js
@@ -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
+
/**
* @fileoverview Check all sorts of borderline cases for charCodeAt.
*/
@@ -159,9 +161,11 @@ function ConsNotSmiIndex() {
assertTrue(isNaN(str.charCodeAt(0x7fffffff)));
}
-for (var i = 0; i < 100000; i++) {
+for (var i = 0; i < 5; i++) {
ConsNotSmiIndex();
}
+%OptimizeFunctionOnNextCall(ConsNotSmiIndex);
+ConsNotSmiIndex();
for (var i = 0; i != 10; i++) {
@@ -222,6 +226,8 @@ function directlyOnPrototype() {
assertEquals(99, "c".x(0));
}
-for (var i = 0; i < 10000; i++) {
+for (var i = 0; i < 5; i++) {
directlyOnPrototype();
}
+%OptimizeFunctionOnNextCall(directlyOnPrototype);
+directlyOnPrototype();
« no previous file with comments | « test/mjsunit/regress/regress-962.js ('k') | test/mjsunit/sum-0-plus-undefined-is-NaN.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698