| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/crankshaft/arm/lithium-codegen-arm.h" | 5 #include "src/crankshaft/arm/lithium-codegen-arm.h" |
| 6 | 6 |
| 7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" | 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" |
| (...skipping 5433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5444 // If the environment were already registered, we would have no way of | 5444 // If the environment were already registered, we would have no way of |
| 5445 // backpatching it with the spill slot operands. | 5445 // backpatching it with the spill slot operands. |
| 5446 DCHECK(!environment->HasBeenRegistered()); | 5446 DCHECK(!environment->HasBeenRegistered()); |
| 5447 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); | 5447 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); |
| 5448 | 5448 |
| 5449 GenerateOsrPrologue(); | 5449 GenerateOsrPrologue(); |
| 5450 } | 5450 } |
| 5451 | 5451 |
| 5452 | 5452 |
| 5453 void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) { | 5453 void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) { |
| 5454 __ SmiTst(r0); | |
| 5455 DeoptimizeIf(eq, instr, Deoptimizer::kSmi); | |
| 5456 | |
| 5457 STATIC_ASSERT(JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); | |
| 5458 __ CompareObjectType(r0, r1, r1, JS_PROXY_TYPE); | |
| 5459 DeoptimizeIf(le, instr, Deoptimizer::kWrongInstanceType); | |
| 5460 | |
| 5461 Label use_cache, call_runtime; | 5454 Label use_cache, call_runtime; |
| 5462 Register null_value = r5; | 5455 __ CheckEnumCache(&call_runtime); |
| 5463 __ LoadRoot(null_value, Heap::kNullValueRootIndex); | |
| 5464 __ CheckEnumCache(null_value, &call_runtime); | |
| 5465 | 5456 |
| 5466 __ ldr(r0, FieldMemOperand(r0, HeapObject::kMapOffset)); | 5457 __ ldr(r0, FieldMemOperand(r0, HeapObject::kMapOffset)); |
| 5467 __ b(&use_cache); | 5458 __ b(&use_cache); |
| 5468 | 5459 |
| 5469 // Get the set of properties to enumerate. | 5460 // Get the set of properties to enumerate. |
| 5470 __ bind(&call_runtime); | 5461 __ bind(&call_runtime); |
| 5471 __ push(r0); | 5462 __ push(r0); |
| 5472 CallRuntime(Runtime::kGetPropertyNamesFast, instr); | 5463 CallRuntime(Runtime::kGetPropertyNamesFast, instr); |
| 5473 | |
| 5474 __ ldr(r1, FieldMemOperand(r0, HeapObject::kMapOffset)); | |
| 5475 __ LoadRoot(ip, Heap::kMetaMapRootIndex); | |
| 5476 __ cmp(r1, ip); | |
| 5477 DeoptimizeIf(ne, instr, Deoptimizer::kWrongMap); | |
| 5478 __ bind(&use_cache); | 5464 __ bind(&use_cache); |
| 5479 } | 5465 } |
| 5480 | 5466 |
| 5481 | 5467 |
| 5482 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) { | 5468 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) { |
| 5483 Register map = ToRegister(instr->map()); | 5469 Register map = ToRegister(instr->map()); |
| 5484 Register result = ToRegister(instr->result()); | 5470 Register result = ToRegister(instr->result()); |
| 5485 Label load_cache, done; | 5471 Label load_cache, done; |
| 5486 __ EnumLength(result, map); | 5472 __ EnumLength(result, map); |
| 5487 __ cmp(result, Operand(Smi::FromInt(0))); | 5473 __ cmp(result, Operand(Smi::FromInt(0))); |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5599 __ push(ToRegister(instr->function())); | 5585 __ push(ToRegister(instr->function())); |
| 5600 CallRuntime(Runtime::kPushBlockContext, instr); | 5586 CallRuntime(Runtime::kPushBlockContext, instr); |
| 5601 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5587 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5602 } | 5588 } |
| 5603 | 5589 |
| 5604 | 5590 |
| 5605 #undef __ | 5591 #undef __ |
| 5606 | 5592 |
| 5607 } // namespace internal | 5593 } // namespace internal |
| 5608 } // namespace v8 | 5594 } // namespace v8 |
| OLD | NEW |