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

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, 10 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
« src/type-info.cc ('K') | « src/type-info.cc ('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..527e2643a19e4a2f4a386dab81e10304bd2d0879 100644
--- a/test/mjsunit/array-constructor-feedback.js
+++ b/test/mjsunit/array-constructor-feedback.js
@@ -82,7 +82,7 @@ function assertKind(expected, obj, name_opt) {
if (support_smi_only_arrays) {
- // Test: If a call site goes megamorphic, it loses the ability to
+ // Test: If a call site goes megamorphic, it retains the ability to
// use allocation site feedback.
(function() {
function bar(t, len) {
@@ -95,10 +95,7 @@ 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);
+ assertKind(elements_kind.fast_double, b);
})();
@@ -123,13 +120,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);
+ }
})();
« src/type-info.cc ('K') | « src/type-info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698