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

Side by Side Diff: src/ic/arm/handler-compiler-arm.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, 9 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/ic/arm64/handler-compiler-arm64.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/ic/call-optimization.h" 9 #include "src/ic/call-optimization.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 466
467 GenerateDictionaryNegativeLookup(masm(), miss, reg, name, scratch1, 467 GenerateDictionaryNegativeLookup(masm(), miss, reg, name, scratch1,
468 scratch2); 468 scratch2);
469 469
470 __ ldr(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset)); 470 __ ldr(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset));
471 reg = holder_reg; // From now on the object will be in holder_reg. 471 reg = holder_reg; // From now on the object will be in holder_reg.
472 __ ldr(reg, FieldMemOperand(scratch1, Map::kPrototypeOffset)); 472 __ ldr(reg, FieldMemOperand(scratch1, Map::kPrototypeOffset));
473 } else { 473 } else {
474 Register map_reg = scratch1; 474 Register map_reg = scratch1;
475 __ ldr(map_reg, FieldMemOperand(reg, HeapObject::kMapOffset)); 475 __ ldr(map_reg, FieldMemOperand(reg, HeapObject::kMapOffset));
476 if (depth != 1 || check == CHECK_ALL_MAPS) { 476
477 if (current_map->IsJSGlobalObjectMap()) {
478 GenerateCheckPropertyCell(masm(), Handle<JSGlobalObject>::cast(current),
479 name, scratch2, miss);
480 } else if (depth != 1 || check == CHECK_ALL_MAPS) {
477 Handle<WeakCell> cell = Map::WeakCellForMap(current_map); 481 Handle<WeakCell> cell = Map::WeakCellForMap(current_map);
478 __ CmpWeakValue(map_reg, cell, scratch2); 482 __ CmpWeakValue(map_reg, cell, scratch2);
479 __ b(ne, miss); 483 __ b(ne, miss);
480 } 484 }
481 485
482 if (current_map->IsJSGlobalObjectMap()) {
483 GenerateCheckPropertyCell(masm(), Handle<JSGlobalObject>::cast(current),
484 name, scratch2, miss);
485 }
486
487 reg = holder_reg; // From now on the object will be in holder_reg. 486 reg = holder_reg; // From now on the object will be in holder_reg.
488 487
489 __ ldr(reg, FieldMemOperand(map_reg, Map::kPrototypeOffset)); 488 __ ldr(reg, FieldMemOperand(map_reg, Map::kPrototypeOffset));
490 } 489 }
491 490
492 // Go to the next object in the prototype chain. 491 // Go to the next object in the prototype chain.
493 current = prototype; 492 current = prototype;
494 current_map = handle(current->map()); 493 current_map = handle(current->map());
495 } 494 }
496 495
496 DCHECK(!current_map->IsJSGlobalProxyMap());
497
497 // Log the check depth. 498 // Log the check depth.
498 LOG(isolate(), IntEvent("check-maps-depth", depth + 1)); 499 LOG(isolate(), IntEvent("check-maps-depth", depth + 1));
499 500
500 if (depth != 0 || check == CHECK_ALL_MAPS) { 501 if (depth != 0 || check == CHECK_ALL_MAPS) {
501 // Check the holder map. 502 // Check the holder map.
502 __ ldr(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset)); 503 __ ldr(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset));
503 Handle<WeakCell> cell = Map::WeakCellForMap(current_map); 504 Handle<WeakCell> cell = Map::WeakCellForMap(current_map);
504 __ CmpWeakValue(scratch1, cell, scratch2); 505 __ CmpWeakValue(scratch1, cell, scratch2);
505 __ b(ne, miss); 506 __ b(ne, miss);
506 } 507 }
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 // Return the generated code. 749 // Return the generated code.
749 return GetCode(kind(), Code::NORMAL, name); 750 return GetCode(kind(), Code::NORMAL, name);
750 } 751 }
751 752
752 753
753 #undef __ 754 #undef __
754 } 755 }
755 } // namespace v8::internal 756 } // namespace v8::internal
756 757
757 #endif // V8_TARGET_ARCH_ARM 758 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ic/arm64/handler-compiler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698