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 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1668 AllowDeferredHandleDereference smi_check; | 1668 AllowDeferredHandleDereference smi_check; |
1669 if (value->IsSmi()) { | 1669 if (value->IsSmi()) { |
1670 __ li(ToRegister(instr->result()), Operand(value)); | 1670 __ li(ToRegister(instr->result()), Operand(value)); |
1671 } else { | 1671 } else { |
1672 __ LoadHeapObject(ToRegister(instr->result()), | 1672 __ LoadHeapObject(ToRegister(instr->result()), |
1673 Handle<HeapObject>::cast(value)); | 1673 Handle<HeapObject>::cast(value)); |
1674 } | 1674 } |
1675 } | 1675 } |
1676 | 1676 |
1677 | 1677 |
1678 void LCodeGen::DoFixedArrayBaseLength(LFixedArrayBaseLength* instr) { | |
1679 Register result = ToRegister(instr->result()); | |
1680 Register array = ToRegister(instr->value()); | |
1681 __ lw(result, FieldMemOperand(array, FixedArrayBase::kLengthOffset)); | |
1682 } | |
1683 | |
1684 | |
1685 void LCodeGen::DoMapEnumLength(LMapEnumLength* instr) { | 1678 void LCodeGen::DoMapEnumLength(LMapEnumLength* instr) { |
1686 Register result = ToRegister(instr->result()); | 1679 Register result = ToRegister(instr->result()); |
1687 Register map = ToRegister(instr->value()); | 1680 Register map = ToRegister(instr->value()); |
1688 __ EnumLength(result, map); | 1681 __ EnumLength(result, map); |
1689 } | 1682 } |
1690 | 1683 |
1691 | 1684 |
1692 void LCodeGen::DoElementsKind(LElementsKind* instr) { | 1685 void LCodeGen::DoElementsKind(LElementsKind* instr) { |
1693 Register result = ToRegister(instr->result()); | 1686 Register result = ToRegister(instr->result()); |
1694 Register input = ToRegister(instr->value()); | 1687 Register input = ToRegister(instr->value()); |
(...skipping 4212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5907 __ Subu(scratch, result, scratch); | 5900 __ Subu(scratch, result, scratch); |
5908 __ lw(result, FieldMemOperand(scratch, | 5901 __ lw(result, FieldMemOperand(scratch, |
5909 FixedArray::kHeaderSize - kPointerSize)); | 5902 FixedArray::kHeaderSize - kPointerSize)); |
5910 __ bind(&done); | 5903 __ bind(&done); |
5911 } | 5904 } |
5912 | 5905 |
5913 | 5906 |
5914 #undef __ | 5907 #undef __ |
5915 | 5908 |
5916 } } // namespace v8::internal | 5909 } } // namespace v8::internal |
OLD | NEW |