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

Side by Side Diff: test/cctest/test-code-cache.cc

Issue 2462973003: [ic] Experiment: disable map-specific handler cache. (Closed)
Patch Set: Created 4 years, 1 month 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 | « src/objects.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/factory.h" 7 #include "src/factory.h"
8 #include "src/isolate.h" 8 #include "src/isolate.h"
9 #include "src/list.h" 9 #include "src/list.h"
10 #include "src/objects.h" 10 #include "src/objects.h"
(...skipping 22 matching lines...) Expand all
33 nullptr}; // origin 33 nullptr}; // origin
34 Code::Flags flags = 34 Code::Flags flags =
35 Code::ComputeFlags(Code::LOAD_IC, kNoExtraICState, kCacheOnReceiver); 35 Code::ComputeFlags(Code::LOAD_IC, kNoExtraICState, kCacheOnReceiver);
36 Handle<Code> self_ref; 36 Handle<Code> self_ref;
37 return isolate->factory()->NewCode(desc, flags, self_ref); 37 return isolate->factory()->NewCode(desc, flags, self_ref);
38 } 38 }
39 39
40 } // namespace 40 } // namespace
41 41
42 TEST(CodeCache) { 42 TEST(CodeCache) {
43 // TODO(ishell): Experiment: don't cache handlers in map-specific code cache.
44 return;
45
43 CcTest::InitializeVM(); 46 CcTest::InitializeVM();
44 Isolate* isolate = CcTest::i_isolate(); 47 Isolate* isolate = CcTest::i_isolate();
45 Factory* factory = isolate->factory(); 48 Factory* factory = isolate->factory();
46 HandleScope handle_scope(isolate); 49 HandleScope handle_scope(isolate);
47 50
48 Handle<Map> map = 51 Handle<Map> map =
49 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize, FAST_ELEMENTS); 52 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize, FAST_ELEMENTS);
50 53
51 // This number should be large enough to cause the code cache to use its 54 // This number should be large enough to cause the code cache to use its
52 // hash table storage format. 55 // hash table storage format.
(...skipping 24 matching lines...) Expand all
77 // Check that lookup works not only right after storing. 80 // Check that lookup works not only right after storing.
78 for (int i = 0; i < kEntries; i++) { 81 for (int i = 0; i < kEntries; i++) {
79 Handle<Name> name = names.at(i); 82 Handle<Name> name = names.at(i);
80 Handle<Code> code = codes.at(i); 83 Handle<Code> code = codes.at(i);
81 CHECK_EQ(*code, map->LookupInCodeCache(*name, code->flags())); 84 CHECK_EQ(*code, map->LookupInCodeCache(*name, code->flags()));
82 } 85 }
83 } 86 }
84 87
85 } // namespace internal 88 } // namespace internal
86 } // namespace v8 89 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698