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

Side by Side Diff: src/objects.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/ic/handler-compiler.cc ('k') | test/cctest/test-code-cache.cc » ('j') | 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/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <memory> 9 #include <memory>
10 #include <sstream> 10 #include <sstream>
(...skipping 9974 matching lines...) Expand 10 before | Expand all | Expand 10 after
9985 9985
9986 static inline int GetLinearUsage(FixedArray* linear_cache) { 9986 static inline int GetLinearUsage(FixedArray* linear_cache) {
9987 DCHECK_GT(linear_cache->length(), kEntrySize); 9987 DCHECK_GT(linear_cache->length(), kEntrySize);
9988 return Smi::cast(linear_cache->get(kLinearUsageIndex))->value(); 9988 return Smi::cast(linear_cache->get(kLinearUsageIndex))->value();
9989 } 9989 }
9990 }; 9990 };
9991 9991
9992 void Map::UpdateCodeCache(Handle<Map> map, 9992 void Map::UpdateCodeCache(Handle<Map> map,
9993 Handle<Name> name, 9993 Handle<Name> name,
9994 Handle<Code> code) { 9994 Handle<Code> code) {
9995 // TODO(ishell): Experiment: don't cache handlers in map-specific code cache.
9996 return;
9995 Isolate* isolate = map->GetIsolate(); 9997 Isolate* isolate = map->GetIsolate();
9996 Handle<FixedArray> cache(map->code_cache(), isolate); 9998 Handle<FixedArray> cache(map->code_cache(), isolate);
9997 Handle<FixedArray> new_cache = CodeCache::Put(isolate, cache, name, code); 9999 Handle<FixedArray> new_cache = CodeCache::Put(isolate, cache, name, code);
9998 map->set_code_cache(*new_cache); 10000 map->set_code_cache(*new_cache);
9999 } 10001 }
10000 10002
10001 Code* Map::LookupInCodeCache(Name* name, Code::Flags flags) { 10003 Code* Map::LookupInCodeCache(Name* name, Code::Flags flags) {
10002 return CodeCache::Lookup(code_cache(), name, flags); 10004 return CodeCache::Lookup(code_cache(), name, flags);
10003 } 10005 }
10004 10006
(...skipping 10257 matching lines...) Expand 10 before | Expand all | Expand 10 after
20262 ns, Accessors::ModuleNamespaceEntryInfo(isolate, name, attr)) 20264 ns, Accessors::ModuleNamespaceEntryInfo(isolate, name, attr))
20263 .Check(); 20265 .Check();
20264 } 20266 }
20265 JSObject::PreventExtensions(ns, THROW_ON_ERROR).ToChecked(); 20267 JSObject::PreventExtensions(ns, THROW_ON_ERROR).ToChecked();
20266 20268
20267 return ns; 20269 return ns;
20268 } 20270 }
20269 20271
20270 } // namespace internal 20272 } // namespace internal
20271 } // namespace v8 20273 } // namespace v8
OLDNEW
« no previous file with comments | « src/ic/handler-compiler.cc ('k') | test/cctest/test-code-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698