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_PPC | 5 #if V8_TARGET_ARCH_PPC |
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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 __ Ret(); | 191 __ Ret(); |
192 } | 192 } |
193 | 193 |
194 | 194 |
195 // Generate code to check that a global property cell is empty. Create | 195 // Generate code to check that a global property cell is empty. Create |
196 // the property cell at compilation time if no cell exists for the | 196 // the property cell at compilation time if no cell exists for the |
197 // property. | 197 // property. |
198 void PropertyHandlerCompiler::GenerateCheckPropertyCell( | 198 void PropertyHandlerCompiler::GenerateCheckPropertyCell( |
199 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name, | 199 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name, |
200 Register scratch, Label* miss) { | 200 Register scratch, Label* miss) { |
201 Handle<PropertyCell> cell = JSGlobalObject::EnsurePropertyCell(global, name); | 201 Handle<PropertyCell> cell = JSGlobalObject::EnsureEmptyPropertyCell( |
| 202 global, name, PropertyCellType::kInvalidated); |
202 Isolate* isolate = masm->isolate(); | 203 Isolate* isolate = masm->isolate(); |
203 DCHECK(cell->value()->IsTheHole(isolate)); | 204 DCHECK(cell->value()->IsTheHole(isolate)); |
204 Handle<WeakCell> weak_cell = isolate->factory()->NewWeakCell(cell); | 205 Handle<WeakCell> weak_cell = isolate->factory()->NewWeakCell(cell); |
205 __ LoadWeakValue(scratch, weak_cell, miss); | 206 __ LoadWeakValue(scratch, weak_cell, miss); |
206 __ LoadP(scratch, FieldMemOperand(scratch, PropertyCell::kValueOffset)); | 207 __ LoadP(scratch, FieldMemOperand(scratch, PropertyCell::kValueOffset)); |
207 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); | 208 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); |
208 __ cmp(scratch, ip); | 209 __ cmp(scratch, ip); |
209 __ bne(miss); | 210 __ bne(miss); |
210 } | 211 } |
211 | 212 |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 // Return the generated code. | 700 // Return the generated code. |
700 return GetCode(kind(), name); | 701 return GetCode(kind(), name); |
701 } | 702 } |
702 | 703 |
703 | 704 |
704 #undef __ | 705 #undef __ |
705 } // namespace internal | 706 } // namespace internal |
706 } // namespace v8 | 707 } // namespace v8 |
707 | 708 |
708 #endif // V8_TARGET_ARCH_ARM | 709 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |