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

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

Issue 815143002: Use weak cells in CheckPropertyCell. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase 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 unified diff | Download patch
« no previous file with comments | « src/ic/mips64/handler-compiler-mips64.cc ('k') | src/ic/x87/handler-compiler-x87.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_X64 7 #if V8_TARGET_ARCH_X64
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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 CallApiAccessorStub stub(isolate, is_store, call_data_undefined); 204 CallApiAccessorStub stub(isolate, is_store, call_data_undefined);
205 __ TailCallStub(&stub); 205 __ TailCallStub(&stub);
206 } 206 }
207 207
208 208
209 void PropertyHandlerCompiler::GenerateCheckPropertyCell( 209 void PropertyHandlerCompiler::GenerateCheckPropertyCell(
210 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name, 210 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name,
211 Register scratch, Label* miss) { 211 Register scratch, Label* miss) {
212 Handle<PropertyCell> cell = JSGlobalObject::EnsurePropertyCell(global, name); 212 Handle<PropertyCell> cell = JSGlobalObject::EnsurePropertyCell(global, name);
213 DCHECK(cell->value()->IsTheHole()); 213 DCHECK(cell->value()->IsTheHole());
214 __ Move(scratch, cell); 214 Factory* factory = masm->isolate()->factory();
215 __ Cmp(FieldOperand(scratch, Cell::kValueOffset), 215 Handle<WeakCell> weak_cell = factory->NewWeakCell(cell);
216 masm->isolate()->factory()->the_hole_value()); 216 __ LoadWeakValue(scratch, weak_cell, miss);
217 __ Cmp(FieldOperand(scratch, Cell::kValueOffset), factory->the_hole_value());
217 __ j(not_equal, miss); 218 __ j(not_equal, miss);
218 } 219 }
219 220
220 221
221 void NamedStoreHandlerCompiler::GenerateStoreViaSetter( 222 void NamedStoreHandlerCompiler::GenerateStoreViaSetter(
222 MacroAssembler* masm, Handle<HeapType> type, Register receiver, 223 MacroAssembler* masm, Handle<HeapType> type, Register receiver,
223 Register holder, int accessor_index, int expected_arguments, 224 Register holder, int accessor_index, int expected_arguments,
224 Register scratch) { 225 Register scratch) {
225 // ----------- S t a t e ------------- 226 // ----------- S t a t e -------------
226 // -- rsp[0] : return address 227 // -- rsp[0] : return address
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 // Return the generated code. 763 // Return the generated code.
763 return GetCode(kind(), Code::NORMAL, name); 764 return GetCode(kind(), Code::NORMAL, name);
764 } 765 }
765 766
766 767
767 #undef __ 768 #undef __
768 } 769 }
769 } // namespace v8::internal 770 } // namespace v8::internal
770 771
771 #endif // V8_TARGET_ARCH_X64 772 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ic/mips64/handler-compiler-mips64.cc ('k') | src/ic/x87/handler-compiler-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698