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

Side by Side Diff: test/cctest/test-code-stub-assembler.cc

Issue 2040193002: [stubs] Fixed tests that prevented LoadICTF stubs from being enabled. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « test/cctest/test-api.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/base/utils/random-number-generator.h" 5 #include "src/base/utils/random-number-generator.h"
6 #include "src/ic/stub-cache.h" 6 #include "src/ic/stub-cache.h"
7 #include "src/interface-descriptors.h" 7 #include "src/interface-descriptors.h"
8 #include "src/isolate.h" 8 #include "src/isolate.h"
9 #include "test/cctest/compiler/function-tester.h" 9 #include "test/cctest/compiler/function-tester.h"
10 10
(...skipping 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after
1320 names.push_back(name); 1320 names.push_back(name);
1321 } 1321 }
1322 1322
1323 // Generate some number of receiver maps and receivers. 1323 // Generate some number of receiver maps and receivers.
1324 for (int i = 0; i < StubCache::kSecondaryTableSize / 2; i++) { 1324 for (int i = 0; i < StubCache::kSecondaryTableSize / 2; i++) {
1325 Handle<Map> map = Map::Create(isolate, 0); 1325 Handle<Map> map = Map::Create(isolate, 0);
1326 receivers.push_back(factory->NewJSObjectFromMap(map)); 1326 receivers.push_back(factory->NewJSObjectFromMap(map));
1327 } 1327 }
1328 1328
1329 // Generate some number of handlers. 1329 // Generate some number of handlers.
1330 for (int i = 0; i < StubCache::kSecondaryTableSize; i++) { 1330 for (int i = 0; i < 30; i++) {
1331 Code::Kind code_kind; 1331 Code::Kind code_kind;
1332 switch (rand_gen.NextInt(4)) { 1332 switch (rand_gen.NextInt(4)) {
1333 case 0: 1333 case 0:
1334 code_kind = Code::LOAD_IC; 1334 code_kind = Code::LOAD_IC;
1335 break; 1335 break;
1336 case 1: 1336 case 1:
1337 code_kind = Code::KEYED_LOAD_IC; 1337 code_kind = Code::KEYED_LOAD_IC;
1338 break; 1338 break;
1339 case 2: 1339 case 2:
1340 code_kind = Code::STORE_IC; 1340 code_kind = Code::STORE_IC;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 1396
1397 Handle<Code> expected_handler(handler, isolate); 1397 Handle<Code> expected_handler(handler, isolate);
1398 ft.CheckTrue(receiver, name, expected_handler); 1398 ft.CheckTrue(receiver, name, expected_handler);
1399 } 1399 }
1400 // Ensure we performed both kind of queries. 1400 // Ensure we performed both kind of queries.
1401 CHECK(queried_existing && queried_non_existing); 1401 CHECK(queried_existing && queried_non_existing);
1402 } 1402 }
1403 1403
1404 } // namespace internal 1404 } // namespace internal
1405 } // namespace v8 1405 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/test-api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698