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

Side by Side Diff: src/objects.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/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;
9997 Isolate* isolate = map->GetIsolate(); 9995 Isolate* isolate = map->GetIsolate();
9998 Handle<FixedArray> cache(map->code_cache(), isolate); 9996 Handle<FixedArray> cache(map->code_cache(), isolate);
9999 Handle<FixedArray> new_cache = CodeCache::Put(isolate, cache, name, code); 9997 Handle<FixedArray> new_cache = CodeCache::Put(isolate, cache, name, code);
10000 map->set_code_cache(*new_cache); 9998 map->set_code_cache(*new_cache);
10001 } 9999 }
10002 10000
10003 Code* Map::LookupInCodeCache(Name* name, Code::Flags flags) { 10001 Code* Map::LookupInCodeCache(Name* name, Code::Flags flags) {
10004 return CodeCache::Lookup(code_cache(), name, flags); 10002 return CodeCache::Lookup(code_cache(), name, flags);
10005 } 10003 }
10006 10004
(...skipping 10257 matching lines...) Expand 10 before | Expand all | Expand 10 after
20264 ns, Accessors::ModuleNamespaceEntryInfo(isolate, name, attr)) 20262 ns, Accessors::ModuleNamespaceEntryInfo(isolate, name, attr))
20265 .Check(); 20263 .Check();
20266 } 20264 }
20267 JSObject::PreventExtensions(ns, THROW_ON_ERROR).ToChecked(); 20265 JSObject::PreventExtensions(ns, THROW_ON_ERROR).ToChecked();
20268 20266
20269 return ns; 20267 return ns;
20270 } 20268 }
20271 20269
20272 } // namespace internal 20270 } // namespace internal
20273 } // namespace v8 20271 } // 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