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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 __ Ret(); | 102 __ Ret(); |
103 } | 103 } |
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<PropertyCell> cell = JSGlobalObject::EnsurePropertyCell(global, name); | 112 Handle<PropertyCell> cell = JSGlobalObject::EnsureEmptyPropertyCell( |
| 113 global, name, PropertyCellType::kInvalidated); |
113 Isolate* isolate = masm->isolate(); | 114 Isolate* isolate = masm->isolate(); |
114 DCHECK(cell->value()->IsTheHole(isolate)); | 115 DCHECK(cell->value()->IsTheHole(isolate)); |
115 Handle<WeakCell> weak_cell = isolate->factory()->NewWeakCell(cell); | 116 Handle<WeakCell> weak_cell = isolate->factory()->NewWeakCell(cell); |
116 __ LoadWeakValue(scratch, weak_cell, miss); | 117 __ LoadWeakValue(scratch, weak_cell, miss); |
117 __ Ldr(scratch, FieldMemOperand(scratch, PropertyCell::kValueOffset)); | 118 __ Ldr(scratch, FieldMemOperand(scratch, PropertyCell::kValueOffset)); |
118 __ JumpIfNotRoot(scratch, Heap::kTheHoleValueRootIndex, miss); | 119 __ JumpIfNotRoot(scratch, Heap::kTheHoleValueRootIndex, miss); |
119 } | 120 } |
120 | 121 |
121 | 122 |
122 static void PushInterceptorArguments(MacroAssembler* masm, Register receiver, | 123 static void PushInterceptorArguments(MacroAssembler* masm, Register receiver, |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 // Return the generated code. | 704 // Return the generated code. |
704 return GetCode(kind(), name); | 705 return GetCode(kind(), name); |
705 } | 706 } |
706 | 707 |
707 | 708 |
708 #undef __ | 709 #undef __ |
709 } // namespace internal | 710 } // namespace internal |
710 } // namespace v8 | 711 } // namespace v8 |
711 | 712 |
712 #endif // V8_TARGET_ARCH_IA32 | 713 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |