OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 7 #if V8_TARGET_ARCH_PPC |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1225 | 1225 |
1226 // For proxies, no filtering is done. | 1226 // For proxies, no filtering is done. |
1227 // TODO(rossberg): What if only a prototype is a proxy? Not specified yet. | 1227 // TODO(rossberg): What if only a prototype is a proxy? Not specified yet. |
1228 __ CmpSmiLiteral(r5, Smi::FromInt(0), r0); | 1228 __ CmpSmiLiteral(r5, Smi::FromInt(0), r0); |
1229 __ beq(&update_each); | 1229 __ beq(&update_each); |
1230 | 1230 |
1231 // Convert the entry to a string or (smi) 0 if it isn't a property | 1231 // Convert the entry to a string or (smi) 0 if it isn't a property |
1232 // any more. If the property has been removed while iterating, we | 1232 // any more. If the property has been removed while iterating, we |
1233 // just skip it. | 1233 // just skip it. |
1234 __ Push(r4, r6); // Enumerable and current entry. | 1234 __ Push(r4, r6); // Enumerable and current entry. |
1235 __ InvokeBuiltin(Builtins::FILTER_KEY, CALL_FUNCTION); | 1235 __ CallRuntime(Runtime::kForInFilter, 2); |
1236 PrepareForBailoutForId(stmt->FilterId(), TOS_REG); | 1236 PrepareForBailoutForId(stmt->FilterId(), TOS_REG); |
1237 __ mr(r6, r3); | 1237 __ mr(r6, r3); |
1238 __ cmpi(r6, Operand::Zero()); | 1238 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); |
| 1239 __ cmp(r3, r0); |
1239 __ beq(loop_statement.continue_label()); | 1240 __ beq(loop_statement.continue_label()); |
1240 | 1241 |
1241 // Update the 'each' property or variable from the possibly filtered | 1242 // Update the 'each' property or variable from the possibly filtered |
1242 // entry in register r6. | 1243 // entry in register r6. |
1243 __ bind(&update_each); | 1244 __ bind(&update_each); |
1244 __ mr(result_register(), r6); | 1245 __ mr(result_register(), r6); |
1245 // Perform the assignment as if via '='. | 1246 // Perform the assignment as if via '='. |
1246 { | 1247 { |
1247 EffectContext context(this); | 1248 EffectContext context(this); |
1248 EmitAssignment(stmt->each(), stmt->EachFeedbackSlot()); | 1249 EmitAssignment(stmt->each(), stmt->EachFeedbackSlot()); |
(...skipping 4266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5515 return ON_STACK_REPLACEMENT; | 5516 return ON_STACK_REPLACEMENT; |
5516 } | 5517 } |
5517 | 5518 |
5518 DCHECK(interrupt_address == | 5519 DCHECK(interrupt_address == |
5519 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5520 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5520 return OSR_AFTER_STACK_CHECK; | 5521 return OSR_AFTER_STACK_CHECK; |
5521 } | 5522 } |
5522 } | 5523 } |
5523 } // namespace v8::internal | 5524 } // namespace v8::internal |
5524 #endif // V8_TARGET_ARCH_PPC | 5525 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |