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 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
941 __ j(equal, &exit); | 941 __ j(equal, &exit); |
942 __ cmp(eax, isolate()->factory()->null_value()); | 942 __ cmp(eax, isolate()->factory()->null_value()); |
943 __ j(equal, &exit); | 943 __ j(equal, &exit); |
944 __ bind(&convert); | 944 __ bind(&convert); |
945 ToObjectStub stub(isolate()); | 945 ToObjectStub stub(isolate()); |
946 __ CallStub(&stub); | 946 __ CallStub(&stub); |
947 __ bind(&done_convert); | 947 __ bind(&done_convert); |
948 PrepareForBailoutForId(stmt->ToObjectId(), TOS_REG); | 948 PrepareForBailoutForId(stmt->ToObjectId(), TOS_REG); |
949 __ push(eax); | 949 __ push(eax); |
950 | 950 |
951 // Check cache validity in generated code. This is a fast case for | 951 // Check cache validity in generated code. If we cannot guarantee cache |
952 // the JSObject::IsSimpleEnum cache validity checks. If we cannot | 952 // validity, call the runtime system to check cache validity or get the |
953 // guarantee cache validity, call the runtime system to check cache | 953 // property names in a fixed array. Note: Proxies never have an enum cache, |
954 // validity or get the property names in a fixed array. | 954 // so will always take the slow path. |
955 // Note: Proxies never have an enum cache, so will always take the | |
956 // slow path. | |
957 Label call_runtime, use_cache, fixed_array; | 955 Label call_runtime, use_cache, fixed_array; |
958 __ CheckEnumCache(&call_runtime); | 956 __ CheckEnumCache(&call_runtime); |
959 | 957 |
960 __ mov(eax, FieldOperand(eax, HeapObject::kMapOffset)); | 958 __ mov(eax, FieldOperand(eax, HeapObject::kMapOffset)); |
961 __ jmp(&use_cache, Label::kNear); | 959 __ jmp(&use_cache, Label::kNear); |
962 | 960 |
963 // Get the set of properties to enumerate. | 961 // Get the set of properties to enumerate. |
964 __ bind(&call_runtime); | 962 __ bind(&call_runtime); |
965 __ push(eax); | 963 __ push(eax); |
966 __ CallRuntime(Runtime::kForInEnumerate); | 964 __ CallRuntime(Runtime::kForInEnumerate); |
(...skipping 2898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3865 isolate->builtins()->OnStackReplacement()->entry(), | 3863 isolate->builtins()->OnStackReplacement()->entry(), |
3866 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3864 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3867 return ON_STACK_REPLACEMENT; | 3865 return ON_STACK_REPLACEMENT; |
3868 } | 3866 } |
3869 | 3867 |
3870 | 3868 |
3871 } // namespace internal | 3869 } // namespace internal |
3872 } // namespace v8 | 3870 } // namespace v8 |
3873 | 3871 |
3874 #endif // V8_TARGET_ARCH_X87 | 3872 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |