| 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 <assert.h>  // For assert | 5 #include <assert.h>  // For assert | 
| 6 #include <limits.h>  // For LONG_MIN, LONG_MAX. | 6 #include <limits.h>  // For LONG_MIN, LONG_MAX. | 
| 7 | 7 | 
| 8 #include "src/v8.h" | 8 #include "src/v8.h" | 
| 9 | 9 | 
| 10 #if V8_TARGET_ARCH_PPC | 10 #if V8_TARGET_ARCH_PPC | 
| (...skipping 4519 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4530   UNREACHABLE(); | 4530   UNREACHABLE(); | 
| 4531   return no_reg; | 4531   return no_reg; | 
| 4532 } | 4532 } | 
| 4533 | 4533 | 
| 4534 | 4534 | 
| 4535 void MacroAssembler::JumpIfDictionaryInPrototypeChain(Register object, | 4535 void MacroAssembler::JumpIfDictionaryInPrototypeChain(Register object, | 
| 4536                                                       Register scratch0, | 4536                                                       Register scratch0, | 
| 4537                                                       Register scratch1, | 4537                                                       Register scratch1, | 
| 4538                                                       Label* found) { | 4538                                                       Label* found) { | 
| 4539   DCHECK(!scratch1.is(scratch0)); | 4539   DCHECK(!scratch1.is(scratch0)); | 
| 4540   Factory* factory = isolate()->factory(); |  | 
| 4541   Register current = scratch0; | 4540   Register current = scratch0; | 
| 4542   Label loop_again; | 4541   Label loop_again, end; | 
| 4543 | 4542 | 
| 4544   // scratch contained elements pointer. | 4543   // scratch contained elements pointer. | 
| 4545   mr(current, object); | 4544   mr(current, object); | 
|  | 4545   LoadP(current, FieldMemOperand(current, HeapObject::kMapOffset)); | 
|  | 4546   LoadP(current, FieldMemOperand(current, Map::kPrototypeOffset)); | 
|  | 4547   CompareRoot(current, Heap::kNullValueRootIndex); | 
|  | 4548   beq(&end); | 
| 4546 | 4549 | 
| 4547   // Loop based on the map going up the prototype chain. | 4550   // Loop based on the map going up the prototype chain. | 
| 4548   bind(&loop_again); | 4551   bind(&loop_again); | 
| 4549   LoadP(current, FieldMemOperand(current, HeapObject::kMapOffset)); | 4552   LoadP(current, FieldMemOperand(current, HeapObject::kMapOffset)); | 
|  | 4553 | 
|  | 4554   STATIC_ASSERT(JS_PROXY_TYPE < JS_OBJECT_TYPE); | 
|  | 4555   STATIC_ASSERT(JS_VALUE_TYPE < JS_OBJECT_TYPE); | 
|  | 4556   lbz(scratch1, FieldMemOperand(current, Map::kInstanceTypeOffset)); | 
|  | 4557   cmpi(scratch1, Operand(JS_OBJECT_TYPE)); | 
|  | 4558   blt(found); | 
|  | 4559 | 
| 4550   lbz(scratch1, FieldMemOperand(current, Map::kBitField2Offset)); | 4560   lbz(scratch1, FieldMemOperand(current, Map::kBitField2Offset)); | 
| 4551   DecodeField<Map::ElementsKindBits>(scratch1); | 4561   DecodeField<Map::ElementsKindBits>(scratch1); | 
| 4552   cmpi(scratch1, Operand(DICTIONARY_ELEMENTS)); | 4562   cmpi(scratch1, Operand(DICTIONARY_ELEMENTS)); | 
| 4553   beq(found); | 4563   beq(found); | 
| 4554   LoadP(current, FieldMemOperand(current, Map::kPrototypeOffset)); | 4564   LoadP(current, FieldMemOperand(current, Map::kPrototypeOffset)); | 
| 4555   Cmpi(current, Operand(factory->null_value()), r0); | 4565   CompareRoot(current, Heap::kNullValueRootIndex); | 
| 4556   bne(&loop_again); | 4566   bne(&loop_again); | 
|  | 4567 | 
|  | 4568   bind(&end); | 
| 4557 } | 4569 } | 
| 4558 | 4570 | 
| 4559 | 4571 | 
| 4560 #ifdef DEBUG | 4572 #ifdef DEBUG | 
| 4561 bool AreAliased(Register reg1, Register reg2, Register reg3, Register reg4, | 4573 bool AreAliased(Register reg1, Register reg2, Register reg3, Register reg4, | 
| 4562                 Register reg5, Register reg6, Register reg7, Register reg8) { | 4574                 Register reg5, Register reg6, Register reg7, Register reg8) { | 
| 4563   int n_of_valid_regs = reg1.is_valid() + reg2.is_valid() + reg3.is_valid() + | 4575   int n_of_valid_regs = reg1.is_valid() + reg2.is_valid() + reg3.is_valid() + | 
| 4564                         reg4.is_valid() + reg5.is_valid() + reg6.is_valid() + | 4576                         reg4.is_valid() + reg5.is_valid() + reg6.is_valid() + | 
| 4565                         reg7.is_valid() + reg8.is_valid(); | 4577                         reg7.is_valid() + reg8.is_valid(); | 
| 4566 | 4578 | 
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4642   } | 4654   } | 
| 4643   if (mag.shift > 0) srawi(result, result, mag.shift); | 4655   if (mag.shift > 0) srawi(result, result, mag.shift); | 
| 4644   ExtractBit(r0, dividend, 31); | 4656   ExtractBit(r0, dividend, 31); | 
| 4645   add(result, result, r0); | 4657   add(result, result, r0); | 
| 4646 } | 4658 } | 
| 4647 | 4659 | 
| 4648 }  // namespace internal | 4660 }  // namespace internal | 
| 4649 }  // namespace v8 | 4661 }  // namespace v8 | 
| 4650 | 4662 | 
| 4651 #endif  // V8_TARGET_ARCH_PPC | 4663 #endif  // V8_TARGET_ARCH_PPC | 
| OLD | NEW | 
|---|