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 2455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2466 Register key = EmitLoadRegister(instr->key(), scratch0()); | 2466 Register key = EmitLoadRegister(instr->key(), scratch0()); |
2467 Register result = ToRegister(instr->result()); | 2467 Register result = ToRegister(instr->result()); |
2468 Register scratch = scratch0(); | 2468 Register scratch = scratch0(); |
2469 ASSERT(result.is(elements)); | 2469 ASSERT(result.is(elements)); |
2470 | 2470 |
2471 // Load the result. | 2471 // Load the result. |
2472 __ add(scratch, elements, Operand(key, LSL, kPointerSizeLog2)); | 2472 __ add(scratch, elements, Operand(key, LSL, kPointerSizeLog2)); |
2473 __ ldr(result, FieldMemOperand(scratch, FixedArray::kHeaderSize)); | 2473 __ ldr(result, FieldMemOperand(scratch, FixedArray::kHeaderSize)); |
2474 | 2474 |
2475 // Check for the hole value. | 2475 // Check for the hole value. |
2476 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); | 2476 if (instr->hydrogen()->check_hole_value()) { |
2477 __ cmp(result, scratch); | 2477 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); |
2478 DeoptimizeIf(eq, instr->environment()); | 2478 __ cmp(result, scratch); |
| 2479 DeoptimizeIf(eq, instr->environment()); |
| 2480 } |
2479 } | 2481 } |
2480 | 2482 |
2481 | 2483 |
2482 void LCodeGen::DoLoadKeyedSpecializedArrayElement( | 2484 void LCodeGen::DoLoadKeyedSpecializedArrayElement( |
2483 LLoadKeyedSpecializedArrayElement* instr) { | 2485 LLoadKeyedSpecializedArrayElement* instr) { |
2484 Register external_pointer = ToRegister(instr->external_pointer()); | 2486 Register external_pointer = ToRegister(instr->external_pointer()); |
2485 Register key = ToRegister(instr->key()); | 2487 Register key = ToRegister(instr->key()); |
2486 ExternalArrayType array_type = instr->array_type(); | 2488 ExternalArrayType array_type = instr->array_type(); |
2487 if (array_type == kExternalFloatArray) { | 2489 if (array_type == kExternalFloatArray) { |
2488 CpuFeatures::Scope scope(VFP3); | 2490 CpuFeatures::Scope scope(VFP3); |
(...skipping 1820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4309 ASSERT(osr_pc_offset_ == -1); | 4311 ASSERT(osr_pc_offset_ == -1); |
4310 osr_pc_offset_ = masm()->pc_offset(); | 4312 osr_pc_offset_ = masm()->pc_offset(); |
4311 } | 4313 } |
4312 | 4314 |
4313 | 4315 |
4314 | 4316 |
4315 | 4317 |
4316 #undef __ | 4318 #undef __ |
4317 | 4319 |
4318 } } // namespace v8::internal | 4320 } } // namespace v8::internal |
OLD | NEW |