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_X64 | 5 #if V8_TARGET_ARCH_X64 |
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 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1022 | 1022 |
1023 // The enum cache is valid. Load the map of the object being | 1023 // The enum cache is valid. Load the map of the object being |
1024 // iterated over and use the cache for the iteration. | 1024 // iterated over and use the cache for the iteration. |
1025 Label use_cache; | 1025 Label use_cache; |
1026 __ movp(rax, FieldOperand(rax, HeapObject::kMapOffset)); | 1026 __ movp(rax, FieldOperand(rax, HeapObject::kMapOffset)); |
1027 __ jmp(&use_cache, Label::kNear); | 1027 __ jmp(&use_cache, Label::kNear); |
1028 | 1028 |
1029 // Get the set of properties to enumerate. | 1029 // Get the set of properties to enumerate. |
1030 __ bind(&call_runtime); | 1030 __ bind(&call_runtime); |
1031 __ Push(rax); // Duplicate the enumerable object on the stack. | 1031 __ Push(rax); // Duplicate the enumerable object on the stack. |
1032 __ CallRuntime(Runtime::kGetPropertyNamesFast); | 1032 __ CallRuntime(Runtime::kForInEnumerate); |
1033 PrepareForBailoutForId(stmt->EnumId(), TOS_REG); | 1033 PrepareForBailoutForId(stmt->EnumId(), TOS_REG); |
1034 | 1034 |
1035 // If we got a map from the runtime call, we can do a fast | 1035 // If we got a map from the runtime call, we can do a fast |
1036 // modification check. Otherwise, we got a fixed array, and we have | 1036 // modification check. Otherwise, we got a fixed array, and we have |
1037 // to do a slow check. | 1037 // to do a slow check. |
1038 Label fixed_array; | 1038 Label fixed_array; |
1039 __ CompareRoot(FieldOperand(rax, HeapObject::kMapOffset), | 1039 __ CompareRoot(FieldOperand(rax, HeapObject::kMapOffset), |
1040 Heap::kMetaMapRootIndex); | 1040 Heap::kMetaMapRootIndex); |
1041 __ j(not_equal, &fixed_array); | 1041 __ j(not_equal, &fixed_array); |
1042 | 1042 |
(...skipping 3677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4720 Assembler::target_address_at(call_target_address, | 4720 Assembler::target_address_at(call_target_address, |
4721 unoptimized_code)); | 4721 unoptimized_code)); |
4722 return OSR_AFTER_STACK_CHECK; | 4722 return OSR_AFTER_STACK_CHECK; |
4723 } | 4723 } |
4724 | 4724 |
4725 | 4725 |
4726 } // namespace internal | 4726 } // namespace internal |
4727 } // namespace v8 | 4727 } // namespace v8 |
4728 | 4728 |
4729 #endif // V8_TARGET_ARCH_X64 | 4729 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |