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

Unified Diff: test/cctest/test-accessors.cc

Issue 23699002: load ics for js api accessors (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: as discussed 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/x64/stub-cache-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-accessors.cc
diff --git a/test/cctest/test-accessors.cc b/test/cctest/test-accessors.cc
index b68b0b0011bfafa3d521dfa99ed1406524d1c897..77b63abc39b56413441385da4416878388fe9eba 100644
--- a/test/cctest/test-accessors.cc
+++ b/test/cctest/test-accessors.cc
@@ -205,17 +205,23 @@ THREADED_TEST(AccessorIC) {
v8::Handle<v8::Array> array = v8::Handle<v8::Array>::Cast(CompileRun(
"obj.__proto__ = holder;"
"var result = [];"
+ "var key_0 = 'x0';"
+ "var key_1 = 'x1';"
"for (var i = 0; i < 10; i++) {"
" holder.x0 = i;"
- " holder.x1 = i;"
" result.push(obj.x0);"
+ " holder.x1 = i;"
" result.push(obj.x1);"
+ " holder[key_0] = i;"
+ " result.push(obj[key_0]);"
+ " holder[key_1] = i;"
+ " result.push(obj[key_1]);"
"}"
"result"));
- CHECK_EQ(20, array->Length());
- for (int i = 0; i < 20; i++) {
+ CHECK_EQ(40, array->Length());
+ for (int i = 0; i < 40; i++) {
v8::Handle<Value> entry = array->Get(v8::Integer::New(i));
- CHECK_EQ(v8::Integer::New(i/2), entry);
+ CHECK_EQ(v8::Integer::New(i/4), entry);
}
}
« src/ic.cc ('K') | « src/x64/stub-cache-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698