| 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 #if V8_TARGET_ARCH_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
| 6 | 6 |
| 7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1064 // permanent slow case into register edx. | 1064 // permanent slow case into register edx. |
| 1065 __ mov(edx, Operand(esp, 3 * kPointerSize)); | 1065 __ mov(edx, Operand(esp, 3 * kPointerSize)); |
| 1066 | 1066 |
| 1067 // Check if the expected map still matches that of the enumerable. | 1067 // Check if the expected map still matches that of the enumerable. |
| 1068 // If not, we may have to filter the key. | 1068 // If not, we may have to filter the key. |
| 1069 Label update_each; | 1069 Label update_each; |
| 1070 __ mov(ecx, Operand(esp, 4 * kPointerSize)); | 1070 __ mov(ecx, Operand(esp, 4 * kPointerSize)); |
| 1071 __ cmp(edx, FieldOperand(ecx, HeapObject::kMapOffset)); | 1071 __ cmp(edx, FieldOperand(ecx, HeapObject::kMapOffset)); |
| 1072 __ j(equal, &update_each, Label::kNear); | 1072 __ j(equal, &update_each, Label::kNear); |
| 1073 | 1073 |
| 1074 // For proxies, no filtering is done. | |
| 1075 // TODO(rossberg): What if only a prototype is a proxy? Not specified yet. | |
| 1076 DCHECK(Smi::FromInt(0) == 0); | |
| 1077 __ test(edx, edx); | |
| 1078 __ j(zero, &update_each); | |
| 1079 | |
| 1080 // Convert the entry to a string or null if it isn't a property | 1074 // Convert the entry to a string or null if it isn't a property |
| 1081 // anymore. If the property has been removed while iterating, we | 1075 // anymore. If the property has been removed while iterating, we |
| 1082 // just skip it. | 1076 // just skip it. |
| 1083 __ push(ecx); // Enumerable. | 1077 __ push(ecx); // Enumerable. |
| 1084 __ push(ebx); // Current entry. | 1078 __ push(ebx); // Current entry. |
| 1085 __ CallRuntime(Runtime::kForInFilter, 2); | 1079 __ CallRuntime(Runtime::kForInFilter, 2); |
| 1086 PrepareForBailoutForId(stmt->FilterId(), TOS_REG); | 1080 PrepareForBailoutForId(stmt->FilterId(), TOS_REG); |
| 1087 __ cmp(eax, isolate()->factory()->undefined_value()); | 1081 __ cmp(eax, isolate()->factory()->undefined_value()); |
| 1088 __ j(equal, loop_statement.continue_label()); | 1082 __ j(equal, loop_statement.continue_label()); |
| 1089 __ mov(ebx, eax); | 1083 __ mov(ebx, eax); |
| (...skipping 3734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4824 Assembler::target_address_at(call_target_address, | 4818 Assembler::target_address_at(call_target_address, |
| 4825 unoptimized_code)); | 4819 unoptimized_code)); |
| 4826 return OSR_AFTER_STACK_CHECK; | 4820 return OSR_AFTER_STACK_CHECK; |
| 4827 } | 4821 } |
| 4828 | 4822 |
| 4829 | 4823 |
| 4830 } // namespace internal | 4824 } // namespace internal |
| 4831 } // namespace v8 | 4825 } // namespace v8 |
| 4832 | 4826 |
| 4833 #endif // V8_TARGET_ARCH_IA32 | 4827 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |