| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1730 | 1730 |
| 1731 if (type.IsBoolean()) { | 1731 if (type.IsBoolean()) { |
| 1732 ASSERT(!info()->IsStub()); | 1732 ASSERT(!info()->IsStub()); |
| 1733 __ CompareRoot(value, Heap::kTrueValueRootIndex); | 1733 __ CompareRoot(value, Heap::kTrueValueRootIndex); |
| 1734 EmitBranch(instr, eq); | 1734 EmitBranch(instr, eq); |
| 1735 } else if (type.IsSmi()) { | 1735 } else if (type.IsSmi()) { |
| 1736 ASSERT(!info()->IsStub()); | 1736 ASSERT(!info()->IsStub()); |
| 1737 EmitCompareAndBranch(instr, ne, value, Operand(Smi::FromInt(0))); | 1737 EmitCompareAndBranch(instr, ne, value, Operand(Smi::FromInt(0))); |
| 1738 } else if (type.IsJSArray()) { | 1738 } else if (type.IsJSArray()) { |
| 1739 ASSERT(!info()->IsStub()); | 1739 ASSERT(!info()->IsStub()); |
| 1740 EmitBranch(instr, al); | 1740 EmitGoto(instr->TrueDestination(chunk())); |
| 1741 } else if (type.IsHeapNumber()) { | 1741 } else if (type.IsHeapNumber()) { |
| 1742 ASSERT(!info()->IsStub()); | 1742 ASSERT(!info()->IsStub()); |
| 1743 __ Ldr(double_scratch(), FieldMemOperand(value, | 1743 __ Ldr(double_scratch(), FieldMemOperand(value, |
| 1744 HeapNumber::kValueOffset)); | 1744 HeapNumber::kValueOffset)); |
| 1745 // Test the double value. Zero and NaN are false. | 1745 // Test the double value. Zero and NaN are false. |
| 1746 EmitBranchIfNonZeroNumber(instr, double_scratch(), double_scratch()); | 1746 EmitBranchIfNonZeroNumber(instr, double_scratch(), double_scratch()); |
| 1747 } else if (type.IsString()) { | 1747 } else if (type.IsString()) { |
| 1748 ASSERT(!info()->IsStub()); | 1748 ASSERT(!info()->IsStub()); |
| 1749 Register temp = ToRegister(instr->temp1()); | 1749 Register temp = ToRegister(instr->temp1()); |
| 1750 __ Ldr(temp, FieldMemOperand(value, String::kLengthOffset)); | 1750 __ Ldr(temp, FieldMemOperand(value, String::kLengthOffset)); |
| (...skipping 3985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5736 __ Bind(&out_of_object); | 5736 __ Bind(&out_of_object); |
| 5737 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 5737 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
| 5738 // Index is equal to negated out of object property index plus 1. | 5738 // Index is equal to negated out of object property index plus 1. |
| 5739 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5739 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
| 5740 __ Ldr(result, FieldMemOperand(result, | 5740 __ Ldr(result, FieldMemOperand(result, |
| 5741 FixedArray::kHeaderSize - kPointerSize)); | 5741 FixedArray::kHeaderSize - kPointerSize)); |
| 5742 __ Bind(&done); | 5742 __ Bind(&done); |
| 5743 } | 5743 } |
| 5744 | 5744 |
| 5745 } } // namespace v8::internal | 5745 } } // namespace v8::internal |
| OLD | NEW |