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

Side by Side Diff: src/ic/arm/handler-compiler-arm.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 | « 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 195
196 // Generate code to check that a global property cell is empty. Create 196 // Generate code to check that a global property cell is empty. Create
197 // the property cell at compilation time if no cell exists for the 197 // the property cell at compilation time if no cell exists for the
198 // property. 198 // property.
199 void PropertyHandlerCompiler::GenerateCheckPropertyCell( 199 void PropertyHandlerCompiler::GenerateCheckPropertyCell(
200 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name, 200 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name,
201 Register scratch, Label* miss) { 201 Register scratch, Label* miss) {
202 Handle<Cell> cell = JSGlobalObject::EnsurePropertyCell(global, name); 202 Handle<Cell> cell = JSGlobalObject::EnsurePropertyCell(global, name);
203 DCHECK(cell->value()->IsTheHole()); 203 DCHECK(cell->value()->IsTheHole());
204 __ mov(scratch, Operand(cell)); 204 Handle<WeakCell> weak_cell = masm->isolate()->factory()->NewWeakCell(cell);
205 __ LoadWeakValue(scratch, weak_cell, miss);
205 __ ldr(scratch, FieldMemOperand(scratch, Cell::kValueOffset)); 206 __ ldr(scratch, FieldMemOperand(scratch, Cell::kValueOffset));
206 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); 207 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
207 __ cmp(scratch, ip); 208 __ cmp(scratch, ip);
208 __ b(ne, miss); 209 __ b(ne, miss);
209 } 210 }
210 211
211 212
212 static void PushInterceptorArguments(MacroAssembler* masm, Register receiver, 213 static void PushInterceptorArguments(MacroAssembler* masm, Register receiver,
213 Register holder, Register name, 214 Register holder, Register name,
214 Handle<JSObject> holder_obj) { 215 Handle<JSObject> holder_obj) {
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 // Return the generated code. 752 // Return the generated code.
752 return GetCode(kind(), Code::NORMAL, name); 753 return GetCode(kind(), Code::NORMAL, name);
753 } 754 }
754 755
755 756
756 #undef __ 757 #undef __
757 } 758 }
758 } // namespace v8::internal 759 } // namespace v8::internal
759 760
760 #endif // V8_TARGET_ARCH_ARM 761 #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