| 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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
| 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 __ TailCallStub(&stub); | 229 __ TailCallStub(&stub); |
| 230 } | 230 } |
| 231 | 231 |
| 232 | 232 |
| 233 // Generate code to check that a global property cell is empty. Create | 233 // Generate code to check that a global property cell is empty. Create |
| 234 // the property cell at compilation time if no cell exists for the | 234 // the property cell at compilation time if no cell exists for the |
| 235 // property. | 235 // property. |
| 236 void PropertyHandlerCompiler::GenerateCheckPropertyCell( | 236 void PropertyHandlerCompiler::GenerateCheckPropertyCell( |
| 237 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name, | 237 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name, |
| 238 Register scratch, Label* miss) { | 238 Register scratch, Label* miss) { |
| 239 Handle<PropertyCell> cell = JSGlobalObject::EnsurePropertyCell(global, name); | 239 Handle<PropertyCell> cell = JSGlobalObject::EnsureEmptyPropertyCell( |
| 240 global, name, PropertyCellType::kInvalidated); |
| 240 Isolate* isolate = masm->isolate(); | 241 Isolate* isolate = masm->isolate(); |
| 241 DCHECK(cell->value()->IsTheHole(isolate)); | 242 DCHECK(cell->value()->IsTheHole(isolate)); |
| 242 Handle<WeakCell> weak_cell = isolate->factory()->NewWeakCell(cell); | 243 Handle<WeakCell> weak_cell = isolate->factory()->NewWeakCell(cell); |
| 243 __ LoadWeakValue(scratch, weak_cell, miss); | 244 __ LoadWeakValue(scratch, weak_cell, miss); |
| 244 __ cmp(FieldOperand(scratch, PropertyCell::kValueOffset), | 245 __ cmp(FieldOperand(scratch, PropertyCell::kValueOffset), |
| 245 Immediate(isolate->factory()->the_hole_value())); | 246 Immediate(isolate->factory()->the_hole_value())); |
| 246 __ j(not_equal, miss); | 247 __ j(not_equal, miss); |
| 247 } | 248 } |
| 248 | 249 |
| 249 | 250 |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 // Return the generated code. | 720 // Return the generated code. |
| 720 return GetCode(kind(), name); | 721 return GetCode(kind(), name); |
| 721 } | 722 } |
| 722 | 723 |
| 723 | 724 |
| 724 #undef __ | 725 #undef __ |
| 725 } // namespace internal | 726 } // namespace internal |
| 726 } // namespace v8 | 727 } // namespace v8 |
| 727 | 728 |
| 728 #endif // V8_TARGET_ARCH_IA32 | 729 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |