| 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 3001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3012 | 3012 |
| 3013 __ JumpIfSmi(eax, if_false); | 3013 __ JumpIfSmi(eax, if_false); |
| 3014 __ CmpObjectType(eax, SIMD128_VALUE_TYPE, ebx); | 3014 __ CmpObjectType(eax, SIMD128_VALUE_TYPE, ebx); |
| 3015 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3015 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 3016 Split(equal, if_true, if_false, fall_through); | 3016 Split(equal, if_true, if_false, fall_through); |
| 3017 | 3017 |
| 3018 context()->Plug(if_true, if_false); | 3018 context()->Plug(if_true, if_false); |
| 3019 } | 3019 } |
| 3020 | 3020 |
| 3021 | 3021 |
| 3022 void FullCodeGenerator::EmitIsFunction(CallRuntime* expr) { | |
| 3023 ZoneList<Expression*>* args = expr->arguments(); | |
| 3024 DCHECK(args->length() == 1); | |
| 3025 | |
| 3026 VisitForAccumulatorValue(args->at(0)); | |
| 3027 | |
| 3028 Label materialize_true, materialize_false; | |
| 3029 Label* if_true = NULL; | |
| 3030 Label* if_false = NULL; | |
| 3031 Label* fall_through = NULL; | |
| 3032 context()->PrepareTest(&materialize_true, &materialize_false, | |
| 3033 &if_true, &if_false, &fall_through); | |
| 3034 | |
| 3035 __ JumpIfSmi(eax, if_false); | |
| 3036 __ CmpObjectType(eax, FIRST_FUNCTION_TYPE, ebx); | |
| 3037 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
| 3038 Split(above_equal, if_true, if_false, fall_through); | |
| 3039 | |
| 3040 context()->Plug(if_true, if_false); | |
| 3041 } | |
| 3042 | |
| 3043 | |
| 3044 void FullCodeGenerator::EmitIsMinusZero(CallRuntime* expr) { | 3022 void FullCodeGenerator::EmitIsMinusZero(CallRuntime* expr) { |
| 3045 ZoneList<Expression*>* args = expr->arguments(); | 3023 ZoneList<Expression*>* args = expr->arguments(); |
| 3046 DCHECK(args->length() == 1); | 3024 DCHECK(args->length() == 1); |
| 3047 | 3025 |
| 3048 VisitForAccumulatorValue(args->at(0)); | 3026 VisitForAccumulatorValue(args->at(0)); |
| 3049 | 3027 |
| 3050 Label materialize_true, materialize_false; | 3028 Label materialize_true, materialize_false; |
| 3051 Label* if_true = NULL; | 3029 Label* if_true = NULL; |
| 3052 Label* if_false = NULL; | 3030 Label* if_false = NULL; |
| 3053 Label* fall_through = NULL; | 3031 Label* fall_through = NULL; |
| (...skipping 1670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4724 Assembler::target_address_at(call_target_address, | 4702 Assembler::target_address_at(call_target_address, |
| 4725 unoptimized_code)); | 4703 unoptimized_code)); |
| 4726 return OSR_AFTER_STACK_CHECK; | 4704 return OSR_AFTER_STACK_CHECK; |
| 4727 } | 4705 } |
| 4728 | 4706 |
| 4729 | 4707 |
| 4730 } // namespace internal | 4708 } // namespace internal |
| 4731 } // namespace v8 | 4709 } // namespace v8 |
| 4732 | 4710 |
| 4733 #endif // V8_TARGET_ARCH_X87 | 4711 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |