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

Unified Diff: test/mjsunit/compiler/property-calls.js

Issue 6821009: Introduce runtime function %OptimizeFunctionOnNextCall to manually trigger optimization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
Index: test/mjsunit/compiler/property-calls.js
diff --git a/test/mjsunit/compiler/property-calls.js b/test/mjsunit/compiler/property-calls.js
index 3366971e8bd386d761706645f28f6b7b9c96c2c7..ad5ca81bfd6b6fe1b3cb83c72e243fe1830d34fa 100644
--- a/test/mjsunit/compiler/property-calls.js
+++ b/test/mjsunit/compiler/property-calls.js
@@ -25,12 +25,16 @@
// (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 f(o) { return o.g(); }
function g() { return 42; }
var object = { };
object.g = g;
-for (var i = 0; i < 10000000; i++) f(object);
+for (var i = 0; i < 5; i++) f(object);
+%OptimizeFunctionOnNextCall(f);
+f(object);
assertEquals(42, f(object));
object = { g: function() { return 87; } };

Powered by Google App Engine
This is Rietveld 408576698