OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
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 5352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5363 CallRuntime(Runtime::kForInEnumerate, instr); | 5363 CallRuntime(Runtime::kForInEnumerate, instr); |
5364 __ bind(&use_cache); | 5364 __ bind(&use_cache); |
5365 } | 5365 } |
5366 | 5366 |
5367 | 5367 |
5368 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) { | 5368 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) { |
5369 Register map = ToRegister(instr->map()); | 5369 Register map = ToRegister(instr->map()); |
5370 Register result = ToRegister(instr->result()); | 5370 Register result = ToRegister(instr->result()); |
5371 Label load_cache, done; | 5371 Label load_cache, done; |
5372 __ EnumLength(result, map); | 5372 __ EnumLength(result, map); |
5373 __ Branch(&load_cache, ne, result, Operand(Smi::kZero)); | 5373 __ Branch(&load_cache, ne, result, Operand(Smi::FromInt(0))); |
5374 __ li(result, Operand(isolate()->factory()->empty_fixed_array())); | 5374 __ li(result, Operand(isolate()->factory()->empty_fixed_array())); |
5375 __ jmp(&done); | 5375 __ jmp(&done); |
5376 | 5376 |
5377 __ bind(&load_cache); | 5377 __ bind(&load_cache); |
5378 __ LoadInstanceDescriptors(map, result); | 5378 __ LoadInstanceDescriptors(map, result); |
5379 __ lw(result, | 5379 __ lw(result, |
5380 FieldMemOperand(result, DescriptorArray::kEnumCacheOffset)); | 5380 FieldMemOperand(result, DescriptorArray::kEnumCacheOffset)); |
5381 __ lw(result, | 5381 __ lw(result, |
5382 FieldMemOperand(result, FixedArray::SizeFor(instr->idx()))); | 5382 FieldMemOperand(result, FixedArray::SizeFor(instr->idx()))); |
5383 DeoptimizeIf(eq, instr, DeoptimizeReason::kNoCache, result, | 5383 DeoptimizeIf(eq, instr, DeoptimizeReason::kNoCache, result, |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5467 __ lw(result, FieldMemOperand(scratch, | 5467 __ lw(result, FieldMemOperand(scratch, |
5468 FixedArray::kHeaderSize - kPointerSize)); | 5468 FixedArray::kHeaderSize - kPointerSize)); |
5469 __ bind(deferred->exit()); | 5469 __ bind(deferred->exit()); |
5470 __ bind(&done); | 5470 __ bind(&done); |
5471 } | 5471 } |
5472 | 5472 |
5473 #undef __ | 5473 #undef __ |
5474 | 5474 |
5475 } // namespace internal | 5475 } // namespace internal |
5476 } // namespace v8 | 5476 } // namespace v8 |
OLD | NEW |