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

Unified Diff: test/mjsunit/compiler/deopt-args.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/count-deopt.js ('k') | test/mjsunit/compiler/inline-compare.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/deopt-args.js
diff --git a/test/mjsunit/compiler/deopt-args.js b/test/mjsunit/compiler/deopt-args.js
index 780e2a24a0a204ef106520173a2153dfb4e9644c..17c397c1525a7b7cd5790d3918a337438af3d93e 100644
--- a/test/mjsunit/compiler/deopt-args.js
+++ b/test/mjsunit/compiler/deopt-args.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
+
function g(x) {
return x.f(0,1,2);
}
@@ -35,9 +37,11 @@ function f(a,b,c) {
var object = { };
object.f = f;
-for (var i = 0; i < 10000000; i++) {
+for (var i = 0; i < 5; i++) {
assertEquals(42, g(object));
}
+%OptimizeFunctionOnNextCall(g);
+g(object);
object.f = function(a,b,c) { return 87; };
assertEquals(87, g(object));
« no previous file with comments | « test/mjsunit/compiler/count-deopt.js ('k') | test/mjsunit/compiler/inline-compare.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698