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

Unified Diff: test/mjsunit/allocation-site-info.js

Issue 148503002: A64: Synchronize with r15545. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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/cctest/test-types.cc ('k') | test/mjsunit/array-constructor-feedback.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/allocation-site-info.js
diff --git a/test/mjsunit/allocation-site-info.js b/test/mjsunit/allocation-site-info.js
index 542f874f334c7a5bf70cc067662c4d2b595a7641..1369a2d2ec801b1861d7b4f91d9fcd5936ec1746 100644
--- a/test/mjsunit/allocation-site-info.js
+++ b/test/mjsunit/allocation-site-info.js
@@ -89,7 +89,6 @@ function assertNotHoley(obj, name_opt) {
}
if (support_smi_only_arrays) {
-
obj = [];
assertNotHoley(obj);
assertKind(elements_kind.fast_smi_only, obj);
@@ -134,9 +133,7 @@ if (support_smi_only_arrays) {
obj = fastliteralcase(get_standard_literal(), 1.5);
assertKind(elements_kind.fast_double, obj);
obj = fastliteralcase(get_standard_literal(), 2);
- // TODO(hpayer): bring the following assert back as soon as allocation
- // sites work again for fast literals
- //assertKind(elements_kind.fast_double, obj);
+ assertKind(elements_kind.fast_double, obj);
// The test below is in a loop because arrays that live
// at global scope without the chance of being recreated
@@ -176,9 +173,7 @@ if (support_smi_only_arrays) {
obj = fastliteralcase_smifast("carter");
assertKind(elements_kind.fast, obj);
obj = fastliteralcase_smifast(2);
- // TODO(hpayer): bring the following assert back as soon as allocation
- // sites work again for fast literals
- //assertKind(elements_kind.fast, obj);
+ assertKind(elements_kind.fast, obj);
function newarraycase_smidouble(value) {
var a = new Array();
@@ -305,9 +300,26 @@ if (support_smi_only_arrays) {
var realmBArray = Realm.eval(realmB, "Array");
instanceof_check(Array);
instanceof_check(realmBArray);
- %OptimizeFunctionOnNextCall(instanceof_check);
+ %OptimizeFunctionOnNextCall(instanceof_check);
+
+ // No de-opt will occur because HCallNewArray wasn't selected, on account of
+ // the call site not being monomorphic to Array.
+ instanceof_check(Array);
+ assertTrue(2 != %GetOptimizationStatus(instanceof_check));
+ instanceof_check(realmBArray);
+ assertTrue(2 != %GetOptimizationStatus(instanceof_check));
+
+ // Try to optimize again, but first clear all type feedback, and allow it
+ // to be monomorphic on first call. Only after crankshafting do we introduce
+ // realmBArray. This should deopt the method.
+ %DeoptimizeFunction(instanceof_check);
+ %ClearFunctionTypeFeedback(instanceof_check);
+ instanceof_check(Array);
+ instanceof_check(Array);
+ %OptimizeFunctionOnNextCall(instanceof_check);
instanceof_check(Array);
assertTrue(2 != %GetOptimizationStatus(instanceof_check));
+
instanceof_check(realmBArray);
assertTrue(1 != %GetOptimizationStatus(instanceof_check));
}
« no previous file with comments | « test/cctest/test-types.cc ('k') | test/mjsunit/array-constructor-feedback.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698