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_X87 | 5 #if V8_TARGET_ARCH_X87 |
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 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1056 // permanent slow case into register edx. | 1056 // permanent slow case into register edx. |
1057 __ mov(edx, Operand(esp, 3 * kPointerSize)); | 1057 __ mov(edx, Operand(esp, 3 * kPointerSize)); |
1058 | 1058 |
1059 // Check if the expected map still matches that of the enumerable. | 1059 // Check if the expected map still matches that of the enumerable. |
1060 // If not, we may have to filter the key. | 1060 // If not, we may have to filter the key. |
1061 Label update_each; | 1061 Label update_each; |
1062 __ mov(ecx, Operand(esp, 4 * kPointerSize)); | 1062 __ mov(ecx, Operand(esp, 4 * kPointerSize)); |
1063 __ cmp(edx, FieldOperand(ecx, HeapObject::kMapOffset)); | 1063 __ cmp(edx, FieldOperand(ecx, HeapObject::kMapOffset)); |
1064 __ j(equal, &update_each, Label::kNear); | 1064 __ j(equal, &update_each, Label::kNear); |
1065 | 1065 |
1066 // For proxies, no filtering is done. | |
1067 // TODO(rossberg): What if only a prototype is a proxy? Not specified yet. | |
1068 DCHECK(Smi::FromInt(0) == 0); | |
1069 __ test(edx, edx); | |
1070 __ j(zero, &update_each); | |
1071 | |
1072 // Convert the entry to a string or null if it isn't a property | 1066 // Convert the entry to a string or null if it isn't a property |
1073 // anymore. If the property has been removed while iterating, we | 1067 // anymore. If the property has been removed while iterating, we |
1074 // just skip it. | 1068 // just skip it. |
1075 __ push(ecx); // Enumerable. | 1069 __ push(ecx); // Enumerable. |
1076 __ push(ebx); // Current entry. | 1070 __ push(ebx); // Current entry. |
1077 __ CallRuntime(Runtime::kForInFilter, 2); | 1071 __ CallRuntime(Runtime::kForInFilter, 2); |
1078 PrepareForBailoutForId(stmt->FilterId(), TOS_REG); | 1072 PrepareForBailoutForId(stmt->FilterId(), TOS_REG); |
1079 __ cmp(eax, isolate()->factory()->undefined_value()); | 1073 __ cmp(eax, isolate()->factory()->undefined_value()); |
1080 __ j(equal, loop_statement.continue_label()); | 1074 __ j(equal, loop_statement.continue_label()); |
1081 __ mov(ebx, eax); | 1075 __ mov(ebx, eax); |
(...skipping 3735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4817 Assembler::target_address_at(call_target_address, | 4811 Assembler::target_address_at(call_target_address, |
4818 unoptimized_code)); | 4812 unoptimized_code)); |
4819 return OSR_AFTER_STACK_CHECK; | 4813 return OSR_AFTER_STACK_CHECK; |
4820 } | 4814 } |
4821 | 4815 |
4822 | 4816 |
4823 } // namespace internal | 4817 } // namespace internal |
4824 } // namespace v8 | 4818 } // namespace v8 |
4825 | 4819 |
4826 #endif // V8_TARGET_ARCH_X87 | 4820 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |