| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 2749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2760 STATIC_ASSERT(kSmiTag == 0); | 2760 STATIC_ASSERT(kSmiTag == 0); |
| 2761 STATIC_ASSERT(kSmiTagSize == 1); | 2761 STATIC_ASSERT(kSmiTagSize == 1); |
| 2762 STATIC_ASSERT(kPointerSize == 4); | 2762 STATIC_ASSERT(kPointerSize == 4); |
| 2763 __ Addu(a2, t0, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); | 2763 __ Addu(a2, t0, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); |
| 2764 __ sll(t1, a3, kPointerSizeLog2 - kSmiTagSize); | 2764 __ sll(t1, a3, kPointerSizeLog2 - kSmiTagSize); |
| 2765 __ Addu(a2, a2, t1); | 2765 __ Addu(a2, a2, t1); |
| 2766 | 2766 |
| 2767 // Calculate location of the first key name. | 2767 // Calculate location of the first key name. |
| 2768 __ Addu(t0, | 2768 __ Addu(t0, |
| 2769 t0, | 2769 t0, |
| 2770 Operand(FixedArray::kHeaderSize - kHeapObjectTag + | 2770 Operand(DescriptorArray::kFirstOffset - kHeapObjectTag)); |
| 2771 DescriptorArray::kFirstIndex * kPointerSize)); | |
| 2772 // Loop through all the keys in the descriptor array. If one of these is the | 2771 // Loop through all the keys in the descriptor array. If one of these is the |
| 2773 // symbol valueOf the result is false. | 2772 // symbol valueOf the result is false. |
| 2774 Label entry, loop; | 2773 Label entry, loop; |
| 2775 // The use of t2 to store the valueOf symbol asumes that it is not otherwise | 2774 // The use of t2 to store the valueOf symbol asumes that it is not otherwise |
| 2776 // used in the loop below. | 2775 // used in the loop below. |
| 2777 __ LoadRoot(t2, Heap::kvalue_of_symbolRootIndex); | 2776 __ LoadRoot(t2, Heap::kvalue_of_symbolRootIndex); |
| 2778 __ jmp(&entry); | 2777 __ jmp(&entry); |
| 2779 __ bind(&loop); | 2778 __ bind(&loop); |
| 2780 __ lw(a3, MemOperand(t0, 0)); | 2779 __ lw(a3, MemOperand(t0, 0)); |
| 2781 __ Branch(if_false, eq, a3, Operand(t2)); | 2780 __ Branch(if_false, eq, a3, Operand(t2)); |
| 2782 __ Addu(t0, t0, Operand(kPointerSize)); | 2781 __ Addu(t0, t0, Operand(DescriptorArray::kDescriptorSize * kPointerSize)); |
| 2783 __ bind(&entry); | 2782 __ bind(&entry); |
| 2784 __ Branch(&loop, ne, t0, Operand(a2)); | 2783 __ Branch(&loop, ne, t0, Operand(a2)); |
| 2785 | 2784 |
| 2786 // If a valueOf property is not found on the object check that it's | 2785 // If a valueOf property is not found on the object check that it's |
| 2787 // prototype is the un-modified String prototype. If not result is false. | 2786 // prototype is the un-modified String prototype. If not result is false. |
| 2788 __ lw(a2, FieldMemOperand(a1, Map::kPrototypeOffset)); | 2787 __ lw(a2, FieldMemOperand(a1, Map::kPrototypeOffset)); |
| 2789 __ JumpIfSmi(a2, if_false); | 2788 __ JumpIfSmi(a2, if_false); |
| 2790 __ lw(a2, FieldMemOperand(a2, HeapObject::kMapOffset)); | 2789 __ lw(a2, FieldMemOperand(a2, HeapObject::kMapOffset)); |
| 2791 __ lw(a3, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX)); | 2790 __ lw(a3, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX)); |
| 2792 __ lw(a3, FieldMemOperand(a3, GlobalObject::kNativeContextOffset)); | 2791 __ lw(a3, FieldMemOperand(a3, GlobalObject::kNativeContextOffset)); |
| (...skipping 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4611 *context_length = 0; | 4610 *context_length = 0; |
| 4612 return previous_; | 4611 return previous_; |
| 4613 } | 4612 } |
| 4614 | 4613 |
| 4615 | 4614 |
| 4616 #undef __ | 4615 #undef __ |
| 4617 | 4616 |
| 4618 } } // namespace v8::internal | 4617 } } // namespace v8::internal |
| 4619 | 4618 |
| 4620 #endif // V8_TARGET_ARCH_MIPS | 4619 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |