| 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 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 938 // it to a JS receiver. See ECMA-262 version 5, section 12.6.4. | 938 // it to a JS receiver. See ECMA-262 version 5, section 12.6.4. |
| 939 Label convert, done_convert; | 939 Label convert, done_convert; |
| 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 __ Push(esi); |
| 948 ToObjectStub stub(isolate()); | 949 ToObjectStub stub(isolate()); |
| 949 __ CallStub(&stub); | 950 __ CallStub(&stub); |
| 951 __ Pop(esi); |
| 950 __ bind(&done_convert); | 952 __ bind(&done_convert); |
| 951 PrepareForBailoutForId(stmt->ToObjectId(), BailoutState::TOS_REGISTER); | 953 PrepareForBailoutForId(stmt->ToObjectId(), BailoutState::TOS_REGISTER); |
| 952 __ push(eax); | 954 __ push(eax); |
| 953 | 955 |
| 954 // Check cache validity in generated code. If we cannot guarantee cache | 956 // Check cache validity in generated code. If we cannot guarantee cache |
| 955 // validity, call the runtime system to check cache validity or get the | 957 // 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, | 958 // property names in a fixed array. Note: Proxies never have an enum cache, |
| 957 // so will always take the slow path. | 959 // so will always take the slow path. |
| 958 Label call_runtime, use_cache, fixed_array; | 960 Label call_runtime, use_cache, fixed_array; |
| 959 __ CheckEnumCache(&call_runtime); | 961 __ CheckEnumCache(&call_runtime); |
| (...skipping 2710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3670 isolate->builtins()->OnStackReplacement()->entry(), | 3672 isolate->builtins()->OnStackReplacement()->entry(), |
| 3671 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3673 Assembler::target_address_at(call_target_address, unoptimized_code)); |
| 3672 return ON_STACK_REPLACEMENT; | 3674 return ON_STACK_REPLACEMENT; |
| 3673 } | 3675 } |
| 3674 | 3676 |
| 3675 | 3677 |
| 3676 } // namespace internal | 3678 } // namespace internal |
| 3677 } // namespace v8 | 3679 } // namespace v8 |
| 3678 | 3680 |
| 3679 #endif // V8_TARGET_ARCH_IA32 | 3681 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |