OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
956 Register parameter_map, | 956 Register parameter_map, |
957 Register scratch, | 957 Register scratch, |
958 Label* slow_case) { | 958 Label* slow_case) { |
959 // Element is in arguments backing store, which is referenced by the | 959 // Element is in arguments backing store, which is referenced by the |
960 // second element of the parameter_map. The parameter_map register | 960 // second element of the parameter_map. The parameter_map register |
961 // must be loaded with the parameter map of the arguments object and is | 961 // must be loaded with the parameter map of the arguments object and is |
962 // overwritten. | 962 // overwritten. |
963 const int kBackingStoreOffset = FixedArray::kHeaderSize + kPointerSize; | 963 const int kBackingStoreOffset = FixedArray::kHeaderSize + kPointerSize; |
964 Register backing_store = parameter_map; | 964 Register backing_store = parameter_map; |
965 __ lw(backing_store, FieldMemOperand(parameter_map, kBackingStoreOffset)); | 965 __ lw(backing_store, FieldMemOperand(parameter_map, kBackingStoreOffset)); |
| 966 Handle<Map> fixed_array_map(masm->isolate()->heap()->fixed_array_map()); |
| 967 __ CheckMap(backing_store, scratch, fixed_array_map, slow_case, |
| 968 DONT_DO_SMI_CHECK); |
966 __ lw(scratch, FieldMemOperand(backing_store, FixedArray::kLengthOffset)); | 969 __ lw(scratch, FieldMemOperand(backing_store, FixedArray::kLengthOffset)); |
967 __ Branch(slow_case, Ugreater_equal, key, Operand(scratch)); | 970 __ Branch(slow_case, Ugreater_equal, key, Operand(scratch)); |
968 __ li(scratch, Operand(kPointerSize >> 1)); | 971 __ li(scratch, Operand(kPointerSize >> 1)); |
969 __ mul(scratch, key, scratch); | 972 __ mul(scratch, key, scratch); |
970 __ Addu(scratch, | 973 __ Addu(scratch, |
971 scratch, | 974 scratch, |
972 Operand(FixedArray::kHeaderSize - kHeapObjectTag)); | 975 Operand(FixedArray::kHeaderSize - kHeapObjectTag)); |
973 __ Addu(scratch, backing_store, scratch); | 976 __ Addu(scratch, backing_store, scratch); |
974 return MemOperand(scratch); | 977 return MemOperand(scratch); |
975 } | 978 } |
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1737 Register reg = Register::from_code(Assembler::GetRs(instr_at_patch)); | 1740 Register reg = Register::from_code(Assembler::GetRs(instr_at_patch)); |
1738 patcher.masm()->andi(at, reg, kSmiTagMask); | 1741 patcher.masm()->andi(at, reg, kSmiTagMask); |
1739 patcher.ChangeBranchCondition(eq); | 1742 patcher.ChangeBranchCondition(eq); |
1740 } | 1743 } |
1741 } | 1744 } |
1742 | 1745 |
1743 | 1746 |
1744 } } // namespace v8::internal | 1747 } } // namespace v8::internal |
1745 | 1748 |
1746 #endif // V8_TARGET_ARCH_MIPS | 1749 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |