Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/ia32/lithium-codegen-ia32.cc

Issue 1086333002: Reland "Add basic crankshaft support for slow-mode for-in to avoid disabling optimizations" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Just give up if null or undefined. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/hydrogen.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698