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 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
8 | 8 |
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 5581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5592 // backpatching it with the spill slot operands. | 5592 // backpatching it with the spill slot operands. |
5593 DCHECK(!environment->HasBeenRegistered()); | 5593 DCHECK(!environment->HasBeenRegistered()); |
5594 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); | 5594 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); |
5595 | 5595 |
5596 GenerateOsrPrologue(); | 5596 GenerateOsrPrologue(); |
5597 } | 5597 } |
5598 | 5598 |
5599 | 5599 |
5600 void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) { | 5600 void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) { |
5601 DCHECK(ToRegister(instr->context()).is(esi)); | 5601 DCHECK(ToRegister(instr->context()).is(esi)); |
5602 __ cmp(eax, isolate()->factory()->undefined_value()); | |
5603 DeoptimizeIf(equal, instr, Deoptimizer::kUndefined); | |
5604 | |
5605 __ cmp(eax, isolate()->factory()->null_value()); | |
5606 DeoptimizeIf(equal, instr, Deoptimizer::kNull); | |
5607 | |
5608 __ test(eax, Immediate(kSmiTagMask)); | 5602 __ test(eax, Immediate(kSmiTagMask)); |
5609 DeoptimizeIf(zero, instr, Deoptimizer::kSmi); | 5603 DeoptimizeIf(zero, instr, Deoptimizer::kSmi); |
5610 | 5604 |
5611 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); | 5605 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); |
5612 __ CmpObjectType(eax, LAST_JS_PROXY_TYPE, ecx); | 5606 __ CmpObjectType(eax, LAST_JS_PROXY_TYPE, ecx); |
5613 DeoptimizeIf(below_equal, instr, Deoptimizer::kWrongInstanceType); | 5607 DeoptimizeIf(below_equal, instr, Deoptimizer::kWrongInstanceType); |
5614 | 5608 |
5615 Label use_cache, call_runtime; | 5609 Label use_cache, call_runtime; |
5616 __ CheckEnumCache(&call_runtime); | 5610 __ CheckEnumCache(&call_runtime); |
5617 | 5611 |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5744 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5738 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5745 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5739 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5746 } | 5740 } |
5747 | 5741 |
5748 | 5742 |
5749 #undef __ | 5743 #undef __ |
5750 | 5744 |
5751 } } // namespace v8::internal | 5745 } } // namespace v8::internal |
5752 | 5746 |
5753 #endif // V8_TARGET_ARCH_IA32 | 5747 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |