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

Unified Diff: test/mjsunit/compiler/property-stores.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/property-refs.js ('k') | test/mjsunit/compiler/recursive-deopt.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/property-stores.js
diff --git a/test/mjsunit/compiler/property-stores.js b/test/mjsunit/compiler/property-stores.js
index 0dec82ad20b14404b24a459bd9138a4d33eb860e..4ffac07ad0f133e5064ec90f6736566282e02546 100644
--- a/test/mjsunit/compiler/property-stores.js
+++ b/test/mjsunit/compiler/property-stores.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
+
var a = 42;
var obj = {x: 0,
@@ -33,11 +35,17 @@ var obj = {x: 0,
h: function() { this.x = a; }};
var i;
-for (i = 0; i < 10000; i++) { obj.f(); }
+for (i = 0; i < 5; i++) { obj.f(); }
+%OptimizeFunctionOnNextCall(obj.f);
+obj.f();
assertEquals(7, obj.x);
-for (i = 0; i < 10000; i++) { obj.g(); }
+for (i = 0; i < 5; i++) { obj.g(); }
+%OptimizeFunctionOnNextCall(obj.g);
+obj.g();
assertEquals(43, obj.x);
-for (i = 0; i < 10000; i++) { obj.h(); }
+for (i = 0; i < 5; i++) { obj.h(); }
+%OptimizeFunctionOnNextCall(obj.h);
+obj.h();
assertEquals(42, obj.x);
« no previous file with comments | « test/mjsunit/compiler/property-refs.js ('k') | test/mjsunit/compiler/recursive-deopt.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698