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 5373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5384 ASSERT(result.is(v0)); | 5384 ASSERT(result.is(v0)); |
5385 __ LoadRoot(at, Heap::kMetaMapRootIndex); | 5385 __ LoadRoot(at, Heap::kMetaMapRootIndex); |
5386 DeoptimizeIf(ne, instr->environment(), a1, Operand(at)); | 5386 DeoptimizeIf(ne, instr->environment(), a1, Operand(at)); |
5387 __ bind(&use_cache); | 5387 __ bind(&use_cache); |
5388 } | 5388 } |
5389 | 5389 |
5390 | 5390 |
5391 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) { | 5391 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) { |
5392 Register map = ToRegister(instr->map()); | 5392 Register map = ToRegister(instr->map()); |
5393 Register result = ToRegister(instr->result()); | 5393 Register result = ToRegister(instr->result()); |
5394 Register scratch = ToRegister(instr->scratch()); | |
5395 Label load_cache, done; | 5394 Label load_cache, done; |
5396 __ EnumLength(result, map); | 5395 __ EnumLength(result, map); |
5397 __ Branch(&load_cache, ne, result, Operand(Smi::FromInt(0))); | 5396 __ Branch(&load_cache, ne, result, Operand(Smi::FromInt(0))); |
5398 __ li(result, Operand(isolate()->factory()->empty_fixed_array())); | 5397 __ li(result, Operand(isolate()->factory()->empty_fixed_array())); |
5399 __ jmp(&done); | 5398 __ jmp(&done); |
5400 | 5399 |
5401 __ bind(&load_cache); | 5400 __ bind(&load_cache); |
5402 __ LoadInstanceDescriptors(map, result, scratch); | 5401 __ LoadInstanceDescriptors(map, result); |
5403 __ lw(result, | 5402 __ lw(result, |
5404 FieldMemOperand(result, DescriptorArray::kEnumCacheOffset)); | 5403 FieldMemOperand(result, DescriptorArray::kEnumCacheOffset)); |
5405 __ lw(result, | 5404 __ lw(result, |
5406 FieldMemOperand(result, FixedArray::SizeFor(instr->idx()))); | 5405 FieldMemOperand(result, FixedArray::SizeFor(instr->idx()))); |
5407 DeoptimizeIf(eq, instr->environment(), result, Operand(zero_reg)); | 5406 DeoptimizeIf(eq, instr->environment(), result, Operand(zero_reg)); |
5408 | 5407 |
5409 __ bind(&done); | 5408 __ bind(&done); |
5410 } | 5409 } |
5411 | 5410 |
5412 | 5411 |
(...skipping 27 matching lines...) Expand all Loading... |
5440 __ Subu(scratch, result, scratch); | 5439 __ Subu(scratch, result, scratch); |
5441 __ lw(result, FieldMemOperand(scratch, | 5440 __ lw(result, FieldMemOperand(scratch, |
5442 FixedArray::kHeaderSize - kPointerSize)); | 5441 FixedArray::kHeaderSize - kPointerSize)); |
5443 __ bind(&done); | 5442 __ bind(&done); |
5444 } | 5443 } |
5445 | 5444 |
5446 | 5445 |
5447 #undef __ | 5446 #undef __ |
5448 | 5447 |
5449 } } // namespace v8::internal | 5448 } } // namespace v8::internal |
OLD | NEW |