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

Unified Diff: test/mjsunit/compiler/property-refs.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-refs.js
diff --git a/test/mjsunit/compiler/property-refs.js b/test/mjsunit/compiler/property-refs.js
index 3f6f7937c36ed57493c68f99298b9f4c5f8bcd41..917b97d8c48f05ed2463225d349e0e38329378ab 100644
--- a/test/mjsunit/compiler/property-refs.js
+++ b/test/mjsunit/compiler/property-refs.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 Load(o) {
return o.outer.x | o.outer.inner.y;
}
@@ -45,7 +47,11 @@ function LoadXY(x, y) {
return Load(object);
}
-for (var i = 0; i < 10000; i++) LoadXY(i, i);
+for (var i = 0; i < 5; i++) LoadXY(i, i);
+%OptimizeFunctionOnNextCall(StoreXY);
Mads Ager (chromium) 2011/04/11 11:06:38 Similarly here. If you do not optimize this here,
Jakob Kummerow 2011/04/11 12:55:51 Yes, StoreXY does get inlined if only LoadXY is op
+LoadXY(6, 6);
+%OptimizeFunctionOnNextCall(LoadXY);
+LoadXY(7, 7);
assertEquals(42 | 87, LoadXY(42, 87));
assertEquals(42 | 87, LoadXY(42, 87));
assertEquals(42 | 99, LoadXY(42, "99"));

Powered by Google App Engine
This is Rietveld 408576698