| 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 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1322 __ JumpIfNotSmi(key, &slow); | 1322 __ JumpIfNotSmi(key, &slow); |
| 1323 // Check that the object isn't a smi. | 1323 // Check that the object isn't a smi. |
| 1324 __ JumpIfSmi(receiver, &slow); | 1324 __ JumpIfSmi(receiver, &slow); |
| 1325 // Get the map of the object. | 1325 // Get the map of the object. |
| 1326 __ lw(receiver_map, FieldMemOperand(receiver, HeapObject::kMapOffset)); | 1326 __ lw(receiver_map, FieldMemOperand(receiver, HeapObject::kMapOffset)); |
| 1327 // Check that the receiver does not require access checks. We need | 1327 // Check that the receiver does not require access checks. We need |
| 1328 // to do this because this generic stub does not perform map checks. | 1328 // to do this because this generic stub does not perform map checks. |
| 1329 __ lbu(t0, FieldMemOperand(receiver_map, Map::kBitFieldOffset)); | 1329 __ lbu(t0, FieldMemOperand(receiver_map, Map::kBitFieldOffset)); |
| 1330 __ And(t0, t0, Operand(1 << Map::kIsAccessCheckNeeded)); | 1330 __ And(t0, t0, Operand(1 << Map::kIsAccessCheckNeeded)); |
| 1331 __ Branch(&slow, ne, t0, Operand(zero_reg)); | 1331 __ Branch(&slow, ne, t0, Operand(zero_reg)); |
| 1332 // Check that the receiver is not observed. Observed objects are always |
| 1333 // handled by the runtime. |
| 1334 __ lbu(t0, FieldMemOperand(receiver_map, Map::kBitFieldOffset)); |
| 1335 __ And(t0, t0, Operand(1 << Map::kIsObserved)); |
| 1336 __ Branch(&slow, ne, t0, Operand(zero_reg)); |
| 1332 // Check if the object is a JS array or not. | 1337 // Check if the object is a JS array or not. |
| 1333 __ lbu(t0, FieldMemOperand(receiver_map, Map::kInstanceTypeOffset)); | 1338 __ lbu(t0, FieldMemOperand(receiver_map, Map::kInstanceTypeOffset)); |
| 1334 __ Branch(&array, eq, t0, Operand(JS_ARRAY_TYPE)); | 1339 __ Branch(&array, eq, t0, Operand(JS_ARRAY_TYPE)); |
| 1335 // Check that the object is some kind of JSObject. | 1340 // Check that the object is some kind of JSObject. |
| 1336 __ Branch(&slow, lt, t0, Operand(FIRST_JS_OBJECT_TYPE)); | 1341 __ Branch(&slow, lt, t0, Operand(FIRST_JS_OBJECT_TYPE)); |
| 1337 | 1342 |
| 1338 // Object case: Check key against length in the elements array. | 1343 // Object case: Check key against length in the elements array. |
| 1339 __ lw(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); | 1344 __ lw(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); |
| 1340 // Check array bounds. Both the key and the length of FixedArray are smis. | 1345 // Check array bounds. Both the key and the length of FixedArray are smis. |
| 1341 __ lw(t0, FieldMemOperand(elements, FixedArray::kLengthOffset)); | 1346 __ lw(t0, FieldMemOperand(elements, FixedArray::kLengthOffset)); |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1659 } else { | 1664 } else { |
| 1660 ASSERT(Assembler::IsBne(branch_instr)); | 1665 ASSERT(Assembler::IsBne(branch_instr)); |
| 1661 patcher.ChangeBranchCondition(eq); | 1666 patcher.ChangeBranchCondition(eq); |
| 1662 } | 1667 } |
| 1663 } | 1668 } |
| 1664 | 1669 |
| 1665 | 1670 |
| 1666 } } // namespace v8::internal | 1671 } } // namespace v8::internal |
| 1667 | 1672 |
| 1668 #endif // V8_TARGET_ARCH_MIPS | 1673 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |