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

Unified Diff: test/mjsunit/compiler/inline-param.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/inline-global-access.js ('k') | test/mjsunit/compiler/inline-two.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/inline-param.js
diff --git a/test/mjsunit/compiler/inline-param.js b/test/mjsunit/compiler/inline-param.js
index 8e0933a399708fed601d91101fc5aa0b72ebe327..8fa80088feb293c64d1f9d3a70631ad53362b619 100644
--- a/test/mjsunit/compiler/inline-param.js
+++ b/test/mjsunit/compiler/inline-param.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 that we can inline a call with a parameter.
function TestInlineOneParam(o, p) {
// Effect context.
@@ -42,7 +44,9 @@ function TestInlineOneParam(o, p) {
var obj = {x:42};
var o1 = {};
o1.f = function(o) { return o.x; };
-for (var i = 0; i < 10000; i++) TestInlineOneParam(o1, obj);
+for (var i = 0; i < 5; i++) TestInlineOneParam(o1, obj);
+%OptimizeFunctionOnNextCall(TestInlineOneParam);
+TestInlineOneParam(o1, obj);
TestInlineOneParam({f: o1.f}, {x:42});
@@ -76,5 +80,7 @@ function TestInlineTwoParams(o, p) {
var o2 = {};
o2.h = function(i, j) { return i < j; };
-for (var i = 0; i < 10000; i++) TestInlineTwoParams(o2, 42);
+for (var i = 0; i < 5; i++) TestInlineTwoParams(o2, 42);
+%OptimizeFunctionOnNextCall(TestInlineTwoParams);
+TestInlineTwoParams(o2, 42);
TestInlineTwoParams({h: o2.h}, 42);
« no previous file with comments | « test/mjsunit/compiler/inline-global-access.js ('k') | test/mjsunit/compiler/inline-two.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698