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 5152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5163 __ bind(&use_cache); | 5163 __ bind(&use_cache); |
5164 } | 5164 } |
5165 | 5165 |
5166 | 5166 |
5167 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) { | 5167 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) { |
5168 Register map = ToRegister(instr->map()); | 5168 Register map = ToRegister(instr->map()); |
5169 Register result = ToRegister(instr->result()); | 5169 Register result = ToRegister(instr->result()); |
5170 Register scratch = ToRegister(instr->scratch()); | 5170 Register scratch = ToRegister(instr->scratch()); |
5171 __ LoadInstanceDescriptors(map, result, scratch); | 5171 __ LoadInstanceDescriptors(map, result, scratch); |
5172 __ lw(result, | 5172 __ lw(result, |
5173 FieldMemOperand(result, DescriptorArray::kLastAddedOffset)); | 5173 FieldMemOperand(result, DescriptorArray::kEnumCacheOffset)); |
5174 __ lw(result, | 5174 __ lw(result, |
5175 FieldMemOperand(result, FixedArray::SizeFor(instr->idx()))); | 5175 FieldMemOperand(result, FixedArray::SizeFor(instr->idx()))); |
5176 DeoptimizeIf(eq, instr->environment(), result, Operand(zero_reg)); | 5176 DeoptimizeIf(eq, instr->environment(), result, Operand(zero_reg)); |
5177 } | 5177 } |
5178 | 5178 |
5179 | 5179 |
5180 void LCodeGen::DoCheckMapValue(LCheckMapValue* instr) { | 5180 void LCodeGen::DoCheckMapValue(LCheckMapValue* instr) { |
5181 Register object = ToRegister(instr->value()); | 5181 Register object = ToRegister(instr->value()); |
5182 Register map = ToRegister(instr->map()); | 5182 Register map = ToRegister(instr->map()); |
5183 __ lw(scratch0(), FieldMemOperand(object, HeapObject::kMapOffset)); | 5183 __ lw(scratch0(), FieldMemOperand(object, HeapObject::kMapOffset)); |
(...skipping 23 matching lines...) Expand all Loading... |
5207 __ Subu(scratch, result, scratch); | 5207 __ Subu(scratch, result, scratch); |
5208 __ lw(result, FieldMemOperand(scratch, | 5208 __ lw(result, FieldMemOperand(scratch, |
5209 FixedArray::kHeaderSize - kPointerSize)); | 5209 FixedArray::kHeaderSize - kPointerSize)); |
5210 __ bind(&done); | 5210 __ bind(&done); |
5211 } | 5211 } |
5212 | 5212 |
5213 | 5213 |
5214 #undef __ | 5214 #undef __ |
5215 | 5215 |
5216 } } // namespace v8::internal | 5216 } } // namespace v8::internal |
OLD | NEW |