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

Side by Side Diff: src/ic/arm64/handler-compiler-arm64.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/arm/handler-compiler-arm.cc ('k') | src/ic/ia32/handler-compiler-ia32.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_ARM64 7 #if V8_TARGET_ARCH_ARM64
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 105
106 // Generate code to check that a global property cell is empty. Create 106 // Generate code to check that a global property cell is empty. Create
107 // the property cell at compilation time if no cell exists for the 107 // the property cell at compilation time if no cell exists for the
108 // property. 108 // property.
109 void PropertyHandlerCompiler::GenerateCheckPropertyCell( 109 void PropertyHandlerCompiler::GenerateCheckPropertyCell(
110 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name, 110 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name,
111 Register scratch, Label* miss) { 111 Register scratch, Label* miss) {
112 Handle<Cell> cell = JSGlobalObject::EnsurePropertyCell(global, name); 112 Handle<Cell> cell = JSGlobalObject::EnsurePropertyCell(global, name);
113 DCHECK(cell->value()->IsTheHole()); 113 DCHECK(cell->value()->IsTheHole());
114 __ Mov(scratch, Operand(cell)); 114 Handle<WeakCell> weak_cell = masm->isolate()->factory()->NewWeakCell(cell);
115 __ LoadWeakValue(scratch, weak_cell, miss);
115 __ Ldr(scratch, FieldMemOperand(scratch, Cell::kValueOffset)); 116 __ Ldr(scratch, FieldMemOperand(scratch, Cell::kValueOffset));
116 __ JumpIfNotRoot(scratch, Heap::kTheHoleValueRootIndex, miss); 117 __ JumpIfNotRoot(scratch, Heap::kTheHoleValueRootIndex, miss);
117 } 118 }
118 119
119 120
120 static void PushInterceptorArguments(MacroAssembler* masm, Register receiver, 121 static void PushInterceptorArguments(MacroAssembler* masm, Register receiver,
121 Register holder, Register name, 122 Register holder, Register name,
122 Handle<JSObject> holder_obj) { 123 Handle<JSObject> holder_obj) {
123 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex == 0); 124 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex == 0);
124 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsInfoIndex == 1); 125 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsInfoIndex == 1);
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 // Return the generated code. 766 // Return the generated code.
766 return GetCode(kind(), Code::FAST, name); 767 return GetCode(kind(), Code::FAST, name);
767 } 768 }
768 769
769 770
770 #undef __ 771 #undef __
771 } 772 }
772 } // namespace v8::internal 773 } // namespace v8::internal
773 774
774 #endif // V8_TARGET_ARCH_IA32 775 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ic/arm/handler-compiler-arm.cc ('k') | src/ic/ia32/handler-compiler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698