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

Unified Diff: test/mjsunit/const-eval-init.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/compiler/switch-bailout.js ('k') | test/mjsunit/external-array.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/const-eval-init.js
diff --git a/test/mjsunit/const-eval-init.js b/test/mjsunit/const-eval-init.js
index 3f380d9d947f59f59f8d16c6a1fdb6f81c5b33da..d3503845d0c159f106fe7a68e95d41f14105413e 100644
--- a/test/mjsunit/const-eval-init.js
+++ b/test/mjsunit/const-eval-init.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
+
// Test the handling of initialization of deleted const variables.
// This only makes sense in local scopes since the declaration and
// initialization of consts in the global scope happen at the same
@@ -67,9 +69,11 @@ function testAssignmentArgument(x) {
assertEquals(7, x);
}
-for (var i = 0; i < 10000; i++) {
+for (var i = 0; i < 5; i++) {
testAssignmentArgument();
}
+%OptimizeFunctionOnNextCall(testAssignmentArgument);
+testAssignmentArgument();
assertEquals(6, x);
__defineSetter__('x', function() { throw 42; });
« no previous file with comments | « test/mjsunit/compiler/switch-bailout.js ('k') | test/mjsunit/external-array.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698