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

Unified Diff: src/x64/lithium-codegen-x64.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips64/lithium-codegen-mips64.cc ('k') | test/mjsunit/for-in-opt.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/lithium-codegen-x64.cc
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
index a5a38cc4b0424af887a274041f22edcf2615eacc..57b5ba9a12c238c7a55d4db1ed6f59b3d32cbdc2 100644
--- a/src/x64/lithium-codegen-x64.cc
+++ b/src/x64/lithium-codegen-x64.cc
@@ -5772,12 +5772,7 @@ void LCodeGen::DoOsrEntry(LOsrEntry* instr) {
void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) {
DCHECK(ToRegister(instr->context()).is(rsi));
- __ CompareRoot(rax, Heap::kUndefinedValueRootIndex);
- DeoptimizeIf(equal, instr, Deoptimizer::kUndefined);
- Register null_value = rdi;
- __ LoadRoot(null_value, Heap::kNullValueRootIndex);
- __ cmpp(rax, null_value);
DeoptimizeIf(equal, instr, Deoptimizer::kNull);
Condition cc = masm()->CheckSmi(rax);
@@ -5788,6 +5783,8 @@ void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) {
DeoptimizeIf(below_equal, instr, Deoptimizer::kWrongInstanceType);
Label use_cache, call_runtime;
+ Register null_value = rdi;
+ __ LoadRoot(null_value, Heap::kNullValueRootIndex);
__ CheckEnumCache(null_value, &call_runtime);
__ movp(rax, FieldOperand(rax, HeapObject::kMapOffset));
« no previous file with comments | « src/mips64/lithium-codegen-mips64.cc ('k') | test/mjsunit/for-in-opt.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698