| 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 DCHECK(!map_reg.is(scratch)); | 336 DCHECK(!map_reg.is(scratch)); |
| 337 __ LoadWeakValue(map_reg, cell, miss); | 337 __ LoadWeakValue(map_reg, cell, miss); |
| 338 if (transition->CanBeDeprecated()) { | 338 if (transition->CanBeDeprecated()) { |
| 339 __ mov(scratch, FieldOperand(map_reg, Map::kBitField3Offset)); | 339 __ mov(scratch, FieldOperand(map_reg, Map::kBitField3Offset)); |
| 340 __ and_(scratch, Immediate(Map::Deprecated::kMask)); | 340 __ and_(scratch, Immediate(Map::Deprecated::kMask)); |
| 341 __ j(not_zero, miss); | 341 __ j(not_zero, miss); |
| 342 } | 342 } |
| 343 } | 343 } |
| 344 | 344 |
| 345 | 345 |
| 346 void NamedStoreHandlerCompiler::GenerateConstantCheck(Register map_reg, | 346 void NamedStoreHandlerCompiler::GenerateConstantCheck(Object* constant, |
| 347 int descriptor, | |
| 348 Register value_reg, | 347 Register value_reg, |
| 349 Register scratch, | |
| 350 Label* miss_label) { | 348 Label* miss_label) { |
| 351 DCHECK(!map_reg.is(scratch)); | 349 __ CmpObject(value_reg, handle(constant, isolate())); |
| 352 DCHECK(!map_reg.is(value_reg)); | |
| 353 DCHECK(!value_reg.is(scratch)); | |
| 354 __ LoadInstanceDescriptors(map_reg, scratch); | |
| 355 __ mov(scratch, | |
| 356 FieldOperand(scratch, DescriptorArray::GetValueOffset(descriptor))); | |
| 357 __ cmp(value_reg, scratch); | |
| 358 __ j(not_equal, miss_label); | 350 __ j(not_equal, miss_label); |
| 359 } | 351 } |
| 360 | 352 |
| 361 | 353 |
| 362 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type, | 354 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type, |
| 363 Register value_reg, | 355 Register value_reg, |
| 364 Label* miss_label) { | 356 Label* miss_label) { |
| 365 __ JumpIfSmi(value_reg, miss_label); | 357 __ JumpIfSmi(value_reg, miss_label); |
| 366 HeapType::Iterator<Map> it = field_type->Classes(); | 358 HeapType::Iterator<Map> it = field_type->Classes(); |
| 367 if (!it.Done()) { | 359 if (!it.Done()) { |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 720 // Return the generated code. | 712 // Return the generated code. |
| 721 return GetCode(kind(), Code::NORMAL, name); | 713 return GetCode(kind(), Code::NORMAL, name); |
| 722 } | 714 } |
| 723 | 715 |
| 724 | 716 |
| 725 #undef __ | 717 #undef __ |
| 726 } | 718 } |
| 727 } // namespace v8::internal | 719 } // namespace v8::internal |
| 728 | 720 |
| 729 #endif // V8_TARGET_ARCH_IA32 | 721 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |