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 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
940 __ JumpIfSmi(eax, &convert, Label::kNear); | 940 __ JumpIfSmi(eax, &convert, Label::kNear); |
941 __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, ecx); | 941 __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, ecx); |
942 __ j(above_equal, &done_convert, Label::kNear); | 942 __ j(above_equal, &done_convert, Label::kNear); |
943 __ cmp(eax, isolate()->factory()->undefined_value()); | 943 __ cmp(eax, isolate()->factory()->undefined_value()); |
944 __ j(equal, &exit); | 944 __ j(equal, &exit); |
945 __ cmp(eax, isolate()->factory()->null_value()); | 945 __ cmp(eax, isolate()->factory()->null_value()); |
946 __ j(equal, &exit); | 946 __ j(equal, &exit); |
947 __ bind(&convert); | 947 __ bind(&convert); |
948 ToObjectStub stub(isolate()); | 948 ToObjectStub stub(isolate()); |
949 __ CallStub(&stub); | 949 __ CallStub(&stub); |
| 950 RestoreContext(); |
950 __ bind(&done_convert); | 951 __ bind(&done_convert); |
951 PrepareForBailoutForId(stmt->ToObjectId(), BailoutState::TOS_REGISTER); | 952 PrepareForBailoutForId(stmt->ToObjectId(), BailoutState::TOS_REGISTER); |
952 __ push(eax); | 953 __ push(eax); |
953 | 954 |
954 // Check cache validity in generated code. If we cannot guarantee cache | 955 // Check cache validity in generated code. If we cannot guarantee cache |
955 // validity, call the runtime system to check cache validity or get the | 956 // validity, call the runtime system to check cache validity or get the |
956 // property names in a fixed array. Note: Proxies never have an enum cache, | 957 // property names in a fixed array. Note: Proxies never have an enum cache, |
957 // so will always take the slow path. | 958 // so will always take the slow path. |
958 Label call_runtime, use_cache, fixed_array; | 959 Label call_runtime, use_cache, fixed_array; |
959 __ CheckEnumCache(&call_runtime); | 960 __ CheckEnumCache(&call_runtime); |
(...skipping 2710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3670 isolate->builtins()->OnStackReplacement()->entry(), | 3671 isolate->builtins()->OnStackReplacement()->entry(), |
3671 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3672 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3672 return ON_STACK_REPLACEMENT; | 3673 return ON_STACK_REPLACEMENT; |
3673 } | 3674 } |
3674 | 3675 |
3675 | 3676 |
3676 } // namespace internal | 3677 } // namespace internal |
3677 } // namespace v8 | 3678 } // namespace v8 |
3678 | 3679 |
3679 #endif // V8_TARGET_ARCH_IA32 | 3680 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |