Commit 99c116cc authored by mbrandy's avatar mbrandy Committed by Commit bot

PPC: Reland "Add basic crankshaft support for slow-mode for-in to avoid disabling optimizations"

Port 80982535

R=verwaest@chromium.org, dstence@us.ibm.com, michael_dawson@ca.ibm.com
BUG=

Review URL: https://codereview.chromium.org/1057413003

Cr-Commit-Position: refs/heads/master@{#27923}
parent 5cb387c2
......@@ -6035,15 +6035,6 @@ void LCodeGen::DoOsrEntry(LOsrEntry* instr) {
void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) {
__ LoadRoot(ip, Heap::kUndefinedValueRootIndex);
__ cmp(r3, ip);
DeoptimizeIf(eq, instr, Deoptimizer::kUndefined);
Register null_value = r8;
__ LoadRoot(null_value, Heap::kNullValueRootIndex);
__ cmp(r3, null_value);
DeoptimizeIf(eq, instr, Deoptimizer::kNull);
__ TestIfSmi(r3, r0);
DeoptimizeIf(eq, instr, Deoptimizer::kSmi, cr0);
......@@ -6052,6 +6043,8 @@ void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) {
DeoptimizeIf(le, instr, Deoptimizer::kWrongInstanceType);
Label use_cache, call_runtime;
Register null_value = r8;
__ LoadRoot(null_value, Heap::kNullValueRootIndex);
__ CheckEnumCache(null_value, &call_runtime);
__ LoadP(r3, FieldMemOperand(r3, HeapObject::kMapOffset));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment