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

Unified Diff: test/mjsunit/keyed-array-call.js

Issue 23537067: Add support for keyed-call on arrays of fast elements (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Compare with actual map loaded from the context Created 7 years, 3 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/ic.cc ('K') | « src/typing.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/keyed-array-call.js
diff --git a/test/mjsunit/compiler/increment-typefeedback.js b/test/mjsunit/keyed-array-call.js
similarity index 82%
copy from test/mjsunit/compiler/increment-typefeedback.js
copy to test/mjsunit/keyed-array-call.js
index 798959296c43014f252d65ae5dd11e00563bfd04..376e18d291a8f0ccde38247afa9d3bdfe12d2290 100644
--- a/test/mjsunit/compiler/increment-typefeedback.js
+++ b/test/mjsunit/keyed-array-call.js
@@ -25,15 +25,17 @@
// (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 f(x) {
- x++;
- return x;
+var a = [function(a) { return a+10; },
+ function(a) { return a+20; }];
+a.test = function(a) { return a+30; }
danno 2013/10/02 08:49:11 How about tests that actually test the holey versi
+function f(i) {
+ return "r" + (1, a[i](i+1), a[i](i+2));
}
-f(0.5);
-f(0.5);
-%OptimizeFunctionOnNextCall(f);
-f(0.5);
-assertOptimized(f);
+assertEquals("r12", f(0));
+assertEquals("r12", f(0));
+assertEquals("r23", f(1));
+assertEquals("r23", f(1));
+
+// Deopt the stub.
+assertEquals("rtest230", f("test"));
« src/ic.cc ('K') | « src/typing.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698