| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 8 | 8 |
| 9 #include "src/ic/call-optimization.h" | 9 #include "src/ic/call-optimization.h" |
| 10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 __ mov(this->name(), Immediate(name)); | 349 __ mov(this->name(), Immediate(name)); |
| 350 } | 350 } |
| 351 | 351 |
| 352 | 352 |
| 353 void NamedStoreHandlerCompiler::GenerateRestoreMap(Handle<Map> transition, | 353 void NamedStoreHandlerCompiler::GenerateRestoreMap(Handle<Map> transition, |
| 354 Register scratch, | 354 Register scratch, |
| 355 Label* miss) { | 355 Label* miss) { |
| 356 Handle<WeakCell> cell = Map::WeakCellForMap(transition); | 356 Handle<WeakCell> cell = Map::WeakCellForMap(transition); |
| 357 Register map_reg = StoreTransitionDescriptor::MapRegister(); | 357 Register map_reg = StoreTransitionDescriptor::MapRegister(); |
| 358 DCHECK(!map_reg.is(scratch)); | 358 DCHECK(!map_reg.is(scratch)); |
| 359 __ LoadWeakValue(map_reg, cell, miss); | 359 __ LoadWeakValue(map_reg, scratch, cell, miss); |
| 360 if (transition->CanBeDeprecated()) { | 360 if (transition->CanBeDeprecated()) { |
| 361 __ mov(scratch, FieldOperand(map_reg, Map::kBitField3Offset)); | 361 __ mov(scratch, FieldOperand(map_reg, Map::kBitField3Offset)); |
| 362 __ and_(scratch, Immediate(Map::Deprecated::kMask)); | 362 __ and_(scratch, Immediate(Map::Deprecated::kMask)); |
| 363 __ j(not_zero, miss); | 363 __ j(not_zero, miss); |
| 364 } | 364 } |
| 365 } | 365 } |
| 366 | 366 |
| 367 | 367 |
| 368 void NamedStoreHandlerCompiler::GenerateConstantCheck(Register map_reg, | 368 void NamedStoreHandlerCompiler::GenerateConstantCheck(Register map_reg, |
| 369 int descriptor, | 369 int descriptor, |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal( | 722 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal( |
| 723 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) { | 723 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) { |
| 724 Label miss; | 724 Label miss; |
| 725 if (IC::ICUseVector(kind())) { | 725 if (IC::ICUseVector(kind())) { |
| 726 PushVectorAndSlot(); | 726 PushVectorAndSlot(); |
| 727 } | 727 } |
| 728 FrontendHeader(receiver(), name, &miss); | 728 FrontendHeader(receiver(), name, &miss); |
| 729 // Get the value from the cell. | 729 // Get the value from the cell. |
| 730 Register result = StoreDescriptor::ValueRegister(); | 730 Register result = StoreDescriptor::ValueRegister(); |
| 731 Handle<WeakCell> weak_cell = factory()->NewWeakCell(cell); | 731 Handle<WeakCell> weak_cell = factory()->NewWeakCell(cell); |
| 732 __ LoadWeakValue(result, weak_cell, &miss); | 732 __ LoadWeakValue(result, scratch1(), weak_cell, &miss); |
| 733 __ mov(result, FieldOperand(result, PropertyCell::kValueOffset)); | 733 __ mov(result, FieldOperand(result, PropertyCell::kValueOffset)); |
| 734 | 734 |
| 735 // Check for deleted property if property can actually be deleted. | 735 // Check for deleted property if property can actually be deleted. |
| 736 if (is_configurable) { | 736 if (is_configurable) { |
| 737 __ cmp(result, factory()->the_hole_value()); | 737 __ cmp(result, factory()->the_hole_value()); |
| 738 __ j(equal, &miss); | 738 __ j(equal, &miss); |
| 739 } else if (FLAG_debug_code) { | 739 } else if (FLAG_debug_code) { |
| 740 __ cmp(result, factory()->the_hole_value()); | 740 __ cmp(result, factory()->the_hole_value()); |
| 741 __ Check(not_equal, kDontDeleteCellsCannotContainTheHole); | 741 __ Check(not_equal, kDontDeleteCellsCannotContainTheHole); |
| 742 } | 742 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 754 // Return the generated code. | 754 // Return the generated code. |
| 755 return GetCode(kind(), Code::NORMAL, name); | 755 return GetCode(kind(), Code::NORMAL, name); |
| 756 } | 756 } |
| 757 | 757 |
| 758 | 758 |
| 759 #undef __ | 759 #undef __ |
| 760 } | 760 } |
| 761 } // namespace v8::internal | 761 } // namespace v8::internal |
| 762 | 762 |
| 763 #endif // V8_TARGET_ARCH_IA32 | 763 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |