| 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
| 6 | 6 |
| 7 #include "src/ic/call-optimization.h" | 7 #include "src/ic/call-optimization.h" |
| 8 #include "src/ic/handler-compiler.h" | 8 #include "src/ic/handler-compiler.h" |
| 9 #include "src/ic/ic.h" | 9 #include "src/ic/ic.h" |
| 10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 } | 394 } |
| 395 | 395 |
| 396 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(FieldType* field_type, | 396 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(FieldType* field_type, |
| 397 Register value_reg, | 397 Register value_reg, |
| 398 Label* miss_label) { | 398 Label* miss_label) { |
| 399 Register map_reg = scratch1(); | 399 Register map_reg = scratch1(); |
| 400 Register scratch = scratch2(); | 400 Register scratch = scratch2(); |
| 401 DCHECK(!value_reg.is(map_reg)); | 401 DCHECK(!value_reg.is(map_reg)); |
| 402 DCHECK(!value_reg.is(scratch)); | 402 DCHECK(!value_reg.is(scratch)); |
| 403 __ JumpIfSmi(value_reg, miss_label); | 403 __ JumpIfSmi(value_reg, miss_label); |
| 404 FieldType::Iterator it = field_type->Classes(); | 404 if (field_type->IsClass()) { |
| 405 if (!it.Done()) { | |
| 406 __ LoadP(map_reg, FieldMemOperand(value_reg, HeapObject::kMapOffset)); | 405 __ LoadP(map_reg, FieldMemOperand(value_reg, HeapObject::kMapOffset)); |
| 407 Label do_store; | 406 __ CmpWeakValue(map_reg, Map::WeakCellForMap(field_type->AsClass()), |
| 408 while (true) { | 407 scratch); |
| 409 __ CmpWeakValue(map_reg, Map::WeakCellForMap(it.Current()), scratch); | 408 __ bne(miss_label); |
| 410 it.Advance(); | |
| 411 if (it.Done()) { | |
| 412 __ bne(miss_label); | |
| 413 break; | |
| 414 } | |
| 415 __ beq(&do_store); | |
| 416 } | |
| 417 __ bind(&do_store); | |
| 418 } | 409 } |
| 419 } | 410 } |
| 420 | 411 |
| 421 | 412 |
| 422 Register PropertyHandlerCompiler::CheckPrototypes( | 413 Register PropertyHandlerCompiler::CheckPrototypes( |
| 423 Register object_reg, Register holder_reg, Register scratch1, | 414 Register object_reg, Register holder_reg, Register scratch1, |
| 424 Register scratch2, Handle<Name> name, Label* miss, PrototypeCheckType check, | 415 Register scratch2, Handle<Name> name, Label* miss, PrototypeCheckType check, |
| 425 ReturnHolder return_what) { | 416 ReturnHolder return_what) { |
| 426 Handle<Map> receiver_map = map(); | 417 Handle<Map> receiver_map = map(); |
| 427 | 418 |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 // Return the generated code. | 780 // Return the generated code. |
| 790 return GetCode(kind(), Code::NORMAL, name); | 781 return GetCode(kind(), Code::NORMAL, name); |
| 791 } | 782 } |
| 792 | 783 |
| 793 | 784 |
| 794 #undef __ | 785 #undef __ |
| 795 } // namespace internal | 786 } // namespace internal |
| 796 } // namespace v8 | 787 } // namespace v8 |
| 797 | 788 |
| 798 #endif // V8_TARGET_ARCH_ARM | 789 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |