| 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 2492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2503 | 2503 |
| 2504 // Load the result. | 2504 // Load the result. |
| 2505 __ sll(scratch, key, kPointerSizeLog2); // Key indexes words. | 2505 __ sll(scratch, key, kPointerSizeLog2); // Key indexes words. |
| 2506 __ addu(scratch, elements, scratch); | 2506 __ addu(scratch, elements, scratch); |
| 2507 uint32_t offset = FixedArray::kHeaderSize + | 2507 uint32_t offset = FixedArray::kHeaderSize + |
| 2508 (instr->additional_index() << kPointerSizeLog2); | 2508 (instr->additional_index() << kPointerSizeLog2); |
| 2509 __ lw(result, FieldMemOperand(scratch, offset)); | 2509 __ lw(result, FieldMemOperand(scratch, offset)); |
| 2510 | 2510 |
| 2511 // Check for the hole value. | 2511 // Check for the hole value. |
| 2512 if (instr->hydrogen()->RequiresHoleCheck()) { | 2512 if (instr->hydrogen()->RequiresHoleCheck()) { |
| 2513 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); | 2513 if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) { |
| 2514 DeoptimizeIf(eq, instr->environment(), result, Operand(scratch)); | 2514 __ And(scratch, result, Operand(kSmiTagMask)); |
| 2515 DeoptimizeIf(ne, instr->environment(), scratch, Operand(zero_reg)); |
| 2516 } else { |
| 2517 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); |
| 2518 DeoptimizeIf(eq, instr->environment(), result, Operand(scratch)); |
| 2519 } |
| 2515 } | 2520 } |
| 2516 } | 2521 } |
| 2517 | 2522 |
| 2518 | 2523 |
| 2519 void LCodeGen::DoLoadKeyedFastDoubleElement( | 2524 void LCodeGen::DoLoadKeyedFastDoubleElement( |
| 2520 LLoadKeyedFastDoubleElement* instr) { | 2525 LLoadKeyedFastDoubleElement* instr) { |
| 2521 Register elements = ToRegister(instr->elements()); | 2526 Register elements = ToRegister(instr->elements()); |
| 2522 bool key_is_constant = instr->key()->IsConstantOperand(); | 2527 bool key_is_constant = instr->key()->IsConstantOperand(); |
| 2523 Register key = no_reg; | 2528 Register key = no_reg; |
| 2524 DoubleRegister result = ToDoubleRegister(instr->result()); | 2529 DoubleRegister result = ToDoubleRegister(instr->result()); |
| (...skipping 2651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5176 __ Subu(scratch, result, scratch); | 5181 __ Subu(scratch, result, scratch); |
| 5177 __ lw(result, FieldMemOperand(scratch, | 5182 __ lw(result, FieldMemOperand(scratch, |
| 5178 FixedArray::kHeaderSize - kPointerSize)); | 5183 FixedArray::kHeaderSize - kPointerSize)); |
| 5179 __ bind(&done); | 5184 __ bind(&done); |
| 5180 } | 5185 } |
| 5181 | 5186 |
| 5182 | 5187 |
| 5183 #undef __ | 5188 #undef __ |
| 5184 | 5189 |
| 5185 } } // namespace v8::internal | 5190 } } // namespace v8::internal |
| OLD | NEW |