| 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_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 | 317 |
| 318 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, | 318 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, |
| 319 Handle<Name> name) { | 319 Handle<Name> name) { |
| 320 if (!label->is_unused()) { | 320 if (!label->is_unused()) { |
| 321 __ bind(label); | 321 __ bind(label); |
| 322 __ Move(this->name(), name); | 322 __ Move(this->name(), name); |
| 323 } | 323 } |
| 324 } | 324 } |
| 325 | 325 |
| 326 | 326 |
| 327 void NamedStoreHandlerCompiler::GenerateRestoreNameAndMap( | 327 void NamedStoreHandlerCompiler::GenerateRestoreName(Handle<Name> name) { |
| 328 Handle<Name> name, Handle<Map> transition) { | |
| 329 __ Move(this->name(), name); | 328 __ Move(this->name(), name); |
| 330 __ Move(StoreTransitionDescriptor::MapRegister(), transition); | |
| 331 } | 329 } |
| 332 | 330 |
| 333 | 331 |
| 332 void NamedStoreHandlerCompiler::GenerateRestoreMap(Handle<Map> transition, |
| 333 Register scratch, |
| 334 Label* miss) { |
| 335 Handle<WeakCell> cell = Map::WeakCellForMap(transition); |
| 336 Register map_reg = StoreTransitionDescriptor::MapRegister(); |
| 337 DCHECK(!map_reg.is(scratch)); |
| 338 __ LoadWeakValue(map_reg, cell, miss); |
| 339 if (transition->CanBeDeprecated()) { |
| 340 __ movl(scratch, FieldOperand(map_reg, Map::kBitField3Offset)); |
| 341 __ andl(scratch, Immediate(Map::Deprecated::kMask)); |
| 342 __ j(not_zero, miss); |
| 343 } |
| 344 } |
| 345 |
| 334 void NamedStoreHandlerCompiler::GenerateConstantCheck(Object* constant, | 346 void NamedStoreHandlerCompiler::GenerateConstantCheck(Object* constant, |
| 335 Register value_reg, | 347 Register value_reg, |
| 336 Label* miss_label) { | 348 Label* miss_label) { |
| 337 __ Cmp(value_reg, handle(constant, isolate())); | 349 __ Cmp(value_reg, handle(constant, isolate())); |
| 338 __ j(not_equal, miss_label); | 350 __ j(not_equal, miss_label); |
| 339 } | 351 } |
| 340 | 352 |
| 341 | 353 |
| 342 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type, | 354 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type, |
| 343 Register value_reg, | 355 Register value_reg, |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 685 // Return the generated code. | 697 // Return the generated code. |
| 686 return GetCode(kind(), Code::NORMAL, name); | 698 return GetCode(kind(), Code::NORMAL, name); |
| 687 } | 699 } |
| 688 | 700 |
| 689 | 701 |
| 690 #undef __ | 702 #undef __ |
| 691 } | 703 } |
| 692 } // namespace v8::internal | 704 } // namespace v8::internal |
| 693 | 705 |
| 694 #endif // V8_TARGET_ARCH_X64 | 706 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |