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

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

Issue 2474653002: Revert of [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
46 CcTest::InitializeVM(); 43 CcTest::InitializeVM();
47 Isolate* isolate = CcTest::i_isolate(); 44 Isolate* isolate = CcTest::i_isolate();
48 Factory* factory = isolate->factory(); 45 Factory* factory = isolate->factory();
49 HandleScope handle_scope(isolate); 46 HandleScope handle_scope(isolate);
50 47
51 Handle<Map> map = 48 Handle<Map> map =
52 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize, FAST_ELEMENTS); 49 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize, FAST_ELEMENTS);
53 50
54 // This number should be large enough to cause the code cache to use its 51 // This number should be large enough to cause the code cache to use its
55 // hash table storage format. 52 // hash table storage format.
(...skipping 24 matching lines...) Expand all
80 // Check that lookup works not only right after storing. 77 // Check that lookup works not only right after storing.
81 for (int i = 0; i < kEntries; i++) { 78 for (int i = 0; i < kEntries; i++) {
82 Handle<Name> name = names.at(i); 79 Handle<Name> name = names.at(i);
83 Handle<Code> code = codes.at(i); 80 Handle<Code> code = codes.at(i);
84 CHECK_EQ(*code, map->LookupInCodeCache(*name, code->flags())); 81 CHECK_EQ(*code, map->LookupInCodeCache(*name, code->flags()));
85 } 82 }
86 } 83 }
87 84
88 } // namespace internal 85 } // namespace internal
89 } // namespace v8 86 } // 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