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 5147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5158 ASSERT(result.is(v0)); | 5158 ASSERT(result.is(v0)); |
5159 __ LoadRoot(at, Heap::kMetaMapRootIndex); | 5159 __ LoadRoot(at, Heap::kMetaMapRootIndex); |
5160 DeoptimizeIf(ne, instr->environment(), a1, Operand(at)); | 5160 DeoptimizeIf(ne, instr->environment(), a1, Operand(at)); |
5161 __ bind(&use_cache); | 5161 __ bind(&use_cache); |
5162 } | 5162 } |
5163 | 5163 |
5164 | 5164 |
5165 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) { | 5165 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) { |
5166 Register map = ToRegister(instr->map()); | 5166 Register map = ToRegister(instr->map()); |
5167 Register result = ToRegister(instr->result()); | 5167 Register result = ToRegister(instr->result()); |
5168 __ LoadInstanceDescriptors(map, result); | 5168 Register scratch = ToRegister(instr->scratch()); |
| 5169 __ LoadInstanceDescriptors(map, result, scratch); |
5169 __ lw(result, | 5170 __ lw(result, |
5170 FieldMemOperand(result, DescriptorArray::kEnumerationIndexOffset)); | 5171 FieldMemOperand(result, DescriptorArray::kEnumerationIndexOffset)); |
5171 __ lw(result, | 5172 __ lw(result, |
5172 FieldMemOperand(result, FixedArray::SizeFor(instr->idx()))); | 5173 FieldMemOperand(result, FixedArray::SizeFor(instr->idx()))); |
5173 DeoptimizeIf(eq, instr->environment(), result, Operand(zero_reg)); | 5174 DeoptimizeIf(eq, instr->environment(), result, Operand(zero_reg)); |
5174 } | 5175 } |
5175 | 5176 |
5176 | 5177 |
5177 void LCodeGen::DoCheckMapValue(LCheckMapValue* instr) { | 5178 void LCodeGen::DoCheckMapValue(LCheckMapValue* instr) { |
5178 Register object = ToRegister(instr->value()); | 5179 Register object = ToRegister(instr->value()); |
(...skipping 25 matching lines...) Expand all Loading... |
5204 __ Subu(scratch, result, scratch); | 5205 __ Subu(scratch, result, scratch); |
5205 __ lw(result, FieldMemOperand(scratch, | 5206 __ lw(result, FieldMemOperand(scratch, |
5206 FixedArray::kHeaderSize - kPointerSize)); | 5207 FixedArray::kHeaderSize - kPointerSize)); |
5207 __ bind(&done); | 5208 __ bind(&done); |
5208 } | 5209 } |
5209 | 5210 |
5210 | 5211 |
5211 #undef __ | 5212 #undef __ |
5212 | 5213 |
5213 } } // namespace v8::internal | 5214 } } // namespace v8::internal |
OLD | NEW |