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 2885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2896 | 2896 |
2897 __ JumpIfSmi(eax, if_false); | 2897 __ JumpIfSmi(eax, if_false); |
2898 __ CmpObjectType(eax, SIMD128_VALUE_TYPE, ebx); | 2898 __ CmpObjectType(eax, SIMD128_VALUE_TYPE, ebx); |
2899 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 2899 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
2900 Split(equal, if_true, if_false, fall_through); | 2900 Split(equal, if_true, if_false, fall_through); |
2901 | 2901 |
2902 context()->Plug(if_true, if_false); | 2902 context()->Plug(if_true, if_false); |
2903 } | 2903 } |
2904 | 2904 |
2905 | 2905 |
2906 void FullCodeGenerator::EmitIsMinusZero(CallRuntime* expr) { | |
2907 ZoneList<Expression*>* args = expr->arguments(); | |
2908 DCHECK(args->length() == 1); | |
2909 | |
2910 VisitForAccumulatorValue(args->at(0)); | |
2911 | |
2912 Label materialize_true, materialize_false; | |
2913 Label* if_true = NULL; | |
2914 Label* if_false = NULL; | |
2915 Label* fall_through = NULL; | |
2916 context()->PrepareTest(&materialize_true, &materialize_false, | |
2917 &if_true, &if_false, &fall_through); | |
2918 | |
2919 Handle<Map> map = masm()->isolate()->factory()->heap_number_map(); | |
2920 __ CheckMap(eax, map, if_false, DO_SMI_CHECK); | |
2921 // Check if the exponent half is 0x80000000. Comparing against 1 and | |
2922 // checking for overflow is the shortest possible encoding. | |
2923 __ cmp(FieldOperand(eax, HeapNumber::kExponentOffset), Immediate(0x1)); | |
2924 __ j(no_overflow, if_false); | |
2925 __ cmp(FieldOperand(eax, HeapNumber::kMantissaOffset), Immediate(0x0)); | |
2926 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
2927 Split(equal, if_true, if_false, fall_through); | |
2928 | |
2929 context()->Plug(if_true, if_false); | |
2930 } | |
2931 | |
2932 | |
2933 void FullCodeGenerator::EmitIsArray(CallRuntime* expr) { | 2906 void FullCodeGenerator::EmitIsArray(CallRuntime* expr) { |
2934 ZoneList<Expression*>* args = expr->arguments(); | 2907 ZoneList<Expression*>* args = expr->arguments(); |
2935 DCHECK(args->length() == 1); | 2908 DCHECK(args->length() == 1); |
2936 | 2909 |
2937 VisitForAccumulatorValue(args->at(0)); | 2910 VisitForAccumulatorValue(args->at(0)); |
2938 | 2911 |
2939 Label materialize_true, materialize_false; | 2912 Label materialize_true, materialize_false; |
2940 Label* if_true = NULL; | 2913 Label* if_true = NULL; |
2941 Label* if_false = NULL; | 2914 Label* if_false = NULL; |
2942 Label* fall_through = NULL; | 2915 Label* fall_through = NULL; |
(...skipping 1648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4591 Assembler::target_address_at(call_target_address, | 4564 Assembler::target_address_at(call_target_address, |
4592 unoptimized_code)); | 4565 unoptimized_code)); |
4593 return OSR_AFTER_STACK_CHECK; | 4566 return OSR_AFTER_STACK_CHECK; |
4594 } | 4567 } |
4595 | 4568 |
4596 | 4569 |
4597 } // namespace internal | 4570 } // namespace internal |
4598 } // namespace v8 | 4571 } // namespace v8 |
4599 | 4572 |
4600 #endif // V8_TARGET_ARCH_IA32 | 4573 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |