Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 11193022: Remove scratch register requirement from LoadInstanceDescriptors on arm and mips. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698