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 4136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4147 int constant_index = | 4147 int constant_index = |
4148 ToInteger32(LConstantOperand::cast(instr->index())); | 4148 ToInteger32(LConstantOperand::cast(instr->index())); |
4149 if (instr->hydrogen()->length()->representation().IsTagged()) { | 4149 if (instr->hydrogen()->length()->representation().IsTagged()) { |
4150 __ cmp(ToOperand(instr->length()), | 4150 __ cmp(ToOperand(instr->length()), |
4151 Immediate(Smi::FromInt(constant_index))); | 4151 Immediate(Smi::FromInt(constant_index))); |
4152 } else { | 4152 } else { |
4153 __ cmp(ToOperand(instr->length()), Immediate(constant_index)); | 4153 __ cmp(ToOperand(instr->length()), Immediate(constant_index)); |
4154 } | 4154 } |
4155 DeoptimizeIf(below_equal, instr->environment()); | 4155 DeoptimizeIf(below_equal, instr->environment()); |
4156 } else { | 4156 } else { |
4157 if (instr->hydrogen()->index()->representation().IsTagged() && | |
4158 !instr->hydrogen()->index()->type().IsSmi()) { | |
4159 __ test(ToRegister(instr->index()), Immediate(kSmiTagMask)); | |
4160 DeoptimizeIf(not_zero, instr->environment()); | |
4161 } | |
4162 __ cmp(ToRegister(instr->index()), ToOperand(instr->length())); | 4157 __ cmp(ToRegister(instr->index()), ToOperand(instr->length())); |
4163 DeoptimizeIf(above_equal, instr->environment()); | 4158 DeoptimizeIf(above_equal, instr->environment()); |
4164 } | 4159 } |
4165 } | 4160 } |
4166 | 4161 |
4167 | 4162 |
4168 void LCodeGen::DoStoreKeyedExternalArray(LStoreKeyed* instr) { | 4163 void LCodeGen::DoStoreKeyedExternalArray(LStoreKeyed* instr) { |
4169 ElementsKind elements_kind = instr->elements_kind(); | 4164 ElementsKind elements_kind = instr->elements_kind(); |
4170 LOperand* key = instr->key(); | 4165 LOperand* key = instr->key(); |
4171 if (!key->IsConstantOperand() && | 4166 if (!key->IsConstantOperand() && |
(...skipping 1805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5977 FixedArray::kHeaderSize - kPointerSize)); | 5972 FixedArray::kHeaderSize - kPointerSize)); |
5978 __ bind(&done); | 5973 __ bind(&done); |
5979 } | 5974 } |
5980 | 5975 |
5981 | 5976 |
5982 #undef __ | 5977 #undef __ |
5983 | 5978 |
5984 } } // namespace v8::internal | 5979 } } // namespace v8::internal |
5985 | 5980 |
5986 #endif // V8_TARGET_ARCH_IA32 | 5981 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |