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

Unified Diff: test/mjsunit/array-constructor-feedback.js

Issue 132963012: Pretenure call new support. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. Created 6 years, 9 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/allocation-site-info.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/array-constructor-feedback.js
diff --git a/test/mjsunit/array-constructor-feedback.js b/test/mjsunit/array-constructor-feedback.js
index 7cd421bd1b86c16f7f3e096dc7be639f7d262022..45d5c58c7726630982795ec598d547c3551b3143 100644
--- a/test/mjsunit/array-constructor-feedback.js
+++ b/test/mjsunit/array-constructor-feedback.js
@@ -82,8 +82,9 @@ function assertKind(expected, obj, name_opt) {
if (support_smi_only_arrays) {
- // Test: If a call site goes megamorphic, it loses the ability to
- // use allocation site feedback.
+ // Test: If a call site goes megamorphic, it retains the ability to
+ // use allocation site feedback (if FLAG_allocation_site_pretenuring
+ // is on).
(function() {
function bar(t, len) {
return new t(len);
@@ -95,10 +96,9 @@ if (support_smi_only_arrays) {
assertKind(elements_kind.fast_double, b);
c = bar(Object, 3);
b = bar(Array, 10);
- assertKind(elements_kind.fast_smi_only, b);
- b[0] = 3.5;
- c = bar(Array, 10);
- assertKind(elements_kind.fast_smi_only, c);
+ // TODO(mvstanton): re-enable when FLAG_allocation_site_pretenuring
+ // is on in the build.
+ // assertKind(elements_kind.fast_double, b);
})();
@@ -123,13 +123,16 @@ if (support_smi_only_arrays) {
bar0(Array);
%OptimizeFunctionOnNextCall(bar0);
b = bar0(Array);
- // We also lost our ability to record kind feedback, as the site
- // is megamorphic now.
- assertKind(elements_kind.fast_smi_only, b);
- assertOptimized(bar0);
- b[0] = 3.5;
- c = bar0(Array);
- assertKind(elements_kind.fast_smi_only, c);
+ // This only makes sense to test if we allow crankshafting
+ if (4 != %GetOptimizationStatus(bar0)) {
+ // We also lost our ability to record kind feedback, as the site
+ // is megamorphic now.
+ assertKind(elements_kind.fast_smi_only, b);
+ assertOptimized(bar0);
+ b[0] = 3.5;
+ c = bar0(Array);
+ assertKind(elements_kind.fast_smi_only, c);
+ }
})();
« no previous file with comments | « test/mjsunit/allocation-site-info.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698