OLD | NEW |
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 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
6 | 6 |
7 #include "src/ic/handler-compiler.h" | 7 #include "src/ic/handler-compiler.h" |
8 | 8 |
9 #include "src/api-arguments.h" | 9 #include "src/api-arguments.h" |
10 #include "src/field-type.h" | 10 #include "src/field-type.h" |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 __ Ret(); | 196 __ Ret(); |
197 } | 197 } |
198 | 198 |
199 | 199 |
200 // Generate code to check that a global property cell is empty. Create | 200 // Generate code to check that a global property cell is empty. Create |
201 // the property cell at compilation time if no cell exists for the | 201 // the property cell at compilation time if no cell exists for the |
202 // property. | 202 // property. |
203 void PropertyHandlerCompiler::GenerateCheckPropertyCell( | 203 void PropertyHandlerCompiler::GenerateCheckPropertyCell( |
204 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name, | 204 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name, |
205 Register scratch, Label* miss) { | 205 Register scratch, Label* miss) { |
206 Handle<PropertyCell> cell = JSGlobalObject::EnsurePropertyCell(global, name); | 206 Handle<PropertyCell> cell = JSGlobalObject::EnsureEmptyPropertyCell( |
| 207 global, name, PropertyCellType::kInvalidated); |
207 Isolate* isolate = masm->isolate(); | 208 Isolate* isolate = masm->isolate(); |
208 DCHECK(cell->value()->IsTheHole(isolate)); | 209 DCHECK(cell->value()->IsTheHole(isolate)); |
209 Handle<WeakCell> weak_cell = isolate->factory()->NewWeakCell(cell); | 210 Handle<WeakCell> weak_cell = isolate->factory()->NewWeakCell(cell); |
210 __ LoadWeakValue(scratch, weak_cell, miss); | 211 __ LoadWeakValue(scratch, weak_cell, miss); |
211 __ ldr(scratch, FieldMemOperand(scratch, PropertyCell::kValueOffset)); | 212 __ ldr(scratch, FieldMemOperand(scratch, PropertyCell::kValueOffset)); |
212 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); | 213 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); |
213 __ cmp(scratch, ip); | 214 __ cmp(scratch, ip); |
214 __ b(ne, miss); | 215 __ b(ne, miss); |
215 } | 216 } |
216 | 217 |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 // Return the generated code. | 706 // Return the generated code. |
706 return GetCode(kind(), name); | 707 return GetCode(kind(), name); |
707 } | 708 } |
708 | 709 |
709 | 710 |
710 #undef __ | 711 #undef __ |
711 } // namespace internal | 712 } // namespace internal |
712 } // namespace v8 | 713 } // namespace v8 |
713 | 714 |
714 #endif // V8_TARGET_ARCH_ARM | 715 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |