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