| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/arm/lithium-codegen-arm.h" | 7 #include "src/arm/lithium-codegen-arm.h" |
| 8 #include "src/arm/lithium-gap-resolver-arm.h" | 8 #include "src/arm/lithium-gap-resolver-arm.h" |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 5744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5755 // If the environment were already registered, we would have no way of | 5755 // If the environment were already registered, we would have no way of |
| 5756 // backpatching it with the spill slot operands. | 5756 // backpatching it with the spill slot operands. |
| 5757 DCHECK(!environment->HasBeenRegistered()); | 5757 DCHECK(!environment->HasBeenRegistered()); |
| 5758 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); | 5758 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); |
| 5759 | 5759 |
| 5760 GenerateOsrPrologue(); | 5760 GenerateOsrPrologue(); |
| 5761 } | 5761 } |
| 5762 | 5762 |
| 5763 | 5763 |
| 5764 void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) { | 5764 void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) { |
| 5765 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex); | |
| 5766 __ cmp(r0, ip); | |
| 5767 DeoptimizeIf(eq, instr, Deoptimizer::kUndefined); | |
| 5768 | |
| 5769 Register null_value = r5; | |
| 5770 __ LoadRoot(null_value, Heap::kNullValueRootIndex); | |
| 5771 __ cmp(r0, null_value); | |
| 5772 DeoptimizeIf(eq, instr, Deoptimizer::kNull); | |
| 5773 | |
| 5774 __ SmiTst(r0); | 5765 __ SmiTst(r0); |
| 5775 DeoptimizeIf(eq, instr, Deoptimizer::kSmi); | 5766 DeoptimizeIf(eq, instr, Deoptimizer::kSmi); |
| 5776 | 5767 |
| 5777 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); | 5768 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); |
| 5778 __ CompareObjectType(r0, r1, r1, LAST_JS_PROXY_TYPE); | 5769 __ CompareObjectType(r0, r1, r1, LAST_JS_PROXY_TYPE); |
| 5779 DeoptimizeIf(le, instr, Deoptimizer::kWrongInstanceType); | 5770 DeoptimizeIf(le, instr, Deoptimizer::kWrongInstanceType); |
| 5780 | 5771 |
| 5781 Label use_cache, call_runtime; | 5772 Label use_cache, call_runtime; |
| 5773 Register null_value = r5; |
| 5774 __ LoadRoot(null_value, Heap::kNullValueRootIndex); |
| 5782 __ CheckEnumCache(null_value, &call_runtime); | 5775 __ CheckEnumCache(null_value, &call_runtime); |
| 5783 | 5776 |
| 5784 __ ldr(r0, FieldMemOperand(r0, HeapObject::kMapOffset)); | 5777 __ ldr(r0, FieldMemOperand(r0, HeapObject::kMapOffset)); |
| 5785 __ b(&use_cache); | 5778 __ b(&use_cache); |
| 5786 | 5779 |
| 5787 // Get the set of properties to enumerate. | 5780 // Get the set of properties to enumerate. |
| 5788 __ bind(&call_runtime); | 5781 __ bind(&call_runtime); |
| 5789 __ push(r0); | 5782 __ push(r0); |
| 5790 CallRuntime(Runtime::kGetPropertyNamesFast, 1, instr); | 5783 CallRuntime(Runtime::kGetPropertyNamesFast, 1, instr); |
| 5791 | 5784 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5916 __ Push(scope_info); | 5909 __ Push(scope_info); |
| 5917 __ push(ToRegister(instr->function())); | 5910 __ push(ToRegister(instr->function())); |
| 5918 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5911 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5919 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5912 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5920 } | 5913 } |
| 5921 | 5914 |
| 5922 | 5915 |
| 5923 #undef __ | 5916 #undef __ |
| 5924 | 5917 |
| 5925 } } // namespace v8::internal | 5918 } } // namespace v8::internal |
| OLD | NEW |