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 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
930 // it to a JS receiver. See ECMA-262 version 5, section 12.6.4. | 930 // it to a JS receiver. See ECMA-262 version 5, section 12.6.4. |
931 Label convert, done_convert; | 931 Label convert, done_convert; |
932 __ JumpIfSmi(eax, &convert, Label::kNear); | 932 __ JumpIfSmi(eax, &convert, Label::kNear); |
933 __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, ecx); | 933 __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, ecx); |
934 __ j(above_equal, &done_convert, Label::kNear); | 934 __ j(above_equal, &done_convert, Label::kNear); |
935 __ cmp(eax, isolate()->factory()->undefined_value()); | 935 __ cmp(eax, isolate()->factory()->undefined_value()); |
936 __ j(equal, &exit); | 936 __ j(equal, &exit); |
937 __ cmp(eax, isolate()->factory()->null_value()); | 937 __ cmp(eax, isolate()->factory()->null_value()); |
938 __ j(equal, &exit); | 938 __ j(equal, &exit); |
939 __ bind(&convert); | 939 __ bind(&convert); |
| 940 __ Push(esi); |
940 ToObjectStub stub(isolate()); | 941 ToObjectStub stub(isolate()); |
941 __ CallStub(&stub); | 942 __ CallStub(&stub); |
| 943 __ Pop(esi); |
942 __ bind(&done_convert); | 944 __ bind(&done_convert); |
943 PrepareForBailoutForId(stmt->ToObjectId(), BailoutState::TOS_REGISTER); | 945 PrepareForBailoutForId(stmt->ToObjectId(), BailoutState::TOS_REGISTER); |
944 __ push(eax); | 946 __ push(eax); |
945 | 947 |
946 // Check cache validity in generated code. If we cannot guarantee cache | 948 // Check cache validity in generated code. If we cannot guarantee cache |
947 // validity, call the runtime system to check cache validity or get the | 949 // validity, call the runtime system to check cache validity or get the |
948 // property names in a fixed array. Note: Proxies never have an enum cache, | 950 // property names in a fixed array. Note: Proxies never have an enum cache, |
949 // so will always take the slow path. | 951 // so will always take the slow path. |
950 Label call_runtime, use_cache, fixed_array; | 952 Label call_runtime, use_cache, fixed_array; |
951 __ CheckEnumCache(&call_runtime); | 953 __ CheckEnumCache(&call_runtime); |
(...skipping 2710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3662 isolate->builtins()->OnStackReplacement()->entry(), | 3664 isolate->builtins()->OnStackReplacement()->entry(), |
3663 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3665 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3664 return ON_STACK_REPLACEMENT; | 3666 return ON_STACK_REPLACEMENT; |
3665 } | 3667 } |
3666 | 3668 |
3667 | 3669 |
3668 } // namespace internal | 3670 } // namespace internal |
3669 } // namespace v8 | 3671 } // namespace v8 |
3670 | 3672 |
3671 #endif // V8_TARGET_ARCH_X87 | 3673 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |