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 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 | 943 |
944 // Check that the key is a smi. | 944 // Check that the key is a smi. |
945 __ JumpIfNotSmi(key, &check_string); | 945 __ JumpIfNotSmi(key, &check_string); |
946 __ bind(&index_smi); | 946 __ bind(&index_smi); |
947 // Now the key is known to be a smi. This place is also jumped to from below | 947 // Now the key is known to be a smi. This place is also jumped to from below |
948 // where a numeric string is converted to a smi. | 948 // where a numeric string is converted to a smi. |
949 | 949 |
950 GenerateKeyedLoadReceiverCheck( | 950 GenerateKeyedLoadReceiverCheck( |
951 masm, receiver, a2, a3, Map::kHasIndexedInterceptor, &slow); | 951 masm, receiver, a2, a3, Map::kHasIndexedInterceptor, &slow); |
952 | 952 |
953 // Check the "has fast elements" bit in the receiver's map which is | 953 // Check the receiver's map to see if it has fast elements. |
954 // now in a2. | 954 __ CheckFastElements(a2, a3, &check_number_dictionary); |
955 __ lbu(a3, FieldMemOperand(a2, Map::kBitField2Offset)); | |
956 __ And(at, a3, Operand(1 << Map::kHasFastElements)); | |
957 __ Branch(&check_number_dictionary, eq, at, Operand(zero_reg)); | |
958 | 955 |
959 GenerateFastArrayLoad( | 956 GenerateFastArrayLoad( |
960 masm, receiver, key, t0, a3, a2, v0, NULL, &slow); | 957 masm, receiver, key, t0, a3, a2, v0, NULL, &slow); |
961 | 958 |
962 __ IncrementCounter(isolate->counters()->keyed_load_generic_smi(), 1, a2, a3); | 959 __ IncrementCounter(isolate->counters()->keyed_load_generic_smi(), 1, a2, a3); |
963 __ Ret(); | 960 __ Ret(); |
964 | 961 |
965 __ bind(&check_number_dictionary); | 962 __ bind(&check_number_dictionary); |
966 __ lw(t0, FieldMemOperand(receiver, JSObject::kElementsOffset)); | 963 __ lw(t0, FieldMemOperand(receiver, JSObject::kElementsOffset)); |
967 __ lw(a3, FieldMemOperand(t0, JSObject::kMapOffset)); | 964 __ lw(a3, FieldMemOperand(t0, JSObject::kMapOffset)); |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1572 Register reg = Register::from_code(Assembler::GetRs(instr_at_patch)); | 1569 Register reg = Register::from_code(Assembler::GetRs(instr_at_patch)); |
1573 patcher.masm()->andi(at, reg, kSmiTagMask); | 1570 patcher.masm()->andi(at, reg, kSmiTagMask); |
1574 patcher.ChangeBranchCondition(eq); | 1571 patcher.ChangeBranchCondition(eq); |
1575 } | 1572 } |
1576 } | 1573 } |
1577 | 1574 |
1578 | 1575 |
1579 } } // namespace v8::internal | 1576 } } // namespace v8::internal |
1580 | 1577 |
1581 #endif // V8_TARGET_ARCH_MIPS | 1578 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |