| 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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
| 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 __ mov(v0, scratch1); | 188 __ mov(v0, scratch1); |
| 189 } | 189 } |
| 190 | 190 |
| 191 | 191 |
| 192 // Generate code to check that a global property cell is empty. Create | 192 // Generate code to check that a global property cell is empty. Create |
| 193 // the property cell at compilation time if no cell exists for the | 193 // the property cell at compilation time if no cell exists for the |
| 194 // property. | 194 // property. |
| 195 void PropertyHandlerCompiler::GenerateCheckPropertyCell( | 195 void PropertyHandlerCompiler::GenerateCheckPropertyCell( |
| 196 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name, | 196 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name, |
| 197 Register scratch, Label* miss) { | 197 Register scratch, Label* miss) { |
| 198 Handle<PropertyCell> cell = JSGlobalObject::EnsurePropertyCell(global, name); | 198 Handle<PropertyCell> cell = JSGlobalObject::EnsureEmptyPropertyCell( |
| 199 global, name, PropertyCellType::kInvalidated); |
| 199 Isolate* isolate = masm->isolate(); | 200 Isolate* isolate = masm->isolate(); |
| 200 DCHECK(cell->value()->IsTheHole(isolate)); | 201 DCHECK(cell->value()->IsTheHole(isolate)); |
| 201 Handle<WeakCell> weak_cell = isolate->factory()->NewWeakCell(cell); | 202 Handle<WeakCell> weak_cell = isolate->factory()->NewWeakCell(cell); |
| 202 __ LoadWeakValue(scratch, weak_cell, miss); | 203 __ LoadWeakValue(scratch, weak_cell, miss); |
| 203 __ lw(scratch, FieldMemOperand(scratch, PropertyCell::kValueOffset)); | 204 __ lw(scratch, FieldMemOperand(scratch, PropertyCell::kValueOffset)); |
| 204 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); | 205 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); |
| 205 __ Branch(miss, ne, scratch, Operand(at)); | 206 __ Branch(miss, ne, scratch, Operand(at)); |
| 206 } | 207 } |
| 207 | 208 |
| 208 | 209 |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 // Return the generated code. | 691 // Return the generated code. |
| 691 return GetCode(kind(), name); | 692 return GetCode(kind(), name); |
| 692 } | 693 } |
| 693 | 694 |
| 694 | 695 |
| 695 #undef __ | 696 #undef __ |
| 696 } // namespace internal | 697 } // namespace internal |
| 697 } // namespace v8 | 698 } // namespace v8 |
| 698 | 699 |
| 699 #endif // V8_TARGET_ARCH_MIPS | 700 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |