| 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 5603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5614 __ LoadRoot(ip, Heap::kMetaMapRootIndex); | 5614 __ LoadRoot(ip, Heap::kMetaMapRootIndex); |
| 5615 __ cmp(r1, ip); | 5615 __ cmp(r1, ip); |
| 5616 DeoptimizeIf(ne, instr->environment()); | 5616 DeoptimizeIf(ne, instr->environment()); |
| 5617 __ bind(&use_cache); | 5617 __ bind(&use_cache); |
| 5618 } | 5618 } |
| 5619 | 5619 |
| 5620 | 5620 |
| 5621 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) { | 5621 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) { |
| 5622 Register map = ToRegister(instr->map()); | 5622 Register map = ToRegister(instr->map()); |
| 5623 Register result = ToRegister(instr->result()); | 5623 Register result = ToRegister(instr->result()); |
| 5624 Register scratch = ToRegister(instr->scratch()); | |
| 5625 Label load_cache, done; | 5624 Label load_cache, done; |
| 5626 __ EnumLength(result, map); | 5625 __ EnumLength(result, map); |
| 5627 __ cmp(result, Operand(Smi::FromInt(0))); | 5626 __ cmp(result, Operand(Smi::FromInt(0))); |
| 5628 __ b(ne, &load_cache); | 5627 __ b(ne, &load_cache); |
| 5629 __ mov(result, Operand(isolate()->factory()->empty_fixed_array())); | 5628 __ mov(result, Operand(isolate()->factory()->empty_fixed_array())); |
| 5630 __ jmp(&done); | 5629 __ jmp(&done); |
| 5631 | 5630 |
| 5632 __ bind(&load_cache); | 5631 __ bind(&load_cache); |
| 5633 __ LoadInstanceDescriptors(map, result, scratch); | 5632 __ LoadInstanceDescriptors(map, result); |
| 5634 __ ldr(result, | 5633 __ ldr(result, |
| 5635 FieldMemOperand(result, DescriptorArray::kEnumCacheOffset)); | 5634 FieldMemOperand(result, DescriptorArray::kEnumCacheOffset)); |
| 5636 __ ldr(result, | 5635 __ ldr(result, |
| 5637 FieldMemOperand(result, FixedArray::SizeFor(instr->idx()))); | 5636 FieldMemOperand(result, FixedArray::SizeFor(instr->idx()))); |
| 5638 __ cmp(result, Operand(0)); | 5637 __ cmp(result, Operand(0)); |
| 5639 DeoptimizeIf(eq, instr->environment()); | 5638 DeoptimizeIf(eq, instr->environment()); |
| 5640 | 5639 |
| 5641 __ bind(&done); | 5640 __ bind(&done); |
| 5642 } | 5641 } |
| 5643 | 5642 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 5673 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); | 5672 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); |
| 5674 __ ldr(result, FieldMemOperand(scratch, | 5673 __ ldr(result, FieldMemOperand(scratch, |
| 5675 FixedArray::kHeaderSize - kPointerSize)); | 5674 FixedArray::kHeaderSize - kPointerSize)); |
| 5676 __ bind(&done); | 5675 __ bind(&done); |
| 5677 } | 5676 } |
| 5678 | 5677 |
| 5679 | 5678 |
| 5680 #undef __ | 5679 #undef __ |
| 5681 | 5680 |
| 5682 } } // namespace v8::internal | 5681 } } // namespace v8::internal |
| OLD | NEW |