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

Unified Diff: src/ic/ia32/handler-compiler-ia32.cc

Issue 961693002: Skip the mapcheck on the global object since the global proxy and cell are already checked (or the … (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Merge branches Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ic/arm64/handler-compiler-arm64.cc ('k') | src/ic/x64/handler-compiler-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ia32/handler-compiler-ia32.cc
diff --git a/src/ic/ia32/handler-compiler-ia32.cc b/src/ic/ia32/handler-compiler-ia32.cc
index 7bb426c61e559d847f11707a6d5439a04f04193c..c02d83ce46fde9e3e01f2bef32c27996aa917013 100644
--- a/src/ic/ia32/handler-compiler-ia32.cc
+++ b/src/ic/ia32/handler-compiler-ia32.cc
@@ -476,16 +476,15 @@ Register PropertyHandlerCompiler::CheckPrototypes(
} else {
Register map_reg = scratch1;
__ mov(map_reg, FieldOperand(reg, HeapObject::kMapOffset));
- if (depth != 1 || check == CHECK_ALL_MAPS) {
+ if (current_map->IsJSGlobalObjectMap()) {
+ GenerateCheckPropertyCell(masm(), Handle<JSGlobalObject>::cast(current),
+ name, scratch2, miss);
+ } else if (depth != 1 || check == CHECK_ALL_MAPS) {
Handle<WeakCell> cell = Map::WeakCellForMap(current_map);
__ CmpWeakValue(map_reg, cell, scratch2);
__ j(not_equal, miss);
}
- if (current_map->IsJSGlobalObjectMap()) {
- GenerateCheckPropertyCell(masm(), Handle<JSGlobalObject>::cast(current),
- name, scratch2, miss);
- }
reg = holder_reg; // From now on the object will be in holder_reg.
__ mov(reg, FieldOperand(map_reg, Map::kPrototypeOffset));
}
@@ -495,6 +494,8 @@ Register PropertyHandlerCompiler::CheckPrototypes(
current_map = handle(current->map());
}
+ DCHECK(!current_map->IsJSGlobalProxyMap());
+
// Log the check depth.
LOG(isolate(), IntEvent("check-maps-depth", depth + 1));
« no previous file with comments | « src/ic/arm64/handler-compiler-arm64.cc ('k') | src/ic/x64/handler-compiler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698