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

Side by Side Diff: src/ic/ic.cc

Issue 1840193003: Speed up accessing default code caches in maps. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | src/objects.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/ic/ic.h" 5 #include "src/ic/ic.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/api-arguments.h" 9 #include "src/api-arguments.h"
10 #include "src/arguments.h" 10 #include "src/arguments.h"
(...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 return code; 1091 return code;
1092 } 1092 }
1093 } 1093 }
1094 } 1094 }
1095 1095
1096 code = CompileHandler(lookup, value, flag); 1096 code = CompileHandler(lookup, value, flag);
1097 DCHECK(code->is_handler()); 1097 DCHECK(code->is_handler());
1098 1098
1099 // TODO(mvstanton): we'd only like to cache code on the map when it's custom 1099 // TODO(mvstanton): we'd only like to cache code on the map when it's custom
1100 // code compiled for this map, otherwise it's already cached in the global 1100 // code compiled for this map, otherwise it's already cached in the global
1101 // code 1101 // code cache. We are also guarding against installing code with flags that
1102 // cache. We are also guarding against installing code with flags that don't 1102 // don't match the desired CacheHolderFlag computed above, which would lead to
1103 // match the desired CacheHolderFlag computed above, which would lead to
1104 // invalid lookups later. 1103 // invalid lookups later.
1105 if (code->type() != Code::NORMAL && 1104 if (code->type() != Code::NORMAL &&
1106 Code::ExtractCacheHolderFromFlags(code->flags()) == flag) { 1105 Code::ExtractCacheHolderFromFlags(code->flags()) == flag) {
1107 Map::UpdateCodeCache(stub_holder_map, lookup->name(), code); 1106 Map::UpdateCodeCache(stub_holder_map, lookup->name(), code);
1108 } 1107 }
1109 1108
1110 return code; 1109 return code;
1111 } 1110 }
1112 1111
1113 1112
(...skipping 1845 matching lines...) Expand 10 before | Expand all | Expand 10 after
2959 KeyedLoadICNexus nexus(vector, vector_slot); 2958 KeyedLoadICNexus nexus(vector, vector_slot);
2960 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); 2959 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
2961 ic.UpdateState(receiver, key); 2960 ic.UpdateState(receiver, key);
2962 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key)); 2961 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key));
2963 } 2962 }
2964 2963
2965 return *result; 2964 return *result;
2966 } 2965 }
2967 } // namespace internal 2966 } // namespace internal
2968 } // namespace v8 2967 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698