| 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/mips64/lithium-codegen-mips64.h" | 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
| 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" | 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" |
| (...skipping 5672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5683 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); | 5683 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); |
| 5684 | 5684 |
| 5685 GenerateOsrPrologue(); | 5685 GenerateOsrPrologue(); |
| 5686 } | 5686 } |
| 5687 | 5687 |
| 5688 | 5688 |
| 5689 void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) { | 5689 void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) { |
| 5690 Register result = ToRegister(instr->result()); | 5690 Register result = ToRegister(instr->result()); |
| 5691 Register object = ToRegister(instr->object()); | 5691 Register object = ToRegister(instr->object()); |
| 5692 | 5692 |
| 5693 __ And(at, object, kSmiTagMask); | |
| 5694 DeoptimizeIf(eq, instr, Deoptimizer::kSmi, at, Operand(zero_reg)); | |
| 5695 | |
| 5696 STATIC_ASSERT(JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); | |
| 5697 __ GetObjectType(object, a1, a1); | |
| 5698 DeoptimizeIf(le, instr, Deoptimizer::kNotAJavaScriptObject, a1, | |
| 5699 Operand(JS_PROXY_TYPE)); | |
| 5700 | |
| 5701 Label use_cache, call_runtime; | 5693 Label use_cache, call_runtime; |
| 5702 DCHECK(object.is(a0)); | 5694 DCHECK(object.is(a0)); |
| 5703 Register null_value = a5; | 5695 __ CheckEnumCache(&call_runtime); |
| 5704 __ LoadRoot(null_value, Heap::kNullValueRootIndex); | |
| 5705 __ CheckEnumCache(null_value, &call_runtime); | |
| 5706 | 5696 |
| 5707 __ ld(result, FieldMemOperand(object, HeapObject::kMapOffset)); | 5697 __ ld(result, FieldMemOperand(object, HeapObject::kMapOffset)); |
| 5708 __ Branch(&use_cache); | 5698 __ Branch(&use_cache); |
| 5709 | 5699 |
| 5710 // Get the set of properties to enumerate. | 5700 // Get the set of properties to enumerate. |
| 5711 __ bind(&call_runtime); | 5701 __ bind(&call_runtime); |
| 5712 __ push(object); | 5702 __ push(object); |
| 5713 CallRuntime(Runtime::kGetPropertyNamesFast, instr); | 5703 CallRuntime(Runtime::kGetPropertyNamesFast, instr); |
| 5714 | |
| 5715 __ ld(a1, FieldMemOperand(v0, HeapObject::kMapOffset)); | |
| 5716 DCHECK(result.is(v0)); | |
| 5717 __ LoadRoot(at, Heap::kMetaMapRootIndex); | |
| 5718 DeoptimizeIf(ne, instr, Deoptimizer::kWrongMap, a1, Operand(at)); | |
| 5719 __ bind(&use_cache); | 5704 __ bind(&use_cache); |
| 5720 } | 5705 } |
| 5721 | 5706 |
| 5722 | 5707 |
| 5723 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) { | 5708 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) { |
| 5724 Register map = ToRegister(instr->map()); | 5709 Register map = ToRegister(instr->map()); |
| 5725 Register result = ToRegister(instr->result()); | 5710 Register result = ToRegister(instr->result()); |
| 5726 Label load_cache, done; | 5711 Label load_cache, done; |
| 5727 __ EnumLength(result, map); | 5712 __ EnumLength(result, map); |
| 5728 __ Branch(&load_cache, ne, result, Operand(Smi::FromInt(0))); | 5713 __ Branch(&load_cache, ne, result, Operand(Smi::FromInt(0))); |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5834 __ Push(at, ToRegister(instr->function())); | 5819 __ Push(at, ToRegister(instr->function())); |
| 5835 CallRuntime(Runtime::kPushBlockContext, instr); | 5820 CallRuntime(Runtime::kPushBlockContext, instr); |
| 5836 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5821 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5837 } | 5822 } |
| 5838 | 5823 |
| 5839 | 5824 |
| 5840 #undef __ | 5825 #undef __ |
| 5841 | 5826 |
| 5842 } // namespace internal | 5827 } // namespace internal |
| 5843 } // namespace v8 | 5828 } // namespace v8 |
| OLD | NEW |