| 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 3009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3020 | 3020 |
| 3021 __ JumpIfSmi(eax, if_false); | 3021 __ JumpIfSmi(eax, if_false); |
| 3022 __ CmpObjectType(eax, SIMD128_VALUE_TYPE, ebx); | 3022 __ CmpObjectType(eax, SIMD128_VALUE_TYPE, ebx); |
| 3023 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3023 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 3024 Split(equal, if_true, if_false, fall_through); | 3024 Split(equal, if_true, if_false, fall_through); |
| 3025 | 3025 |
| 3026 context()->Plug(if_true, if_false); | 3026 context()->Plug(if_true, if_false); |
| 3027 } | 3027 } |
| 3028 | 3028 |
| 3029 | 3029 |
| 3030 void FullCodeGenerator::EmitIsFunction(CallRuntime* expr) { | |
| 3031 ZoneList<Expression*>* args = expr->arguments(); | |
| 3032 DCHECK(args->length() == 1); | |
| 3033 | |
| 3034 VisitForAccumulatorValue(args->at(0)); | |
| 3035 | |
| 3036 Label materialize_true, materialize_false; | |
| 3037 Label* if_true = NULL; | |
| 3038 Label* if_false = NULL; | |
| 3039 Label* fall_through = NULL; | |
| 3040 context()->PrepareTest(&materialize_true, &materialize_false, | |
| 3041 &if_true, &if_false, &fall_through); | |
| 3042 | |
| 3043 __ JumpIfSmi(eax, if_false); | |
| 3044 __ CmpObjectType(eax, FIRST_FUNCTION_TYPE, ebx); | |
| 3045 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
| 3046 Split(above_equal, if_true, if_false, fall_through); | |
| 3047 | |
| 3048 context()->Plug(if_true, if_false); | |
| 3049 } | |
| 3050 | |
| 3051 | |
| 3052 void FullCodeGenerator::EmitIsMinusZero(CallRuntime* expr) { | 3030 void FullCodeGenerator::EmitIsMinusZero(CallRuntime* expr) { |
| 3053 ZoneList<Expression*>* args = expr->arguments(); | 3031 ZoneList<Expression*>* args = expr->arguments(); |
| 3054 DCHECK(args->length() == 1); | 3032 DCHECK(args->length() == 1); |
| 3055 | 3033 |
| 3056 VisitForAccumulatorValue(args->at(0)); | 3034 VisitForAccumulatorValue(args->at(0)); |
| 3057 | 3035 |
| 3058 Label materialize_true, materialize_false; | 3036 Label materialize_true, materialize_false; |
| 3059 Label* if_true = NULL; | 3037 Label* if_true = NULL; |
| 3060 Label* if_false = NULL; | 3038 Label* if_false = NULL; |
| 3061 Label* fall_through = NULL; | 3039 Label* fall_through = NULL; |
| (...skipping 1670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4732 Assembler::target_address_at(call_target_address, | 4710 Assembler::target_address_at(call_target_address, |
| 4733 unoptimized_code)); | 4711 unoptimized_code)); |
| 4734 return OSR_AFTER_STACK_CHECK; | 4712 return OSR_AFTER_STACK_CHECK; |
| 4735 } | 4713 } |
| 4736 | 4714 |
| 4737 | 4715 |
| 4738 } // namespace internal | 4716 } // namespace internal |
| 4739 } // namespace v8 | 4717 } // namespace v8 |
| 4740 | 4718 |
| 4741 #endif // V8_TARGET_ARCH_IA32 | 4719 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |