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

Side by Side Diff: src/ic/mips/handler-compiler-mips.cc

Issue 779793004: MIPS: Change CmpWeakValue to a more MIPS like GetWeakValue. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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/mips64/handler-compiler-mips64.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_MIPS 7 #if V8_TARGET_ARCH_MIPS
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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 scratch2); 412 scratch2);
413 413
414 __ lw(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset)); 414 __ lw(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset));
415 reg = holder_reg; // From now on the object will be in holder_reg. 415 reg = holder_reg; // From now on the object will be in holder_reg.
416 __ lw(reg, FieldMemOperand(scratch1, Map::kPrototypeOffset)); 416 __ lw(reg, FieldMemOperand(scratch1, Map::kPrototypeOffset));
417 } else { 417 } else {
418 Register map_reg = scratch1; 418 Register map_reg = scratch1;
419 __ lw(map_reg, FieldMemOperand(reg, HeapObject::kMapOffset)); 419 __ lw(map_reg, FieldMemOperand(reg, HeapObject::kMapOffset));
420 if (depth != 1 || check == CHECK_ALL_MAPS) { 420 if (depth != 1 || check == CHECK_ALL_MAPS) {
421 Handle<WeakCell> cell = Map::WeakCellForMap(current_map); 421 Handle<WeakCell> cell = Map::WeakCellForMap(current_map);
422 __ CmpWeakValue(scratch2, map_reg, cell); 422 __ GetWeakValue(scratch2, cell);
423 __ Branch(miss, ne, scratch2, Operand(zero_reg)); 423 __ Branch(miss, ne, scratch2, Operand(map_reg));
424 } 424 }
425 425
426 // Check access rights to the global object. This has to happen after 426 // Check access rights to the global object. This has to happen after
427 // the map check so that we know that the object is actually a global 427 // the map check so that we know that the object is actually a global
428 // object. 428 // object.
429 // This allows us to install generated handlers for accesses to the 429 // This allows us to install generated handlers for accesses to the
430 // global proxy (as opposed to using slow ICs). See corresponding code 430 // global proxy (as opposed to using slow ICs). See corresponding code
431 // in LookupForRead(). 431 // in LookupForRead().
432 if (current_map->IsJSGlobalProxyMap()) { 432 if (current_map->IsJSGlobalProxyMap()) {
433 __ CheckAccessGlobalProxy(reg, scratch2, miss); 433 __ CheckAccessGlobalProxy(reg, scratch2, miss);
(...skipping 12 matching lines...) Expand all
446 current_map = handle(current->map()); 446 current_map = handle(current->map());
447 } 447 }
448 448
449 // Log the check depth. 449 // Log the check depth.
450 LOG(isolate(), IntEvent("check-maps-depth", depth + 1)); 450 LOG(isolate(), IntEvent("check-maps-depth", depth + 1));
451 451
452 if (depth != 0 || check == CHECK_ALL_MAPS) { 452 if (depth != 0 || check == CHECK_ALL_MAPS) {
453 // Check the holder map. 453 // Check the holder map.
454 __ lw(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset)); 454 __ lw(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset));
455 Handle<WeakCell> cell = Map::WeakCellForMap(current_map); 455 Handle<WeakCell> cell = Map::WeakCellForMap(current_map);
456 __ CmpWeakValue(scratch2, scratch1, cell); 456 __ GetWeakValue(scratch2, cell);
457 __ Branch(miss, ne, scratch2, Operand(zero_reg)); 457 __ Branch(miss, ne, scratch2, Operand(scratch1));
458 } 458 }
459 459
460 // Perform security check for access to the global object. 460 // Perform security check for access to the global object.
461 DCHECK(current_map->IsJSGlobalProxyMap() || 461 DCHECK(current_map->IsJSGlobalProxyMap() ||
462 !current_map->is_access_check_needed()); 462 !current_map->is_access_check_needed());
463 if (current_map->IsJSGlobalProxyMap()) { 463 if (current_map->IsJSGlobalProxyMap()) {
464 __ CheckAccessGlobalProxy(reg, scratch1, miss); 464 __ CheckAccessGlobalProxy(reg, scratch1, miss);
465 } 465 }
466 466
467 // Return the register containing the holder. 467 // Return the register containing the holder.
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 // Return the generated code. 684 // Return the generated code.
685 return GetCode(kind(), Code::NORMAL, name); 685 return GetCode(kind(), Code::NORMAL, name);
686 } 686 }
687 687
688 688
689 #undef __ 689 #undef __
690 } 690 }
691 } // namespace v8::internal 691 } // namespace v8::internal
692 692
693 #endif // V8_TARGET_ARCH_MIPS 693 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/ic/mips64/handler-compiler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698