| 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_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 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 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1183 // TODO(rossberg): What if only a prototype is a proxy? Not specified yet. | 1183 // TODO(rossberg): What if only a prototype is a proxy? Not specified yet. |
| 1184 DCHECK(Smi::FromInt(0) == 0); | 1184 DCHECK(Smi::FromInt(0) == 0); |
| 1185 __ test(edx, edx); | 1185 __ test(edx, edx); |
| 1186 __ j(zero, &update_each); | 1186 __ j(zero, &update_each); |
| 1187 | 1187 |
| 1188 // Convert the entry to a string or null if it isn't a property | 1188 // Convert the entry to a string or null if it isn't a property |
| 1189 // anymore. If the property has been removed while iterating, we | 1189 // anymore. If the property has been removed while iterating, we |
| 1190 // just skip it. | 1190 // just skip it. |
| 1191 __ push(ecx); // Enumerable. | 1191 __ push(ecx); // Enumerable. |
| 1192 __ push(ebx); // Current entry. | 1192 __ push(ebx); // Current entry. |
| 1193 __ InvokeBuiltin(Builtins::FILTER_KEY, CALL_FUNCTION); | 1193 __ CallRuntime(Runtime::kForInFilter, 2); |
| 1194 PrepareForBailoutForId(stmt->FilterId(), TOS_REG); | 1194 PrepareForBailoutForId(stmt->FilterId(), TOS_REG); |
| 1195 __ test(eax, eax); | 1195 __ cmp(eax, isolate()->factory()->undefined_value()); |
| 1196 __ j(equal, loop_statement.continue_label()); | 1196 __ j(equal, loop_statement.continue_label()); |
| 1197 __ mov(ebx, eax); | 1197 __ mov(ebx, eax); |
| 1198 | 1198 |
| 1199 // Update the 'each' property or variable from the possibly filtered | 1199 // Update the 'each' property or variable from the possibly filtered |
| 1200 // entry in register ebx. | 1200 // entry in register ebx. |
| 1201 __ bind(&update_each); | 1201 __ bind(&update_each); |
| 1202 __ mov(result_register(), ebx); | 1202 __ mov(result_register(), ebx); |
| 1203 // Perform the assignment as if via '='. | 1203 // Perform the assignment as if via '='. |
| 1204 { EffectContext context(this); | 1204 { EffectContext context(this); |
| 1205 EmitAssignment(stmt->each(), stmt->EachFeedbackSlot()); | 1205 EmitAssignment(stmt->each(), stmt->EachFeedbackSlot()); |
| (...skipping 4220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5426 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5426 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 5427 Assembler::target_address_at(call_target_address, | 5427 Assembler::target_address_at(call_target_address, |
| 5428 unoptimized_code)); | 5428 unoptimized_code)); |
| 5429 return OSR_AFTER_STACK_CHECK; | 5429 return OSR_AFTER_STACK_CHECK; |
| 5430 } | 5430 } |
| 5431 | 5431 |
| 5432 | 5432 |
| 5433 } } // namespace v8::internal | 5433 } } // namespace v8::internal |
| 5434 | 5434 |
| 5435 #endif // V8_TARGET_ARCH_X87 | 5435 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |