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

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

Issue 814193004: MIPS64: Use weak cell in LoadGlobal handler. (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 | no next file » | 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_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
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 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) { 695 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) {
696 Label miss; 696 Label miss;
697 if (IC::ICUseVector(kind())) { 697 if (IC::ICUseVector(kind())) {
698 PushVectorAndSlot(); 698 PushVectorAndSlot();
699 } 699 }
700 700
701 FrontendHeader(receiver(), name, &miss); 701 FrontendHeader(receiver(), name, &miss);
702 702
703 // Get the value from the cell. 703 // Get the value from the cell.
704 Register result = StoreDescriptor::ValueRegister(); 704 Register result = StoreDescriptor::ValueRegister();
705 __ li(result, Operand(cell)); 705 Handle<WeakCell> weak_cell = factory()->NewWeakCell(cell);
706 __ LoadWeakValue(result, weak_cell, &miss);
706 __ ld(result, FieldMemOperand(result, Cell::kValueOffset)); 707 __ ld(result, FieldMemOperand(result, Cell::kValueOffset));
707 708
708 // Check for deleted property if property can actually be deleted. 709 // Check for deleted property if property can actually be deleted.
709 if (is_configurable) { 710 if (is_configurable) {
710 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); 711 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
711 __ Branch(&miss, eq, result, Operand(at)); 712 __ Branch(&miss, eq, result, Operand(at));
712 } 713 }
713 714
714 Counters* counters = isolate()->counters(); 715 Counters* counters = isolate()->counters();
715 __ IncrementCounter(counters->named_load_global_stub(), 1, a1, a3); 716 __ IncrementCounter(counters->named_load_global_stub(), 1, a1, a3);
716 if (IC::ICUseVector(kind())) { 717 if (IC::ICUseVector(kind())) {
717 DiscardVectorAndSlot(); 718 DiscardVectorAndSlot();
718 } 719 }
719 __ Ret(USE_DELAY_SLOT); 720 __ Ret(USE_DELAY_SLOT);
720 __ mov(v0, result); 721 __ mov(v0, result);
721 722
722 FrontendFooter(name, &miss); 723 FrontendFooter(name, &miss);
723 724
724 // Return the generated code. 725 // Return the generated code.
725 return GetCode(kind(), Code::NORMAL, name); 726 return GetCode(kind(), Code::NORMAL, name);
726 } 727 }
727 728
728 729
729 #undef __ 730 #undef __
730 } 731 }
731 } // namespace v8::internal 732 } // namespace v8::internal
732 733
733 #endif // V8_TARGET_ARCH_MIPS64 734 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698